From: wolf Date: Thu, 5 Jul 2001 07:40:18 +0000 (+0000) Subject: Exclude one function from compilation in other dimensions than the one it is used... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f4637831f2a92a7a064abee618beb706dd9d3f3;p=dealii-svn.git 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 --- 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)