From 8397194cf6081aef6e0693332c525d108abccf3d Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 31 Jan 2018 19:37:29 +0100 Subject: [PATCH] Workaround ICC compiler bug --- include/deal.II/fe/fe_enriched.h | 2 +- source/fe/fe_enriched.cc | 96 ++++++++++++++++---------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/include/deal.II/fe/fe_enriched.h b/include/deal.II/fe/fe_enriched.h index 2a43d3bad9..f43a24e9da 100644 --- a/include/deal.II/fe/fe_enriched.h +++ b/include/deal.II/fe/fe_enriched.h @@ -628,7 +628,7 @@ private: /** * The underlying FESystem object. */ - FESystem fe_system; + const std::unique_ptr > fe_system; /** * After calling fill_fe_(face/subface_)values this function diff --git a/source/fe/fe_enriched.cc b/source/fe/fe_enriched.cc index 7fea6bc366..f358f3085a 100644 --- a/source/fe/fe_enriched.cc +++ b/source/fe/fe_enriched.cc @@ -171,7 +171,7 @@ FE_Enriched::FE_Enriched (const std::vector< const FiniteElement< FETools::Compositing::compute_nonzero_components(fes,multiplicities,false)), enrichments(functions), is_enriched(internal::FE_Enriched::check_if_enriched(fes)), - fe_system(fes,multiplicities) + fe_system(std_cxx14::make_unique >(fes,multiplicities)) { // descriptive error are thrown within the function. Assert(internal::FE_Enriched::consistency_check(fes,multiplicities,functions), @@ -239,7 +239,7 @@ FE_Enriched::shape_value(const unsigned int i, const Point< dim > &p) const { Assert(!is_enriched, ExcMessage("For enriched finite elements shape_value() can not be defined on the reference element.")); - return fe_system.shape_value(i,p); + return fe_system->shape_value(i,p); } @@ -266,7 +266,7 @@ template UpdateFlags FE_Enriched::requires_update_flags (const UpdateFlags flags) const { - UpdateFlags out = fe_system.requires_update_flags(flags); + UpdateFlags out = fe_system->requires_update_flags(flags); if (is_enriched) { @@ -337,7 +337,7 @@ FE_Enriched::get_face_data (const UpdateFlags update_flags, const Quadrature &quadrature, internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const { - return setup_data(std::unique_ptr::InternalDataBase>(fe_system.get_face_data(update_flags,mapping,quadrature,output_data)), + return setup_data(std::unique_ptr::InternalDataBase>(fe_system->get_face_data(update_flags,mapping,quadrature,output_data)), update_flags, quadrature); } @@ -350,7 +350,7 @@ FE_Enriched::get_subface_data (const UpdateFlags update_flags const Quadrature &quadrature, dealii::internal::FEValues::FiniteElementRelatedData &output_data) const { - return setup_data(std::unique_ptr::InternalDataBase>(fe_system.get_subface_data(update_flags,mapping,quadrature,output_data)), + return setup_data(std::unique_ptr::InternalDataBase>(fe_system->get_subface_data(update_flags,mapping,quadrature,output_data)), update_flags, quadrature); } @@ -363,7 +363,7 @@ FE_Enriched::get_data (const UpdateFlags flags, const Quadrature &quadrature, internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const { - return setup_data(std::unique_ptr::InternalDataBase>(fe_system.get_data(flags,mapping,quadrature,output_data)), + return setup_data(std::unique_ptr::InternalDataBase>(fe_system->get_data(flags,mapping,quadrature,output_data)), flags, quadrature); } @@ -405,7 +405,7 @@ void FE_Enriched::initialize (const std::vectorinterface_constraints = fe_system.interface_constraints; + this->interface_constraints = fe_system->interface_constraints; // if we just wrap another FE (i.e. use FE_Nothing as a second FE) // then it makes sense to have support points. @@ -414,13 +414,13 @@ void FE_Enriched::initialize (const std::vectorunit_support_points = fe_system.unit_support_points; - this->unit_face_support_points = fe_system.unit_face_support_points; + this->unit_support_points = fe_system->unit_support_points; + this->unit_face_support_points = fe_system->unit_face_support_points; } // take adjust_quad_dof_index_for_face_orientation_table from FESystem: { - this->adjust_line_dof_index_for_line_orientation_table = fe_system.adjust_line_dof_index_for_line_orientation_table; + this->adjust_line_dof_index_for_line_orientation_table = fe_system->adjust_line_dof_index_for_line_orientation_table; } } @@ -452,7 +452,7 @@ template const FiniteElement & FE_Enriched::base_element (const unsigned int index) const { - return fe_system.base_element(index); + return fe_system->base_element(index); } @@ -473,14 +473,14 @@ FE_Enriched::fill_fe_values (const typename Triangulation< dim, sp const InternalData &fe_data = static_cast (fe_internal); // call FESystem's method to fill everything without enrichment function - fe_system.fill_fe_values(cell, - cell_similarity, - quadrature, - mapping, - mapping_internal, - mapping_data, - *fe_data.fesystem_data, - output_data); + fe_system->fill_fe_values(cell, + cell_similarity, + quadrature, + mapping, + mapping_internal, + mapping_data, + *fe_data.fesystem_data, + output_data); if (is_enriched) multiply_by_enrichment(quadrature, @@ -509,14 +509,14 @@ FE_Enriched::fill_fe_face_values const InternalData &fe_data = static_cast (fe_internal); // call FESystem's method to fill everything without enrichment function - fe_system.fill_fe_face_values(cell, - face_no, - quadrature, - mapping, - mapping_internal, - mapping_data, - *fe_data.fesystem_data, - output_data); + fe_system->fill_fe_face_values(cell, + face_no, + quadrature, + mapping, + mapping_internal, + mapping_data, + *fe_data.fesystem_data, + output_data); if (is_enriched) multiply_by_enrichment(quadrature, @@ -546,15 +546,15 @@ FE_Enriched::fill_fe_subface_values const InternalData &fe_data = static_cast (fe_internal); // call FESystem's method to fill everything without enrichment function - fe_system.fill_fe_subface_values(cell, - face_no, - sub_no, - quadrature, - mapping, - mapping_internal, - mapping_data, - *fe_data.fesystem_data, - output_data); + fe_system->fill_fe_subface_values(cell, + face_no, + sub_no, + quadrature, + mapping, + mapping_internal, + mapping_data, + *fe_data.fesystem_data, + output_data); if (is_enriched) multiply_by_enrichment(quadrature, @@ -768,7 +768,7 @@ const FESystem & FE_Enriched:: get_fe_system() const { - return fe_system; + return *fe_system; } @@ -790,8 +790,8 @@ get_face_interpolation_matrix (const FiniteElement &source, if (const FE_Enriched *fe_enr_other = dynamic_cast*>(&source)) { - fe_system.get_face_interpolation_matrix(fe_enr_other->get_fe_system(), - matrix); + fe_system->get_face_interpolation_matrix(fe_enr_other->get_fe_system(), + matrix); } else { @@ -811,9 +811,9 @@ get_subface_interpolation_matrix (const FiniteElement &source, if (const FE_Enriched *fe_enr_other = dynamic_cast*>(&source)) { - fe_system.get_subface_interpolation_matrix(fe_enr_other->get_fe_system(), - subface, - matrix); + fe_system->get_subface_interpolation_matrix(fe_enr_other->get_fe_system(), + subface, + matrix); } else { @@ -831,7 +831,7 @@ hp_vertex_dof_identities (const FiniteElement &fe_other) const if (const FE_Enriched *fe_enr_other = dynamic_cast*>(&fe_other)) { - return fe_system.hp_vertex_dof_identities(fe_enr_other->get_fe_system()); + return fe_system->hp_vertex_dof_identities(fe_enr_other->get_fe_system()); } else { @@ -849,7 +849,7 @@ hp_line_dof_identities (const FiniteElement &fe_other) const if (const FE_Enriched *fe_enr_other = dynamic_cast*>(&fe_other)) { - return fe_system.hp_line_dof_identities(fe_enr_other->get_fe_system()); + return fe_system->hp_line_dof_identities(fe_enr_other->get_fe_system()); } else { @@ -867,7 +867,7 @@ hp_quad_dof_identities (const FiniteElement &fe_other) const if (const FE_Enriched *fe_enr_other = dynamic_cast*>(&fe_other)) { - return fe_system.hp_quad_dof_identities(fe_enr_other->get_fe_system()); + return fe_system->hp_quad_dof_identities(fe_enr_other->get_fe_system()); } else { @@ -895,7 +895,7 @@ compare_for_face_domination (const FiniteElement &fe_other) const if (const FE_Enriched *fe_enr_other = dynamic_cast*>(&fe_other)) { - return fe_system.compare_for_face_domination(fe_enr_other->get_fe_system()); + return fe_system->compare_for_face_domination(fe_enr_other->get_fe_system()); } else { @@ -909,7 +909,7 @@ const FullMatrix & FE_Enriched::get_prolongation_matrix (const unsigned int child, const RefinementCase &refinement_case) const { - return fe_system.get_prolongation_matrix(child, refinement_case); + return fe_system->get_prolongation_matrix(child, refinement_case); } @@ -918,7 +918,7 @@ const FullMatrix & FE_Enriched::get_restriction_matrix (const unsigned int child, const RefinementCase &refinement_case) const { - return fe_system.get_restriction_matrix(child, refinement_case); + return fe_system->get_restriction_matrix(child, refinement_case); } -- 2.39.5