]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make instantiation in dof_accessor.inst.in more systematic 10600/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 25 Jun 2020 06:25:59 +0000 (08:25 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 25 Jun 2020 06:25:59 +0000 (08:25 +0200)
source/dofs/dof_accessor.inst.in

index 31f83753787c17dab0d8596e098960a80d9f4001..a0de38911bc509b59f2a6d910f322c77a36207e6 100644 (file)
 
 
 
-// TODO: This could surely be made more systematic!
-for (deal_II_dimension : DIMENSIONS; lda : BOOL)
+for (deal_II_struct_dimension : DIMENSIONS; deal_II_dimension : DIMENSIONS;
+     deal_II_space_dimension : DIMENSIONS;
+     lda : BOOL)
   {
-    // explicit instantiations (for DoFHandler)
-
-
-#if deal_II_dimension == 2
-    template class DoFAccessor<1, 2, 2, lda>;
-
-    template class TriaRawIterator<DoFAccessor<1, 2, 2, lda>>;
-    template class TriaIterator<DoFAccessor<1, 2, 2, lda>>;
-    template class TriaActiveIterator<DoFAccessor<1, 2, 2, lda>>;
-#endif
-
-#if deal_II_dimension == 3
-    template class DoFAccessor<1, 3, 3, lda>;
-    template class DoFAccessor<2, 3, 3, lda>;
-
-    template class TriaRawIterator<DoFAccessor<1, 3, 3, lda>>;
-    template class TriaIterator<DoFAccessor<1, 3, 3, lda>>;
-    template class TriaActiveIterator<DoFAccessor<1, 3, 3, lda>>;
-    template class TriaRawIterator<DoFAccessor<2, 3, 3, lda>>;
-    template class TriaIterator<DoFAccessor<2, 3, 3, lda>>;
-    template class TriaActiveIterator<DoFAccessor<2, 3, 3, lda>>;
-#endif
-
-    template class DoFAccessor<deal_II_dimension,
-                               deal_II_dimension,
+#if deal_II_struct_dimension <= deal_II_dimension && \
+  deal_II_dimension <= deal_II_space_dimension
+    template class DoFAccessor<deal_II_struct_dimension,
                                deal_II_dimension,
+                               deal_II_space_dimension,
                                lda>;
-    template class DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>;
-
-    template class TriaRawIterator<
-      DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>>;
-    template class TriaIterator<
-      DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>>;
-    template class TriaActiveIterator<
-      DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>>;
-
-
-
-    // //
-    // --------------------------------------------------------------------------
-    // // explicit instantiations (for DoFHandler)
-
-#if deal_II_dimension == 1
-    template class DoFAccessor<1, 1, 2, lda>;
-#endif
-
-#if deal_II_dimension == 2
-    template class DoFAccessor<1, 2, 3, lda>;
-    template class DoFAccessor<2, 2, 3, lda>;
-
-    template class TriaRawIterator<DoFAccessor<1, 2, 3, lda>>;
-    template class TriaIterator<DoFAccessor<1, 2, 3, lda>>;
-    template class TriaActiveIterator<DoFAccessor<1, 2, 3, lda>>;
+    template class TriaRawIterator<DoFAccessor<deal_II_struct_dimension,
+                                               deal_II_dimension,
+                                               deal_II_space_dimension,
+                                               lda>>;
+    template class TriaIterator<DoFAccessor<deal_II_struct_dimension,
+                                            deal_II_dimension,
+                                            deal_II_space_dimension,
+                                            lda>>;
+    template class TriaActiveIterator<DoFAccessor<deal_II_struct_dimension,
+                                                  deal_II_dimension,
+                                                  deal_II_space_dimension,
+                                                  lda>>;
 #endif
+  }
 
 
-#if deal_II_dimension != 3
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS;
+     lda : BOOL)
+  {
+#if deal_II_dimension <= deal_II_space_dimension
     template class DoFCellAccessor<deal_II_dimension,
-                                   deal_II_dimension + 1,
+                                   deal_II_space_dimension,
                                    lda>;
-
     template class TriaRawIterator<
-      DoFCellAccessor<deal_II_dimension, deal_II_dimension + 1, lda>>;
+      DoFCellAccessor<deal_II_dimension, deal_II_space_dimension, lda>>;
     template class TriaIterator<
-      DoFCellAccessor<deal_II_dimension, deal_II_dimension + 1, lda>>;
+      DoFCellAccessor<deal_II_dimension, deal_II_space_dimension, lda>>;
     template class TriaActiveIterator<
-      DoFCellAccessor<deal_II_dimension, deal_II_dimension + 1, lda>>;
-#endif
-
-
-#if deal_II_dimension == 3
-    template class DoFCellAccessor<1, 3, lda>;
-
-    template class TriaRawIterator<DoFCellAccessor<1, 3, lda>>;
-    template class TriaIterator<DoFCellAccessor<1, 3, lda>>;
-    template class TriaActiveIterator<DoFCellAccessor<1, 3, lda>>;
+      DoFCellAccessor<deal_II_dimension, deal_II_space_dimension, lda>>;
 #endif
   }
 
+
 for (deal_II_struct_dimension : DIMENSIONS; deal_II_dimension : DIMENSIONS;
      deal_II_space_dimension : DIMENSIONS)
   {

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.