]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Instantiate dealii::Function and dealii::TensorFunction for complex scalars
authorMatthias Maier <tamiko@43-1.org>
Thu, 27 Aug 2015 03:35:08 +0000 (22:35 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 27 Aug 2015 04:08:29 +0000 (23:08 -0500)
cmake/config/template-arguments.in
source/base/CMakeLists.txt
source/base/function.cc
source/base/function.inst.in [new file with mode: 0644]
source/base/function_time.cc
source/base/function_time.inst.in [new file with mode: 0644]
source/base/tensor_function.cc
source/base/tensor_function.inst.in [new file with mode: 0644]

index 29b5709e6df8f4db9aa9610bb6893326824e67b0..ee4444296b8eed2642aea8012d6b5518c9a53991 100644 (file)
@@ -91,6 +91,8 @@ DIMENSIONS := { 1; 2; 3 }
 
 SPACE_DIMENSIONS := { 1; 2; 3 }
 
+RANKS := { 1; 2; 3; 4 }
+
 OUTPUT_FLAG_TYPES := { DXFlags; UcdFlags; GnuplotFlags; PovrayFlags; EpsFlags;
                        GmvFlags; TecplotFlags; VtkFlags; SvgFlags;
                        Deal_II_IntermediateFlags }
index 1f45f6ed84b7324292994bd88733d3b327ee8dba..2656f896062a80c2a9b4aea5662783d082a01bf3 100644 (file)
@@ -72,7 +72,10 @@ SET(_src
 
 SET(_inst
   data_out_base.inst.in
+  function.inst.in
+  function_time.inst.in
   polynomials_rannacher_turek.inst.in
+  tensor_function.inst.in
   time_stepping.inst.in
   )
 
index e1e7a042296fabd08e3e25c4652a11cc8596a74d..ffe3fb2eccee87033e67d3df1c7f845d7942d6ac 100644 (file)
 DEAL_II_NAMESPACE_OPEN
 
 // explicit instantiations
-
-template class Function<1>;
-template class ZeroFunction<1>;
-template class ConstantFunction<1>;
-template class ComponentSelectFunction<1>;
-template class ScalarFunctionFromFunctionObject<1>;
-template class VectorFunctionFromScalarFunctionObject<1>;
-template class VectorFunctionFromTensorFunction<1>;
-
-template class Function<2>;
-template class ZeroFunction<2>;
-template class ConstantFunction<2>;
-template class ComponentSelectFunction<2>;
-template class ScalarFunctionFromFunctionObject<2>;
-template class VectorFunctionFromScalarFunctionObject<2>;
-template class VectorFunctionFromTensorFunction<2>;
-
-template class Function<3>;
-template class ZeroFunction<3>;
-template class ConstantFunction<3>;
-template class ComponentSelectFunction<3>;
-template class ScalarFunctionFromFunctionObject<3>;
-template class VectorFunctionFromScalarFunctionObject<3>;
-template class VectorFunctionFromTensorFunction<3>;
+#include "function.inst"
 
 DEAL_II_NAMESPACE_CLOSE
diff --git a/source/base/function.inst.in b/source/base/function.inst.in
new file mode 100644 (file)
index 0000000..26711a7
--- /dev/null
@@ -0,0 +1,37 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2015 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+for (S : REAL_SCALARS; dim : SPACE_DIMENSIONS)
+{
+  template class Function<dim, S>;
+  template class ZeroFunction<dim, S>;
+  template class ConstantFunction<dim, S>;
+  template class ComponentSelectFunction<dim, S>;
+  template class ScalarFunctionFromFunctionObject<dim, S>;
+  template class VectorFunctionFromScalarFunctionObject<dim, S>;
+  template class VectorFunctionFromTensorFunction<dim, S>;
+}
+
+for (S : COMPLEX_SCALARS; dim : SPACE_DIMENSIONS)
+{
+  template class Function<dim, S>;
+  template class ZeroFunction<dim, S>;
+  template class ConstantFunction<dim, S>;
+  template class ComponentSelectFunction<dim, S>;
+  template class ScalarFunctionFromFunctionObject<dim, S>;
+  template class VectorFunctionFromScalarFunctionObject<dim, S>;
+  template class VectorFunctionFromTensorFunction<dim, S>;
+}
index a1520db7328d5d6c25719ac3f3798bb561d3ad80..2c34202b9c5d7e85b166385b9ad424c58545e6bd 100644 (file)
@@ -17,8 +17,8 @@
 
 DEAL_II_NAMESPACE_OPEN
 
-// Explicit instantiation
-template class FunctionTime<double>;
+// explicit instantiation
+#include "function_time.inst"
 
 DEAL_II_NAMESPACE_CLOSE
 
diff --git a/source/base/function_time.inst.in b/source/base/function_time.inst.in
new file mode 100644 (file)
index 0000000..56f36f1
--- /dev/null
@@ -0,0 +1,24 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2015 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+for (S : REAL_SCALARS)
+{
+  template class FunctionTime<S>;
+}
+
+for (S : COMPLEX_SCALARS)
+{
+  template class FunctionTime<S>;
+}
index f976e6eabbac5aa92f38eb3f85027862a329859f..50a6d224ea9648a1ac94ada47b4d3001755f80f6 100644 (file)
 
 DEAL_II_NAMESPACE_OPEN
 
-// Explicit instantiations:
-
-template class TensorFunction<1,1>;
-template class TensorFunction<2,1>;
-template class TensorFunction<3,1>;
-template class TensorFunction<4,1>;
-template class TensorFunction<1,2>;
-template class TensorFunction<2,2>;
-template class TensorFunction<3,2>;
-template class TensorFunction<4,2>;
-template class TensorFunction<1,3>;
-template class TensorFunction<2,3>;
-template class TensorFunction<3,3>;
-template class TensorFunction<4,3>;
-
-template class ConstantTensorFunction<1,1>;
-template class ConstantTensorFunction<2,1>;
-template class ConstantTensorFunction<3,1>;
-template class ConstantTensorFunction<4,1>;
-template class ConstantTensorFunction<1,2>;
-template class ConstantTensorFunction<2,2>;
-template class ConstantTensorFunction<3,2>;
-template class ConstantTensorFunction<4,2>;
-template class ConstantTensorFunction<1,3>;
-template class ConstantTensorFunction<2,3>;
-template class ConstantTensorFunction<3,3>;
-template class ConstantTensorFunction<4,3>;
-
-template class ZeroTensorFunction<1,1>;
-template class ZeroTensorFunction<2,1>;
-template class ZeroTensorFunction<3,1>;
-template class ZeroTensorFunction<4,1>;
-template class ZeroTensorFunction<1,2>;
-template class ZeroTensorFunction<2,2>;
-template class ZeroTensorFunction<3,2>;
-template class ZeroTensorFunction<4,2>;
-template class ZeroTensorFunction<1,3>;
-template class ZeroTensorFunction<2,3>;
-template class ZeroTensorFunction<3,3>;
-template class ZeroTensorFunction<4,3>;
-
+// explicit instantiations
+#include "tensor_function.inst"
 
 DEAL_II_NAMESPACE_CLOSE
diff --git a/source/base/tensor_function.inst.in b/source/base/tensor_function.inst.in
new file mode 100644 (file)
index 0000000..39a52c9
--- /dev/null
@@ -0,0 +1,29 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2015 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+for (S : REAL_SCALARS; rank: RANKS; dim : SPACE_DIMENSIONS)
+{
+  template class TensorFunction<rank, dim, S>;
+  template class ConstantTensorFunction<rank, dim, S>;
+  template class ZeroTensorFunction<rank, dim, S>;
+}
+
+for (S : COMPLEX_SCALARS; rank: RANKS; dim : SPACE_DIMENSIONS)
+{
+  template class TensorFunction<rank, dim, S>;
+  template class ConstantTensorFunction<rank, dim, S>;
+  template class ZeroTensorFunction<rank, dim, S>;
+}

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.