From 06757cbc09d89ff80c96b503d1a1ed57f7bbcf70 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 28 Feb 2018 11:34:23 +0100 Subject: [PATCH] instantiate Function::Spherical and auxiliary conversion functions for dim=1,2 --- source/base/CMakeLists.txt | 1 + source/base/function_spherical.cc | 2 ++ source/base/geometric_utilities.cc | 7 ++----- source/base/geometric_utilities.inst.in | 21 +++++++++++++++++++++ 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 source/base/geometric_utilities.inst.in diff --git a/source/base/CMakeLists.txt b/source/base/CMakeLists.txt index 4a3a7c1473..5e80792a1a 100644 --- a/source/base/CMakeLists.txt +++ b/source/base/CMakeLists.txt @@ -102,6 +102,7 @@ SET(_inst data_out_base.inst.in function.inst.in function_time.inst.in + geometric_utilities.inst.in mpi.inst.in partitioner.inst.in polynomials_rannacher_turek.inst.in diff --git a/source/base/function_spherical.cc b/source/base/function_spherical.cc index a5826cde3e..449354d4df 100644 --- a/source/base/function_spherical.cc +++ b/source/base/function_spherical.cc @@ -345,6 +345,8 @@ namespace Functions // explicit instantiations + template class Spherical<1>; + template class Spherical<2>; template class Spherical<3>; } diff --git a/source/base/geometric_utilities.cc b/source/base/geometric_utilities.cc index c90e33aa37..f012d71832 100644 --- a/source/base/geometric_utilities.cc +++ b/source/base/geometric_utilities.cc @@ -103,11 +103,8 @@ namespace GeometricUtilities return ccoord; } - - template Point<2> from_spherical<2>(const std::array &); - template Point<3> from_spherical<3>(const std::array &); - template std::array to_spherical<2>(const Point<2> &); - template std::array to_spherical<3>(const Point<3> &); + // explicit instantiations +#include "geometric_utilities.inst" } } diff --git a/source/base/geometric_utilities.inst.in b/source/base/geometric_utilities.inst.in new file mode 100644 index 0000000000..8823cdd889 --- /dev/null +++ b/source/base/geometric_utilities.inst.in @@ -0,0 +1,21 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2015 - 2017 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 (dim : SPACE_DIMENSIONS) +{ + template Point from_spherical(const std::array &); + template std::array to_spherical(const Point &); +} -- 2.39.5