From: Wolfgang Bangerth Date: Wed, 5 Nov 2014 18:26:19 +0000 (-0600) Subject: Use an FE_Nothing instead of FE_DGQ(0). X-Git-Tag: v8.2.0-rc1~79^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F223%2Fhead;p=dealii.git Use an FE_Nothing instead of FE_DGQ(0). We don't actually want to use any kind of finite element here at all, but need to because FEValues requires us to when all we want are the JxW values. FE_Nothing is cheaper to construct than FE_DGQ(0), so use it in GridTools::volume(). --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 35b7d6d54e..c66a7c6213 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -182,10 +182,7 @@ namespace GridTools // we really want the JxW values from the FEValues object, but it // wants a finite element. create a cheap element as a dummy // element -//TODO: using FE_Nothing here would be nice, but right now, FE_Nothing -// only takes one argument and can not be used for FEValues -// if dim != spacedim - FE_DGQ dummy_fe(0); + FE_Nothing dummy_fe; FEValues fe_values (mapping, dummy_fe, quadrature_formula, update_JxW_values);