From 986567f6f97aae86b0f367d19197b894bccc22d6 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 21 Jul 2015 17:08:59 +0200 Subject: [PATCH] Make compile with boost bind. --- include/deal.II/fe/fe_system.h | 12 ++++++------ source/fe/fe_system.cc | 34 ++++++++++++++++------------------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index 6389200db5..085d9bd5bc 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -1039,19 +1039,19 @@ private: /** * Compute the equivalent of compute_fill(), but only for the base element - * specified by the second-to-last argument. + * specified by the second-to-last argument. Some elements are grouped + * together to stay within the limit of 8 function arguments of boost. */ template void compute_fill_one_base ( const Mapping &mapping, const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, + const std::pair face_sub_no, const Quadrature &quadrature, - CellSimilarity::Similarity cell_similarity, - const typename Mapping::InternalDataBase &mapping_data, - const typename Mapping::InternalDataBase &fedata, + const CellSimilarity::Similarity cell_similarity, + const std::pair::InternalDataBase *, + const typename Mapping::InternalDataBase *> mapping_data, const unsigned int base_element, FEValuesData &data) const; diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 0583588a0e..b0d3bab9fe 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -1090,16 +1090,15 @@ void FESystem::compute_fill_one_base ( const Mapping &mapping, const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, + const std::pair face_sub_no, const Quadrature &quadrature, - CellSimilarity::Similarity cell_similarity, - const typename Mapping::InternalDataBase &mapping_data, - const typename Mapping::InternalDataBase &fedata, + const CellSimilarity::Similarity cell_similarity, + const std::pair::InternalDataBase *, + const typename Mapping::InternalDataBase *> mapping_data, const unsigned int base_no, FEValuesData &data) const { - const InternalData &fe_data = static_cast (fedata); + const InternalData &fe_data = static_cast (*mapping_data.second); const unsigned int n_q_points = quadrature.size(); const FiniteElement & @@ -1118,7 +1117,7 @@ FESystem::compute_fill_one_base ( // Quadrature or Quadrature: const Subscriptor *quadrature_base_pointer = &quadrature; - if (face_no==invalid_face_number) + if (face_sub_no.first==invalid_face_number) { Assert(dim_1==dim, ExcDimensionMismatch(dim_1,dim)); Assert (dynamic_cast *>(quadrature_base_pointer) != 0, @@ -1157,15 +1156,15 @@ FESystem::compute_fill_one_base ( // for the case of fill_fe_(sub)face_values the data needs to be // copied from base_data to data on each face, therefore use // base_fe_data.update_flags. - if (face_no==invalid_face_number) - base_fe.fill_fe_values(mapping, cell, *cell_quadrature, mapping_data, + if (face_sub_no.first==invalid_face_number) + base_fe.fill_fe_values(mapping, cell, *cell_quadrature, *mapping_data.first, base_fe_data, base_data, cell_similarity); - else if (sub_no==invalid_face_number) - base_fe.fill_fe_face_values(mapping, cell, face_no, - *face_quadrature, mapping_data, base_fe_data, base_data); + else if (face_sub_no.second==invalid_face_number) + base_fe.fill_fe_face_values(mapping, cell, face_sub_no.first, + *face_quadrature, *mapping_data.first, base_fe_data, base_data); else - base_fe.fill_fe_subface_values(mapping, cell, face_no, sub_no, - *face_quadrature, mapping_data, base_fe_data, base_data); + base_fe.fill_fe_subface_values(mapping, cell, face_sub_no.first, face_sub_no.second, + *face_quadrature, *mapping_data.first, base_fe_data, base_data); // now data has been generated, so copy it. we used to work by // looping over all base elements (i.e. this outer loop), then over @@ -1300,12 +1299,11 @@ FESystem::compute_fill ( this, std_cxx11::cref(mapping), std_cxx11::cref(cell), - face_no, - sub_no, + std::make_pair(face_no, sub_no), std_cxx11::cref(quadrature), CellSimilarity::none, - std_cxx11::ref(mapping_data), - std_cxx11::ref(fedata), + std::make_pair(&mapping_data, + &fedata), base_no, std_cxx11::ref(data)))); task_group.join_all(); -- 2.39.5