From f6d8445d5283982a819e2c0a96a173c48a9410de Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 5 Jul 2001 07:40:18 +0000 Subject: [PATCH] Exclude one function from compilation in other dimensions than the one it is used in. Mark another function inline to avoid link time errors. git-svn-id: https://svn.dealii.org/trunk@4815 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/grid_generator.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/source/grid/grid_generator.cc b/deal.II/deal.II/source/grid/grid_generator.cc index 9f9f012451..882333eba9 100644 --- a/deal.II/deal.II/source/grid/grid_generator.cc +++ b/deal.II/deal.II/source/grid/grid_generator.cc @@ -116,6 +116,8 @@ GridGenerator::hyper_rectangle (Triangulation &tria, +#if deal_II_dimension == 1 + void GridGenerator::colorize_hyper_rectangle (Triangulation<1> &) { @@ -123,7 +125,7 @@ GridGenerator::colorize_hyper_rectangle (Triangulation<1> &) }; -#if deal_II_dimension != 1 +#else template void @@ -815,6 +817,13 @@ void GridGenerator::laplace_transformation (Triangulation &tria, #endif + +// make the following function inline. this is so that it becomes marked +// internal/weak for the linker and we don't get multiply defined errors +// when linking with more than one dimension at a time. Usually we used +// the trick of putting these functions in a .all_dimensions.cc file, but +// this is not necessary here as this is an internal only function. +inline void GridGenerator::laplace_solve (const SparseMatrix &S, const std::map &m, Vector &u) -- 2.39.5