From 99e60837a0a312da51f96157af9f5d905661268b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 13 Jan 2021 17:01:42 -0700 Subject: [PATCH] Use default constructed linear mapping. --- .../deal.II/base/parsed_convergence_table.h | 8 ++++++-- include/deal.II/fe/fe_tools.templates.h | 3 ++- .../numerics/error_estimator.templates.h | 12 ++++++++---- .../numerics/matrix_creator.templates.h | 15 ++++++++++----- .../numerics/vector_tools_boundary.templates.h | 18 ++++++++++++------ .../vector_tools_interpolate.templates.h | 3 ++- .../vector_tools_mean_value.templates.h | 8 ++++++-- .../vector_tools_point_gradient.templates.h | 6 ++++-- .../vector_tools_point_value.templates.h | 12 ++++++++---- .../numerics/vector_tools_project.templates.h | 2 +- .../numerics/vector_tools_rhs.templates.h | 3 ++- 11 files changed, 61 insertions(+), 29 deletions(-) diff --git a/include/deal.II/base/parsed_convergence_table.h b/include/deal.II/base/parsed_convergence_table.h index 5681e237c9..08b884bb88 100644 --- a/include/deal.II/base/parsed_convergence_table.h +++ b/include/deal.II/base/parsed_convergence_table.h @@ -527,8 +527,12 @@ ParsedConvergenceTable::error_from_exact(const DoFHandler &dh, const Function &exact, const Function *weight) { - error_from_exact( - StaticMappingQ1::mapping, dh, solution, exact, weight); + error_from_exact(ReferenceCell::get_default_linear_mapping( + dh.get_triangulation()), + dh, + solution, + exact, + weight); } diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index fe4cdfc292..23f8c234f0 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -2292,7 +2292,8 @@ namespace FETools q_points_coarse[q](j) = q_points_fine[q](j); Quadrature q_coarse(q_points_coarse, fine.get_JxW_values()); FEValues coarse( - StaticMappingQ1::mapping, + ReferenceCell::get_default_linear_mapping( + coarse_cell->reference_cell_type()), fe, q_coarse, update_values); diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index 5b72586f20..9bf3177bba 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -1055,7 +1055,8 @@ KellyErrorEstimator::estimate( const types::material_id material_id, const Strategy strategy) { - estimate(StaticMappingQ1::mapping, + estimate(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, quadrature, neumann_bc, @@ -1125,7 +1126,8 @@ KellyErrorEstimator::estimate( const types::material_id material_id, const Strategy strategy) { - estimate(StaticMappingQ1::mapping, + estimate(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, quadrature, neumann_bc, @@ -1370,7 +1372,8 @@ KellyErrorEstimator::estimate( const types::material_id material_id, const Strategy strategy) { - estimate(StaticMappingQ1::mapping, + estimate(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, quadrature, neumann_bc, @@ -1404,7 +1407,8 @@ KellyErrorEstimator::estimate( const types::material_id material_id, const Strategy strategy) { - estimate(StaticMappingQ1::mapping, + estimate(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, quadrature, neumann_bc, diff --git a/include/deal.II/numerics/matrix_creator.templates.h b/include/deal.II/numerics/matrix_creator.templates.h index 57f067889e..335d034179 100644 --- a/include/deal.II/numerics/matrix_creator.templates.h +++ b/include/deal.II/numerics/matrix_creator.templates.h @@ -689,7 +689,8 @@ namespace MatrixCreator const Function *const coefficient, const AffineConstraints & constraints) { - create_mass_matrix(StaticMappingQ1::mapping, + create_mass_matrix(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, q, matrix, @@ -766,7 +767,8 @@ namespace MatrixCreator const Function *const coefficient, const AffineConstraints & constraints) { - create_mass_matrix(StaticMappingQ1::mapping, + create_mass_matrix(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, q, matrix, @@ -1728,7 +1730,8 @@ namespace MatrixCreator const Function *const a, std::vector component_mapping) { - create_boundary_mass_matrix(StaticMappingQ1::mapping, + create_boundary_mass_matrix(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, q, matrix, @@ -1917,7 +1920,8 @@ namespace MatrixCreator const Function *const coefficient, const AffineConstraints &constraints) { - create_laplace_matrix(StaticMappingQ1::mapping, + create_laplace_matrix(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, q, matrix, @@ -1993,7 +1997,8 @@ namespace MatrixCreator const Function *const coefficient, const AffineConstraints &constraints) { - create_laplace_matrix(StaticMappingQ1::mapping, + create_laplace_matrix(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, q, matrix, diff --git a/include/deal.II/numerics/vector_tools_boundary.templates.h b/include/deal.II/numerics/vector_tools_boundary.templates.h index 18e5379abc..3ba3933fa6 100644 --- a/include/deal.II/numerics/vector_tools_boundary.templates.h +++ b/include/deal.II/numerics/vector_tools_boundary.templates.h @@ -466,7 +466,8 @@ namespace VectorTools std::map &boundary_values, const ComponentMask & component_mask) { - interpolate_boundary_values(StaticMappingQ1::mapping, + interpolate_boundary_values(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, boundary_component, boundary_function, @@ -485,7 +486,8 @@ namespace VectorTools std::map &boundary_values, const ComponentMask & component_mask) { - interpolate_boundary_values(StaticMappingQ1::mapping, + interpolate_boundary_values(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, function_map, boundary_values, @@ -598,7 +600,8 @@ namespace VectorTools AffineConstraints & constraints, const ComponentMask & component_mask) { - interpolate_boundary_values(StaticMappingQ1::mapping, + interpolate_boundary_values(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, boundary_component, boundary_function, @@ -617,7 +620,8 @@ namespace VectorTools AffineConstraints &constraints, const ComponentMask & component_mask) { - interpolate_boundary_values(StaticMappingQ1::mapping, + interpolate_boundary_values(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, function_map, constraints, @@ -883,7 +887,8 @@ namespace VectorTools std::map &boundary_values, std::vector component_mapping) { - project_boundary_values(StaticMappingQ1::mapping, + project_boundary_values(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, boundary_functions, q, @@ -973,7 +978,8 @@ namespace VectorTools AffineConstraints &constraints, std::vector component_mapping) { - project_boundary_values(StaticMappingQ1::mapping, + project_boundary_values(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, boundary_functions, q, diff --git a/include/deal.II/numerics/vector_tools_interpolate.templates.h b/include/deal.II/numerics/vector_tools_interpolate.templates.h index 235d6ee785..7edd39de41 100644 --- a/include/deal.II/numerics/vector_tools_interpolate.templates.h +++ b/include/deal.II/numerics/vector_tools_interpolate.templates.h @@ -531,7 +531,8 @@ namespace VectorTools VectorType & vec, const ComponentMask & component_mask) { - interpolate(StaticMappingQ1::mapping, + interpolate(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, function, vec, diff --git a/include/deal.II/numerics/vector_tools_mean_value.templates.h b/include/deal.II/numerics/vector_tools_mean_value.templates.h index 64f7dbe8fb..040013dac4 100644 --- a/include/deal.II/numerics/vector_tools_mean_value.templates.h +++ b/include/deal.II/numerics/vector_tools_mean_value.templates.h @@ -197,8 +197,12 @@ namespace VectorTools const VectorType & v, const unsigned int component) { - return compute_mean_value( - StaticMappingQ1::mapping, dof, quadrature, v, component); + return compute_mean_value(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), + dof, + quadrature, + v, + component); } } // namespace VectorTools diff --git a/include/deal.II/numerics/vector_tools_point_gradient.templates.h b/include/deal.II/numerics/vector_tools_point_gradient.templates.h index f9e373ed1b..961e967ac6 100644 --- a/include/deal.II/numerics/vector_tools_point_gradient.templates.h +++ b/include/deal.II/numerics/vector_tools_point_gradient.templates.h @@ -49,7 +49,8 @@ namespace VectorTools &gradients) { if (dof.has_hp_capabilities() == false) - point_gradient(StaticMappingQ1::mapping, + point_gradient(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, fe_function, point, @@ -70,7 +71,8 @@ namespace VectorTools const Point & point) { if (dof.has_hp_capabilities() == false) - return point_gradient(StaticMappingQ1::mapping, + return point_gradient(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, fe_function, point); diff --git a/include/deal.II/numerics/vector_tools_point_value.templates.h b/include/deal.II/numerics/vector_tools_point_value.templates.h index f771017d8f..038f0fbbdf 100644 --- a/include/deal.II/numerics/vector_tools_point_value.templates.h +++ b/include/deal.II/numerics/vector_tools_point_value.templates.h @@ -48,7 +48,8 @@ namespace VectorTools Vector &value) { if (dof.has_hp_capabilities() == false) - point_value(StaticMappingQ1::mapping, + point_value(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, fe_function, point, @@ -69,7 +70,8 @@ namespace VectorTools const Point & point) { if (dof.has_hp_capabilities() == false) - return point_value(StaticMappingQ1::mapping, + return point_value(ReferenceCell::get_default_linear_mapping( + dof.get_triangulation()), dof, fe_function, point); @@ -323,7 +325,8 @@ namespace VectorTools p, rhs_vector); else - create_point_source_vector(StaticMappingQ1::mapping, + create_point_source_vector(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, p, rhs_vector); @@ -429,7 +432,8 @@ namespace VectorTools orientation, rhs_vector); else - create_point_source_vector(StaticMappingQ1::mapping, + create_point_source_vector(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, p, orientation, diff --git a/include/deal.II/numerics/vector_tools_project.templates.h b/include/deal.II/numerics/vector_tools_project.templates.h index a1d2a568c4..3fdf7a4d6f 100644 --- a/include/deal.II/numerics/vector_tools_project.templates.h +++ b/include/deal.II/numerics/vector_tools_project.templates.h @@ -887,7 +887,7 @@ namespace VectorTools ExcMessage("Please specify the mapping explicitly " "when building with MSVC!")); #else - project(StaticMappingQ1::mapping, + project(ReferenceCell::get_default_linear_mapping(dof.get_triangulation()), dof, constraints, quadrature, diff --git a/include/deal.II/numerics/vector_tools_rhs.templates.h b/include/deal.II/numerics/vector_tools_rhs.templates.h index 96fe8feb5d..d288a91097 100644 --- a/include/deal.II/numerics/vector_tools_rhs.templates.h +++ b/include/deal.II/numerics/vector_tools_rhs.templates.h @@ -470,7 +470,8 @@ namespace VectorTools VectorType & rhs_vector, const AffineConstraints & constraints) { - create_right_hand_side(StaticMappingQ1::mapping, + create_right_hand_side(ReferenceCell::get_default_linear_mapping( + dof_handler.get_triangulation()), dof_handler, quadrature, rhs_function, -- 2.39.5