From: Wolfgang Bangerth <bangerth@math.tamu.edu>
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 <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);