From: hartmann Date: Mon, 26 May 2008 09:49:04 +0000 (+0000) Subject: Use StaticMappingQ1::mapping instead of locally created static MappingQ1 objects... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f0a2d27841200e9fc873b0aed0915651287b30c;p=dealii-svn.git 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 --- 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