]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use an FE_Nothing instead of FE_DGQ(0). 223/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 5 Nov 2014 18:26:19 +0000 (12:26 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 7 Nov 2014 13:01:22 +0000 (07:01 -0600)
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

index 35b7d6d54ed060eac4596d0e5e6649ca0a07ed4b..c66a7c62131c5e8ed991e8e4b5f24b6aef92640a 100644 (file)
@@ -28,7 +28,7 @@
 #include <deal.II/dofs/dof_handler.h>
 #include <deal.II/dofs/dof_accessor.h>
 #include <deal.II/dofs/dof_tools.h>
-#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_nothing.h>
 #include <deal.II/fe/mapping_q1.h>
 #include <deal.II/fe/mapping_q.h>
 #include <deal.II/fe/fe_values.h>
@@ -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<dim,spacedim>
-//  if dim != spacedim
-    FE_DGQ<dim,spacedim> dummy_fe(0);
+    FE_Nothing<dim,spacedim> dummy_fe;
     FEValues<dim,spacedim> fe_values (mapping, dummy_fe, quadrature_formula,
                                       update_JxW_values);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.