From 5f0a2d27841200e9fc873b0aed0915651287b30c Mon Sep 17 00:00:00 2001 From: hartmann Date: Mon, 26 May 2008 09:49:04 +0000 Subject: [PATCH] Use StaticMappingQ1::mapping instead of locally created static MappingQ1 objects. This closes a TODO. git-svn-id: https://svn.dealii.org/trunk@16210 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/numerics/vectors.templates.h | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index c13049b865..afabd9eb88 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -46,7 +46,7 @@ DEAL_II_NAMESPACE_OPEN -//TODO[RH]: Use StaticMappingQ1 where appropriate + template void VectorTools::interpolate (const Mapping &mapping, @@ -248,8 +248,7 @@ void VectorTools::interpolate (const DH &dof, VECTOR &vec) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); - static const MappingQ1 mapping; - interpolate(mapping, dof, function, vec); + interpolate(StaticMappingQ1::mapping, dof, function, vec); } @@ -495,8 +494,7 @@ void VectorTools::project (const DoFHandler &dof, const bool project_to_boundary_first) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); - static const MappingQ1 mapping; - project(mapping, dof, constraints, quadrature, function, vec, + project(StaticMappingQ1::mapping, dof, constraints, quadrature, function, vec, enforce_zero_boundary, q_boundary, project_to_boundary_first); } @@ -1634,8 +1632,7 @@ VectorTools::interpolate_boundary_values (const DH &dof, const std::vector &component_mask) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); - static const MappingQ1 mapping; - interpolate_boundary_values(mapping, dof, boundary_component, + interpolate_boundary_values(StaticMappingQ1::mapping, dof, boundary_component, boundary_function, boundary_values, component_mask); } @@ -1649,8 +1646,7 @@ VectorTools::interpolate_boundary_values (const DH &dof, const std::vector &component_mask) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); - static const MappingQ1 mapping; - interpolate_boundary_values(mapping, dof, function_map, + interpolate_boundary_values(StaticMappingQ1::mapping, dof, function_map, boundary_values, component_mask); } @@ -1831,8 +1827,7 @@ VectorTools::project_boundary_values (const DoFHandler &dof, std::map &boundary_values) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); - static const MappingQ1 mapping; - project_boundary_values(mapping, dof, boundary_functions, q, boundary_values); + project_boundary_values(StaticMappingQ1::mapping, dof, boundary_functions, q, boundary_values); } @@ -3238,8 +3233,7 @@ VectorTools::compute_mean_value (const DoFHandler &dof, const unsigned int component) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); - static const MappingQ1 mapping; - return compute_mean_value(mapping, dof, quadrature, v, component); + return compute_mean_value(StaticMappingQ1::mapping, dof, quadrature, v, component); } DEAL_II_NAMESPACE_CLOSE -- 2.39.5