From 1413dd7c7da9fdeb16f59b2c97b76cb59b04d72d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 5 Nov 2014 12:26:19 -0600 Subject: [PATCH] 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(). --- source/grid/grid_tools.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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); -- 2.39.5