]> https://gitweb.dealii.org/ - dealii.git/commitdiff
New StaticMappingQ1::mapping object.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 21 Feb 2006 12:53:06 +0000 (12:53 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 21 Feb 2006 12:53:06 +0000 (12:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@12436 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/mapping_q1.h
deal.II/deal.II/source/fe/mapping_q1.cc

index 1810833ab5e83a0dabfe314b912d24b78e586b18..2a9fa19e080191154eb67e1683f90328a2b63df2 100644 (file)
@@ -605,6 +605,20 @@ class MappingQ1 : public Mapping<dim>
     static const unsigned int n_shape_functions = GeometryInfo<dim>::vertices_per_cell;
 };
 
+
+/**
+ * In order to avoid creation of static MappingQ1 objects at several
+ * places in the library (in particular in backward compatibility
+ * functions), we define a static MappingQ1 objects once and for all
+ * places where it is needed.
+ */
+template <int dim>
+struct StaticMappingQ1
+{
+    static MappingQ1<dim> mapping;
+};
+
+
 /*@}*/
 
 /*----------------------------------------------------------------------*/
index c1a5cc54dcaf52a81ea4e2f05cc372bd0a1fc015..e4acb4ce35702745077105ca9bb3efa50edaa736 100644 (file)
@@ -1030,6 +1030,17 @@ MappingQ1<dim>::clone () const
   return new MappingQ1<dim>(*this);
 }
 
+//---------------------------------------------------------------------------
+
+
+template <int dim> MappingQ1<dim> StaticMappingQ1<dim>::mapping;
+
+
+
 //---------------------------------------------------------------------------
 
 template class MappingQ1<deal_II_dimension>;
+template struct StaticMappingQ1<deal_II_dimension>;
+
+
+

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.