From 91d98c65da9888ceb35525c9f0c3d52cf575aaa6 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 2 Sep 2016 23:35:21 +0200 Subject: [PATCH] guard implementation by check for p4est --- include/deal.II/fe/fe_tools.h | 2 ++ source/fe/fe_tools_interpolate.cc | 13 ++++++------- source/fe/fe_tools_interpolate.inst.in | 4 ++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/deal.II/fe/fe_tools.h b/include/deal.II/fe/fe_tools.h index 274d2daf51..22ea3ce818 100644 --- a/include/deal.II/fe/fe_tools.h +++ b/include/deal.II/fe/fe_tools.h @@ -783,6 +783,7 @@ namespace FETools const ConstraintMatrix &constraints, OutVector &z2); +#ifdef DEAL_II_WITH_P4EST /* * Same as above for external parallel VectorTypes * on a parallel::distributed::Triangulation @@ -804,6 +805,7 @@ namespace FETools const DoFHandler &dof2, const ConstraintMatrix &constraints2, LinearAlgebra::distributed::Vector &u2); +#endif //DEAL_II_WITH_P4EST //@} /** diff --git a/source/fe/fe_tools_interpolate.cc b/source/fe/fe_tools_interpolate.cc index f50176fdd9..bdde01876e 100644 --- a/source/fe/fe_tools_interpolate.cc +++ b/source/fe/fe_tools_interpolate.cc @@ -720,9 +720,9 @@ namespace FETools } - namespace internal { +#ifdef DEAL_II_WITH_P4EST /** * Implementation of the @p extrapolate function * on parallel distributed grids. @@ -2075,8 +2075,7 @@ namespace FETools u2.compress(VectorOperation::insert); } - - +#endif //DEAL_II_WITH_P4EST namespace { @@ -2126,6 +2125,7 @@ namespace FETools +#ifdef DEAL_II_WITH_P4EST template void extrapolate_parallel(const InVector &u2_relevant, const DoFHandler &dof2, @@ -2141,11 +2141,10 @@ namespace FETools extrapolate_serial (u2_relevant, dof2, u2); } } +#endif //DEAL_II_WITH_P4EST } } - - template void extrapolate(const DoFHandler &dof1, const InVector &u1, @@ -2194,7 +2193,7 @@ namespace FETools } - +#ifdef DEAL_II_WITH_P4EST template void extrapolate_parallel(const DoFHandler &dof1, const VectorType &u1, @@ -2243,7 +2242,7 @@ namespace FETools constraints2.distribute(u2); } - +#endif //DEAL_II_WITH_P4EST } // end of namespace FETools diff --git a/source/fe/fe_tools_interpolate.inst.in b/source/fe/fe_tools_interpolate.inst.in index 58933f1833..24fcd7dd13 100644 --- a/source/fe/fe_tools_interpolate.inst.in +++ b/source/fe/fe_tools_interpolate.inst.in @@ -114,6 +114,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { +#ifdef DEAL_II_WITH_P4EST namespace FETools \{ #if deal_II_dimension == deal_II_space_dimension @@ -140,10 +141,12 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS #endif \} +#endif //DEAL_II_WITH_P4EST } for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; scalar : REAL_SCALARS) { +#ifdef DEAL_II_WITH_P4EST namespace FETools \{ #if deal_II_dimension == deal_II_space_dimension @@ -156,4 +159,5 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS LinearAlgebra::distributed::Vector &); #endif \} +#endif //DEAL_II_WITH_P4EST } -- 2.39.5