From: Matthias Maier Date: Thu, 27 Aug 2015 03:35:08 +0000 (-0500) Subject: Instantiate dealii::Function and dealii::TensorFunction for complex scalars X-Git-Tag: v8.4.0-rc2~541^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=288f09624861f4bacaa5885af17b7371f8a72114;p=dealii.git Instantiate dealii::Function and dealii::TensorFunction for complex scalars --- diff --git a/cmake/config/template-arguments.in b/cmake/config/template-arguments.in index 29b5709e6d..ee4444296b 100644 --- a/cmake/config/template-arguments.in +++ b/cmake/config/template-arguments.in @@ -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 } diff --git a/source/base/CMakeLists.txt b/source/base/CMakeLists.txt index 1f45f6ed84..2656f89606 100644 --- a/source/base/CMakeLists.txt +++ b/source/base/CMakeLists.txt @@ -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 ) diff --git a/source/base/function.cc b/source/base/function.cc index e1e7a04229..ffe3fb2ecc 100644 --- a/source/base/function.cc +++ b/source/base/function.cc @@ -18,29 +18,6 @@ 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 index 0000000000..26711a7ce4 --- /dev/null +++ b/source/base/function.inst.in @@ -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; + template class ZeroFunction; + template class ConstantFunction; + template class ComponentSelectFunction; + template class ScalarFunctionFromFunctionObject; + template class VectorFunctionFromScalarFunctionObject; + template class VectorFunctionFromTensorFunction; +} + +for (S : COMPLEX_SCALARS; dim : SPACE_DIMENSIONS) +{ + template class Function; + template class ZeroFunction; + template class ConstantFunction; + template class ComponentSelectFunction; + template class ScalarFunctionFromFunctionObject; + template class VectorFunctionFromScalarFunctionObject; + template class VectorFunctionFromTensorFunction; +} diff --git a/source/base/function_time.cc b/source/base/function_time.cc index a1520db732..2c34202b9c 100644 --- a/source/base/function_time.cc +++ b/source/base/function_time.cc @@ -17,8 +17,8 @@ DEAL_II_NAMESPACE_OPEN -// Explicit instantiation -template class FunctionTime; +// 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 index 0000000000..56f36f192a --- /dev/null +++ b/source/base/function_time.inst.in @@ -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; +} + +for (S : COMPLEX_SCALARS) +{ + template class FunctionTime; +} diff --git a/source/base/tensor_function.cc b/source/base/tensor_function.cc index f976e6eabb..50a6d224ea 100644 --- a/source/base/tensor_function.cc +++ b/source/base/tensor_function.cc @@ -17,46 +17,7 @@ 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 index 0000000000..39a52c9402 --- /dev/null +++ b/source/base/tensor_function.inst.in @@ -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; + template class ConstantTensorFunction; + template class ZeroTensorFunction; +} + +for (S : COMPLEX_SCALARS; rank: RANKS; dim : SPACE_DIMENSIONS) +{ + template class TensorFunction; + template class ConstantTensorFunction; + template class ZeroTensorFunction; +}