From c1832f77afa29ff2a5466a6d9e55381834d400b6 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 5 Jun 2020 18:28:12 -0400 Subject: [PATCH] Remove ZeroFunction and ConstantFunction without prefix --- examples/step-12/step-12.cc | 2 +- examples/step-70/step-70.cc | 2 +- include/deal.II/base/function.h | 22 +---- include/deal.II/base/function.templates.h | 13 +-- .../deal.II/base/parsed_convergence_table.h | 4 +- .../vector_tools_constraints.templates.h | 4 +- .../step-44-helper_res_lin_01.h | 28 +++--- .../step-44-helper_scalar_01.h | 28 +++--- .../step-44-helper_var_form_01.h | 28 +++--- .../step-44-helper_vector_01.h | 28 +++--- tests/adolc/step-44.cc | 28 +++--- .../data_out_postprocessor_vector_03.cc | 2 +- tests/fe/fe_enriched_color_04.cc | 2 +- tests/fe/fe_enriched_color_05.cc | 2 +- tests/fe/fe_enriched_color_06.cc | 2 +- tests/fe/fe_enriched_color_07.cc | 4 +- tests/fe/fe_enriched_color_08.cc | 2 +- tests/fe/fe_faceq_interpolate.cc | 4 +- tests/fe/fe_nedelec_singularity_01.cc | 2 +- tests/fe/fe_nedelec_singularity_02.cc | 2 +- tests/fe/fe_traceq_interpolate.cc | 4 +- tests/matrix_free/loop_boundary_02.cc | 2 +- tests/matrix_free/matrix_vector_24.cc | 2 +- tests/matrix_free/multigrid_dg_sip_01.cc | 2 +- tests/matrix_free/multigrid_dg_sip_02.cc | 2 +- .../parallel_multigrid_adaptive_06.cc | 2 +- .../parallel_multigrid_adaptive_06ref.cc | 2 +- .../parallel_multigrid_adaptive_07.cc | 2 +- tests/matrix_free/pre_and_post_loops_02.cc | 2 +- tests/meshworker/step-11-mesh_loop.cc | 10 +- tests/mpi/constraints_consistent_01.cc | 2 +- tests/mpi/interpolate_05.cc | 4 +- tests/mpi/solution_transfer_05.cc | 4 +- tests/multigrid/transfer_05.cc | 2 +- tests/multigrid/transfer_06.cc | 2 +- .../transfer_matrix_free_02_block.cc | 2 +- .../transfer_matrix_free_02_block_02.cc | 2 +- .../numerics/generalized_interpolation_02.cc | 92 ++++++++++++++----- tests/optimization/step-44.h | 28 +++--- tests/particles/particle_interpolation_01.cc | 2 +- tests/particles/particle_interpolation_02.cc | 2 +- tests/particles/particle_interpolation_03.cc | 2 +- .../step-44-sd-quadrature_level.h | 28 +++--- .../integrate_difference_02_nan.cc | 2 +- tests/vector_tools/integrate_difference_05.cc | 4 +- 45 files changed, 224 insertions(+), 193 deletions(-) diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index d3789e677d..a737c32530 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -557,7 +557,7 @@ namespace Step12 Vector values(triangulation.n_active_cells()); VectorTools::integrate_difference(dof_handler, solution, - ZeroFunction(), + Functions::ZeroFunction(), values, QGauss(fe.degree + 1), VectorTools::Linfty_norm); diff --git a/examples/step-70/step-70.cc b/examples/step-70/step-70.cc index a506e73536..dbadf946e4 100644 --- a/examples/step-70/step-70.cc +++ b/examples/step-70/step-70.cc @@ -1292,7 +1292,7 @@ namespace Step70 VectorTools::interpolate_boundary_values( fluid_dh, 0, - ZeroFunction(spacedim + 1), + Functions::ZeroFunction(spacedim + 1), constraints, fluid_fe->component_mask(velocities)); constraints.close(); diff --git a/include/deal.II/base/function.h b/include/deal.II/base/function.h index 23f38930d6..3fed52cf6b 100644 --- a/include/deal.II/base/function.h +++ b/include/deal.II/base/function.h @@ -518,25 +518,6 @@ namespace Functions } // namespace Functions -/** - * Provide a function which always returns the constant values handed to the - * constructor. - * - * @deprecated use Functions::ConstantFunction instead. - */ -template -using ConstantFunction DEAL_II_DEPRECATED = - Functions::ConstantFunction; - -/** - * Provide a function which always returns zero. - * - * @deprecated use Functions::ZeroFunction instead. - */ -template -using ZeroFunction DEAL_II_DEPRECATED = - Functions::ZeroFunction; - /** @@ -553,7 +534,8 @@ using ZeroFunction DEAL_II_DEPRECATED = * @ingroup functions */ template -class ComponentSelectFunction : public ConstantFunction +class ComponentSelectFunction + : public Functions::ConstantFunction { public: /** diff --git a/include/deal.II/base/function.templates.h b/include/deal.II/base/function.templates.h index 8ac10ae560..24933e819c 100644 --- a/include/deal.II/base/function.templates.h +++ b/include/deal.II/base/function.templates.h @@ -539,7 +539,7 @@ ComponentSelectFunction::ComponentSelectFunction( const unsigned int selected, const RangeNumberType value, const unsigned int n_components) - : ConstantFunction(value, n_components) + : Functions::ConstantFunction(value, n_components) , selected_components(std::make_pair(selected, selected + 1)) {} @@ -549,7 +549,7 @@ template ComponentSelectFunction::ComponentSelectFunction( const unsigned int selected, const unsigned int n_components) - : ConstantFunction(1., n_components) + : Functions::ConstantFunction(1., n_components) , selected_components(std::make_pair(selected, selected + 1)) { AssertIndexRange(selected, n_components); @@ -561,7 +561,7 @@ template ComponentSelectFunction::ComponentSelectFunction( const std::pair &selected, const unsigned int n_components) - : ConstantFunction(1., n_components) + : Functions::ConstantFunction(1., n_components) , selected_components(selected) { Assert(selected_components.first < selected_components.second, @@ -577,7 +577,7 @@ ComponentSelectFunction::ComponentSelectFunction( template void ComponentSelectFunction::substitute_function_value_with( - const ConstantFunction &f) + const Functions::ConstantFunction &f) { Point p; for (unsigned int i = 0; i < this->function_value_vector.size(); ++i) @@ -626,8 +626,9 @@ ComponentSelectFunction::memory_consumption() const // No new complex data structure is introduced here, just evaluate how much // more memory is used *inside* the class via sizeof() and add that value to // parent class's memory_consumption() - return (sizeof(*this) - sizeof(ConstantFunction) + - ConstantFunction::memory_consumption()); + return ( + sizeof(*this) - sizeof(Functions::ConstantFunction) + + Functions::ConstantFunction::memory_consumption()); } //--------------------------------------------------------------------------- diff --git a/include/deal.II/base/parsed_convergence_table.h b/include/deal.II/base/parsed_convergence_table.h index a00dff2b14..9851303783 100644 --- a/include/deal.II/base/parsed_convergence_table.h +++ b/include/deal.II/base/parsed_convergence_table.h @@ -496,7 +496,7 @@ ParsedConvergenceTable::difference( solution -= solution2; error_from_exact(dh, solution, - ConstantFunction( + Functions::ConstantFunction( 0, component_names.size()), weight); } @@ -520,7 +520,7 @@ ParsedConvergenceTable::difference( error_from_exact(mapping, dh, solution, - ConstantFunction( + Functions::ConstantFunction( 0, component_names.size()), weight); } diff --git a/include/deal.II/numerics/vector_tools_constraints.templates.h b/include/deal.II/numerics/vector_tools_constraints.templates.h index a3057fdfa9..8fcc6c45f9 100644 --- a/include/deal.II/numerics/vector_tools_constraints.templates.h +++ b/include/deal.II/numerics/vector_tools_constraints.templates.h @@ -1267,7 +1267,7 @@ namespace VectorTools AffineConstraints & constraints, const Mapping & mapping) { - ZeroFunction zero_function(dim); + Functions::ZeroFunction zero_function(dim); std::map *> function_map; for (const types::boundary_id boundary_id : boundary_ids) function_map[boundary_id] = &zero_function; @@ -1288,7 +1288,7 @@ namespace VectorTools AffineConstraints & constraints, const Mapping & mapping) { - ZeroFunction zero_function(dim); + Functions::ZeroFunction zero_function(dim); std::map *> function_map; for (const types::boundary_id boundary_id : boundary_ids) function_map[boundary_id] = &zero_function; diff --git a/tests/ad_common_tests/step-44-helper_res_lin_01.h b/tests/ad_common_tests/step-44-helper_res_lin_01.h index 32472e508e..1ec0a5903b 100644 --- a/tests/ad_common_tests/step-44-helper_res_lin_01.h +++ b/tests/ad_common_tests/step-44-helper_res_lin_01.h @@ -1342,14 +1342,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1359,14 +1359,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1379,7 +1379,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1387,7 +1387,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1398,14 +1398,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1415,7 +1415,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1423,7 +1423,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1437,14 +1437,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1454,14 +1454,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/ad_common_tests/step-44-helper_scalar_01.h b/tests/ad_common_tests/step-44-helper_scalar_01.h index e8f1ac25f3..e643e8e18f 100644 --- a/tests/ad_common_tests/step-44-helper_scalar_01.h +++ b/tests/ad_common_tests/step-44-helper_scalar_01.h @@ -1874,14 +1874,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1891,14 +1891,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1911,7 +1911,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1919,7 +1919,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1930,14 +1930,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1947,7 +1947,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1955,7 +1955,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1969,14 +1969,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1986,14 +1986,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/ad_common_tests/step-44-helper_var_form_01.h b/tests/ad_common_tests/step-44-helper_var_form_01.h index 235d350314..f3e25ab0cd 100644 --- a/tests/ad_common_tests/step-44-helper_var_form_01.h +++ b/tests/ad_common_tests/step-44-helper_var_form_01.h @@ -1268,14 +1268,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1285,14 +1285,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1305,7 +1305,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1313,7 +1313,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1324,14 +1324,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1341,7 +1341,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1349,7 +1349,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1363,14 +1363,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1380,14 +1380,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/ad_common_tests/step-44-helper_vector_01.h b/tests/ad_common_tests/step-44-helper_vector_01.h index 72cd94e899..4907f3caf9 100644 --- a/tests/ad_common_tests/step-44-helper_vector_01.h +++ b/tests/ad_common_tests/step-44-helper_vector_01.h @@ -1361,14 +1361,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1378,14 +1378,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1398,7 +1398,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1406,7 +1406,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1417,14 +1417,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1434,7 +1434,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1442,7 +1442,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1456,14 +1456,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1473,14 +1473,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/adolc/step-44.cc b/tests/adolc/step-44.cc index cd70429a42..5f2f2e9cc3 100644 --- a/tests/adolc/step-44.cc +++ b/tests/adolc/step-44.cc @@ -1683,14 +1683,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1700,14 +1700,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1720,7 +1720,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1728,7 +1728,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1739,14 +1739,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1756,7 +1756,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1764,7 +1764,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1778,14 +1778,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1795,14 +1795,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/data_out/data_out_postprocessor_vector_03.cc b/tests/data_out/data_out_postprocessor_vector_03.cc index b7478e7882..865922380f 100644 --- a/tests/data_out/data_out_postprocessor_vector_03.cc +++ b/tests/data_out/data_out_postprocessor_vector_03.cc @@ -140,7 +140,7 @@ Step6::setup_system() VectorTools::interpolate_boundary_values(dof_handler, 0, - ZeroFunction(), + Functions::ZeroFunction(), constraints); diff --git a/tests/fe/fe_enriched_color_04.cc b/tests/fe/fe_enriched_color_04.cc index f6d37ddb3b..9382e49eef 100644 --- a/tests/fe/fe_enriched_color_04.cc +++ b/tests/fe/fe_enriched_color_04.cc @@ -130,7 +130,7 @@ main(int argc, char **argv) for (unsigned int i = 0; i < vec_predicates.size(); ++i) { // constant function is chosen as enrichment function - ConstantFunction func(i); + Functions::ConstantFunction func(i); vec_enrichments.push_back(std::make_shared>(func)); } diff --git a/tests/fe/fe_enriched_color_05.cc b/tests/fe/fe_enriched_color_05.cc index eae155c118..8146c41558 100644 --- a/tests/fe/fe_enriched_color_05.cc +++ b/tests/fe/fe_enriched_color_05.cc @@ -202,7 +202,7 @@ main(int argc, char **argv) for (unsigned int i = 0; i < vec_predicates.size(); ++i) { // constant function. - ConstantFunction func(10 + i); // constant function + Functions::ConstantFunction func(10 + i); // constant function vec_enrichments.push_back(std::make_shared>(func)); } diff --git a/tests/fe/fe_enriched_color_06.cc b/tests/fe/fe_enriched_color_06.cc index f286446711..ab58a9b6c4 100644 --- a/tests/fe/fe_enriched_color_06.cc +++ b/tests/fe/fe_enriched_color_06.cc @@ -114,7 +114,7 @@ main(int argc, char **argv) for (unsigned int i = 0; i < vec_predicates.size(); ++i) { // constant function. - ConstantFunction func(10 + i); // constant function + Functions::ConstantFunction func(10 + i); // constant function vec_enrichments.push_back(std::make_shared>(func)); } diff --git a/tests/fe/fe_enriched_color_07.cc b/tests/fe/fe_enriched_color_07.cc index 95ed99be2b..700c17d826 100644 --- a/tests/fe/fe_enriched_color_07.cc +++ b/tests/fe/fe_enriched_color_07.cc @@ -1304,7 +1304,7 @@ LaplaceProblem::make_enrichment_functions() else { pcout << "Dummy function added at " << i << std::endl; - ConstantFunction func(0); + Functions::ConstantFunction func(0); vec_enrichments.push_back( std::make_shared>(func)); } @@ -1778,7 +1778,7 @@ LaplaceProblem::run() Vector difference_per_cell(triangulation.n_active_cells()); VectorTools::integrate_difference(dof_handler, localized_solution, - ZeroFunction(), + Functions::ZeroFunction(), difference_per_cell, q_collection, VectorTools::H1_norm); diff --git a/tests/fe/fe_enriched_color_08.cc b/tests/fe/fe_enriched_color_08.cc index 99e90d1d66..e28792df6e 100644 --- a/tests/fe/fe_enriched_color_08.cc +++ b/tests/fe/fe_enriched_color_08.cc @@ -242,7 +242,7 @@ main(int argc, char **argv) for (unsigned int i = 0; i < vec_predicates.size(); ++i) { // constant function. - ConstantFunction func(10 + i); // constant function + Functions::ConstantFunction func(10 + i); // constant function vec_enrichments.push_back(std::make_shared>(func)); } diff --git a/tests/fe/fe_faceq_interpolate.cc b/tests/fe/fe_faceq_interpolate.cc index 8ccbaa22f3..9960d89706 100644 --- a/tests/fe/fe_faceq_interpolate.cc +++ b/tests/fe/fe_faceq_interpolate.cc @@ -42,7 +42,9 @@ test() dof_handler.distribute_dofs(fe); Vector solution(dof_handler.n_dofs()); - VectorTools::interpolate(dof_handler, ZeroFunction(), solution); + VectorTools::interpolate(dof_handler, + Functions::ZeroFunction(), + solution); deallog << "Success, dim = " << dim << std::endl; } diff --git a/tests/fe/fe_nedelec_singularity_01.cc b/tests/fe/fe_nedelec_singularity_01.cc index 244fd822f9..61bc4cf1af 100644 --- a/tests/fe/fe_nedelec_singularity_01.cc +++ b/tests/fe/fe_nedelec_singularity_01.cc @@ -391,7 +391,7 @@ namespace nedelec_singularity VectorTools::project_boundary_values_curl_conforming_l2( dof_handler, first_vector_component, - ZeroFunction>(dim), + Functions::ZeroFunction>(dim), 0, constraints); diff --git a/tests/fe/fe_nedelec_singularity_02.cc b/tests/fe/fe_nedelec_singularity_02.cc index ac12fad6e3..7540704502 100644 --- a/tests/fe/fe_nedelec_singularity_02.cc +++ b/tests/fe/fe_nedelec_singularity_02.cc @@ -381,7 +381,7 @@ namespace nedelec_singularity VectorTools::project_boundary_values_curl_conforming_l2( dof_handler, first_vector_component, - ZeroFunction(dim), + Functions::ZeroFunction(dim), 0, constraints); diff --git a/tests/fe/fe_traceq_interpolate.cc b/tests/fe/fe_traceq_interpolate.cc index d0c9c28a17..3802e48dc6 100644 --- a/tests/fe/fe_traceq_interpolate.cc +++ b/tests/fe/fe_traceq_interpolate.cc @@ -42,7 +42,9 @@ test() dof_handler.distribute_dofs(fe); Vector solution(dof_handler.n_dofs()); - VectorTools::interpolate(dof_handler, ZeroFunction(), solution); + VectorTools::interpolate(dof_handler, + Functions::ZeroFunction(), + solution); deallog << "Success, dim = " << dim << std::endl; } diff --git a/tests/matrix_free/loop_boundary_02.cc b/tests/matrix_free/loop_boundary_02.cc index 08a6921e98..1736158ed5 100644 --- a/tests/matrix_free/loop_boundary_02.cc +++ b/tests/matrix_free/loop_boundary_02.cc @@ -50,7 +50,7 @@ do_test(const unsigned int n_refine) AffineConstraints constraints; VectorTools::interpolate_boundary_values(dof_handler, 0, - ZeroFunction(), + Functions::ZeroFunction(), constraints); constraints.close(); diff --git a/tests/matrix_free/matrix_vector_24.cc b/tests/matrix_free/matrix_vector_24.cc index 1580fba470..9791a65823 100644 --- a/tests/matrix_free/matrix_vector_24.cc +++ b/tests/matrix_free/matrix_vector_24.cc @@ -89,7 +89,7 @@ test() AffineConstraints constraints; VectorTools::interpolate_boundary_values(dof, 0, - ZeroFunction(), + Functions::ZeroFunction(), constraints); constraints.close(); diff --git a/tests/matrix_free/multigrid_dg_sip_01.cc b/tests/matrix_free/multigrid_dg_sip_01.cc index a9bf1af70d..46f0199226 100644 --- a/tests/matrix_free/multigrid_dg_sip_01.cc +++ b/tests/matrix_free/multigrid_dg_sip_01.cc @@ -594,7 +594,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) mg_smoother.initialize(mg_matrices, smoother_data); MGConstrainedDoFs mg_constrained_dofs; - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; mg_constrained_dofs.initialize(dof, dirichlet_boundary); diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index be085448be..93bb327e3c 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -501,7 +501,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) mg_smoother.initialize(mg_matrices, smoother_data); MGConstrainedDoFs mg_constrained_dofs; - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; mg_constrained_dofs.initialize(dof, dirichlet_boundary); diff --git a/tests/matrix_free/parallel_multigrid_adaptive_06.cc b/tests/matrix_free/parallel_multigrid_adaptive_06.cc index 7a4c44875d..c7035df983 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_06.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_06.cc @@ -224,7 +224,7 @@ do_test(const DoFHandler &dof, const unsigned int nb) DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs); // Dirichlet BC - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; diff --git a/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc b/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc index 9b70723a72..27c3755119 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc @@ -140,7 +140,7 @@ do_test(const DoFHandler &dof) DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs); // Dirichlet BC - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; diff --git a/tests/matrix_free/parallel_multigrid_adaptive_07.cc b/tests/matrix_free/parallel_multigrid_adaptive_07.cc index 62370ce383..90413c81fb 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_07.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_07.cc @@ -243,7 +243,7 @@ do_test(const std::vector *> &dof) DoFTools::extract_locally_relevant_dofs(*dof[i], locally_relevant_dofs[i]); // Dirichlet BC - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; diff --git a/tests/matrix_free/pre_and_post_loops_02.cc b/tests/matrix_free/pre_and_post_loops_02.cc index 8f3f745a29..28bc8354a9 100644 --- a/tests/matrix_free/pre_and_post_loops_02.cc +++ b/tests/matrix_free/pre_and_post_loops_02.cc @@ -146,7 +146,7 @@ test() constraints.reinit(relevant_dofs); VectorTools::interpolate_boundary_values(dof, 0, - ZeroFunction(), + Functions::ZeroFunction(), constraints); constraints.close(); diff --git a/tests/meshworker/step-11-mesh_loop.cc b/tests/meshworker/step-11-mesh_loop.cc index dba49fa217..2e4584a373 100644 --- a/tests/meshworker/step-11-mesh_loop.cc +++ b/tests/meshworker/step-11-mesh_loop.cc @@ -238,8 +238,8 @@ namespace Step11 scratch_data.fe_values.reinit(cell); - std::vector rhs_values(n_q_points); - ConstantFunction right_hand_side(-2.0); + std::vector rhs_values(n_q_points); + Functions::ConstantFunction right_hand_side(-2.0); right_hand_side.value_list(scratch_data.fe_values.get_quadrature_points(), rhs_values); @@ -269,8 +269,8 @@ namespace Step11 const unsigned int n_face_q_points = scratch_data.fe_face_values.get_quadrature().size(); - std::vector face_boundary_values(n_face_q_points); - ConstantFunction boundary_values(1.0); + std::vector face_boundary_values(n_face_q_points); + Functions::ConstantFunction boundary_values(1.0); scratch_data.fe_face_values.reinit(cell, face_no); boundary_values.value_list( @@ -333,7 +333,7 @@ namespace Step11 VectorTools::integrate_difference(mapping, dof_handler, solution, - ZeroFunction(), + Functions::ZeroFunction(), norm_per_cell, QGauss(gauss_degree + 1), VectorTools::H1_seminorm); diff --git a/tests/mpi/constraints_consistent_01.cc b/tests/mpi/constraints_consistent_01.cc index e96bd94392..a72cd12c04 100644 --- a/tests/mpi/constraints_consistent_01.cc +++ b/tests/mpi/constraints_consistent_01.cc @@ -68,7 +68,7 @@ check(parallel::distributed::Triangulation &tria) dealii::VectorTools::interpolate_boundary_values( dof_handler, id, - ConstantFunction(static_cast(id) + 42.0, dim), + Functions::ConstantFunction(static_cast(id) + 42.0, dim), constraints); VectorTools::compute_no_normal_flux_constraints(dof_handler, diff --git a/tests/mpi/interpolate_05.cc b/tests/mpi/interpolate_05.cc index c19bbb5e02..e25f9d1ce5 100644 --- a/tests/mpi/interpolate_05.cc +++ b/tests/mpi/interpolate_05.cc @@ -110,8 +110,8 @@ test() // Integrate the difference in the second component. Since we did not // interpolate the function into the finite element space, this should be - // equal to the integral of the ConstantFunction (=1) over the domain (unit - // square/cube). Thus the integral should be one. + // equal to the integral of the Functions::ConstantFunction (=1) over the + // domain (unit square/cube). Thus the integral should be one. VectorTools::integrate_difference(dofh, x_rel, Functions::ConstantFunction(1, 2), diff --git a/tests/mpi/solution_transfer_05.cc b/tests/mpi/solution_transfer_05.cc index 4562050e78..6a2894e170 100644 --- a/tests/mpi/solution_transfer_05.cc +++ b/tests/mpi/solution_transfer_05.cc @@ -77,7 +77,9 @@ test() // prepare dof_values LinearAlgebra::distributed::Vector dgq_solution; dgq_solution.reinit(dgq_locally_owned_dofs, dgq_ghost_dofs, MPI_COMM_WORLD); - VectorTools::interpolate(dgq_dof_handler, ZeroFunction(), dgq_solution); + VectorTools::interpolate(dgq_dof_handler, + Functions::ZeroFunction(), + dgq_solution); dgq_solution.update_ghost_values(); parallel::distributed::SolutionTransfer< diff --git a/tests/multigrid/transfer_05.cc b/tests/multigrid/transfer_05.cc index ec5447a9b3..a720505812 100644 --- a/tests/multigrid/transfer_05.cc +++ b/tests/multigrid/transfer_05.cc @@ -106,7 +106,7 @@ check(const unsigned int fe_degree) mgdof.distribute_mg_dofs(); MGConstrainedDoFs mg_constrained_dofs; - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; mg_constrained_dofs.initialize(mgdof, dirichlet_boundary); diff --git a/tests/multigrid/transfer_06.cc b/tests/multigrid/transfer_06.cc index 45116064f1..3ceceec179 100644 --- a/tests/multigrid/transfer_06.cc +++ b/tests/multigrid/transfer_06.cc @@ -118,7 +118,7 @@ check(const unsigned int fe_degree) const std::vector *> mgdof_ptr{&mgdof_1, &mgdof_2}; std::vector mg_constrained_dofs_vector(2); - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; for (unsigned int i = 0; i < mgdof_ptr.size(); ++i) diff --git a/tests/multigrid/transfer_matrix_free_02_block.cc b/tests/multigrid/transfer_matrix_free_02_block.cc index 80bc808435..11058c2c17 100644 --- a/tests/multigrid/transfer_matrix_free_02_block.cc +++ b/tests/multigrid/transfer_matrix_free_02_block.cc @@ -101,7 +101,7 @@ check(const unsigned int fe_degree) mgdof.distribute_mg_dofs(); MGConstrainedDoFs mg_constrained_dofs; - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; mg_constrained_dofs.initialize(mgdof, dirichlet_boundary); diff --git a/tests/multigrid/transfer_matrix_free_02_block_02.cc b/tests/multigrid/transfer_matrix_free_02_block_02.cc index 401f463a0e..ed9b210c99 100644 --- a/tests/multigrid/transfer_matrix_free_02_block_02.cc +++ b/tests/multigrid/transfer_matrix_free_02_block_02.cc @@ -112,7 +112,7 @@ check(const unsigned int fe_degree) const std::vector *> mgdof_ptr{&mgdof_1, &mgdof_2}; std::vector mg_constrained_dofs_vector(2); - ZeroFunction zero_function; + Functions::ZeroFunction zero_function; std::map *> dirichlet_boundary; dirichlet_boundary[0] = &zero_function; for (unsigned int i = 0; i < mgdof_ptr.size(); ++i) diff --git a/tests/numerics/generalized_interpolation_02.cc b/tests/numerics/generalized_interpolation_02.cc index d148a13835..ab6073e8b1 100644 --- a/tests/numerics/generalized_interpolation_02.cc +++ b/tests/numerics/generalized_interpolation_02.cc @@ -30,31 +30,73 @@ main() { initlog(); - test<2>(FE_Q<2>(1), ConstantFunction<2>(1.0, 1), 1, false, true); - test<2>(FE_Q<2>(2), ConstantFunction<2>(1.0, 1), 2, false, true); - test<3>(FE_Q<3>(3), ConstantFunction<3>(1.0, 1), 3, false, true); - - test<2>(FE_Q<2>(1), ConstantFunction<2>(1.0, 1), 1, true, true); - test<2>(FE_Q<2>(2), ConstantFunction<2>(1.0, 1), 2, true, true); - test<3>(FE_Q<3>(3), ConstantFunction<3>(1.0, 1), 3, true, true); - - test<2>(FE_RaviartThomas<2>(0), ConstantFunction<2>(1.0, 2), 1, false, true); - test<2>(FE_RaviartThomas<2>(1), ConstantFunction<2>(1.0, 2), 2, false, true); - test<2>(FE_RaviartThomas<2>(2), ConstantFunction<2>(1.0, 2), 3, false, true); - test<3>(FE_RaviartThomas<3>(0), ConstantFunction<3>(1.0, 3), 1, false, true); - test<3>(FE_RaviartThomas<3>(1), ConstantFunction<3>(1.0, 3), 2, false, true); - - test<2>(FE_RaviartThomas<2>(0), ConstantFunction<2>(1.0, 2), 1, true, true); - test<2>(FE_RaviartThomas<2>(1), ConstantFunction<2>(1.0, 2), 2, true, true); - test<2>(FE_RaviartThomas<2>(2), ConstantFunction<2>(1.0, 2), 3, true, true); + test<2>(FE_Q<2>(1), Functions::ConstantFunction<2>(1.0, 1), 1, false, true); + test<2>(FE_Q<2>(2), Functions::ConstantFunction<2>(1.0, 1), 2, false, true); + test<3>(FE_Q<3>(3), Functions::ConstantFunction<3>(1.0, 1), 3, false, true); + + test<2>(FE_Q<2>(1), Functions::ConstantFunction<2>(1.0, 1), 1, true, true); + test<2>(FE_Q<2>(2), Functions::ConstantFunction<2>(1.0, 1), 2, true, true); + test<3>(FE_Q<3>(3), Functions::ConstantFunction<3>(1.0, 1), 3, true, true); + + test<2>(FE_RaviartThomas<2>(0), + Functions::ConstantFunction<2>(1.0, 2), + 1, + false, + true); + test<2>(FE_RaviartThomas<2>(1), + Functions::ConstantFunction<2>(1.0, 2), + 2, + false, + true); + test<2>(FE_RaviartThomas<2>(2), + Functions::ConstantFunction<2>(1.0, 2), + 3, + false, + true); + test<3>(FE_RaviartThomas<3>(0), + Functions::ConstantFunction<3>(1.0, 3), + 1, + false, + true); + test<3>(FE_RaviartThomas<3>(1), + Functions::ConstantFunction<3>(1.0, 3), + 2, + false, + true); + + test<2>(FE_RaviartThomas<2>(0), + Functions::ConstantFunction<2>(1.0, 2), + 1, + true, + true); + test<2>(FE_RaviartThomas<2>(1), + Functions::ConstantFunction<2>(1.0, 2), + 2, + true, + true); + test<2>(FE_RaviartThomas<2>(2), + Functions::ConstantFunction<2>(1.0, 2), + 3, + true, + true); // lowest order RT in 3D does not contain constant 1 function on a // distorted mesh. - test<3>(FE_RaviartThomas<3>(1), ConstantFunction<3>(1.0, 3), 2, true, true); - - test<2>(FE_Nedelec<2>(0), ConstantFunction<2>(1.0, 2), 1, false, true); - test<2>(FE_Nedelec<2>(1), ConstantFunction<2>(1.0, 2), 2, false, true); - test<2>(FE_Nedelec<2>(2), ConstantFunction<2>(1.0, 2), 3, false, true); - test<2>(FE_Nedelec<2>(0), ConstantFunction<2>(1.0, 2), 1, true, true); - test<2>(FE_Nedelec<2>(1), ConstantFunction<2>(1.0, 2), 2, true, true); - test<2>(FE_Nedelec<2>(2), ConstantFunction<2>(1.0, 2), 3, true, true); + test<3>(FE_RaviartThomas<3>(1), + Functions::ConstantFunction<3>(1.0, 3), + 2, + true, + true); + + test<2>( + FE_Nedelec<2>(0), Functions::ConstantFunction<2>(1.0, 2), 1, false, true); + test<2>( + FE_Nedelec<2>(1), Functions::ConstantFunction<2>(1.0, 2), 2, false, true); + test<2>( + FE_Nedelec<2>(2), Functions::ConstantFunction<2>(1.0, 2), 3, false, true); + test<2>( + FE_Nedelec<2>(0), Functions::ConstantFunction<2>(1.0, 2), 1, true, true); + test<2>( + FE_Nedelec<2>(1), Functions::ConstantFunction<2>(1.0, 2), 2, true, true); + test<2>( + FE_Nedelec<2>(2), Functions::ConstantFunction<2>(1.0, 2), 3, true, true); } diff --git a/tests/optimization/step-44.h b/tests/optimization/step-44.h index 1098160592..dfce5daaeb 100644 --- a/tests/optimization/step-44.h +++ b/tests/optimization/step-44.h @@ -1851,14 +1851,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1868,14 +1868,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1888,7 +1888,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1896,7 +1896,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1907,14 +1907,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1924,7 +1924,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1932,7 +1932,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1946,14 +1946,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1963,14 +1963,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/particles/particle_interpolation_01.cc b/tests/particles/particle_interpolation_01.cc index a27b8decc9..abc6bd26f1 100644 --- a/tests/particles/particle_interpolation_01.cc +++ b/tests/particles/particle_interpolation_01.cc @@ -61,7 +61,7 @@ test() Particles::Generators::probabilistic_locations( space_tria, - ConstantFunction(1.), + Functions::ConstantFunction(1.), true, Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) * estimated_n_particles_per_processor, diff --git a/tests/particles/particle_interpolation_02.cc b/tests/particles/particle_interpolation_02.cc index 78d43fffce..5cacdff221 100644 --- a/tests/particles/particle_interpolation_02.cc +++ b/tests/particles/particle_interpolation_02.cc @@ -65,7 +65,7 @@ test() Particles::Generators::probabilistic_locations( space_tria, - ConstantFunction(1.), + Functions::ConstantFunction(1.), true, Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) * estimated_n_particles_per_processor, diff --git a/tests/particles/particle_interpolation_03.cc b/tests/particles/particle_interpolation_03.cc index 11a8999909..b3edfb11ce 100644 --- a/tests/particles/particle_interpolation_03.cc +++ b/tests/particles/particle_interpolation_03.cc @@ -64,7 +64,7 @@ test() Particles::Generators::probabilistic_locations( space_tria, - ConstantFunction(1.), + Functions::ConstantFunction(1.), true, Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) * estimated_n_particles_per_processor, diff --git a/tests/symengine/sd_common_tests/step-44-sd-quadrature_level.h b/tests/symengine/sd_common_tests/step-44-sd-quadrature_level.h index 6b316bbd85..1dc2f869b4 100644 --- a/tests/symengine/sd_common_tests/step-44-sd-quadrature_level.h +++ b/tests/symengine/sd_common_tests/step-44-sd-quadrature_level.h @@ -1650,14 +1650,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1667,14 +1667,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1687,7 +1687,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1695,7 +1695,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1706,14 +1706,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1723,7 +1723,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1731,7 +1731,7 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement) | fe.component_mask(z_displacement))); @@ -1745,14 +1745,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } @@ -1762,14 +1762,14 @@ namespace Step44 VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); else VectorTools::interpolate_boundary_values( dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, (fe.component_mask(x_displacement))); } diff --git a/tests/vector_tools/integrate_difference_02_nan.cc b/tests/vector_tools/integrate_difference_02_nan.cc index 801172af64..1b002e4c15 100644 --- a/tests/vector_tools/integrate_difference_02_nan.cc +++ b/tests/vector_tools/integrate_difference_02_nan.cc @@ -91,7 +91,7 @@ test(VectorTools::NormType norm, double exp = 2.0) const ComponentSelectFunction component_mask(1, 2); VectorTools::integrate_difference(dofh, solution, - ZeroFunction(2), + Functions::ZeroFunction(2), cellwise_errors, quadrature, norm, diff --git a/tests/vector_tools/integrate_difference_05.cc b/tests/vector_tools/integrate_difference_05.cc index bd4feac0e8..357088f756 100644 --- a/tests/vector_tools/integrate_difference_05.cc +++ b/tests/vector_tools/integrate_difference_05.cc @@ -102,7 +102,7 @@ test(VectorTools::NormType norm, double value) 2 * dim); VectorTools::integrate_difference(dofh, solution, - ZeroFunction(2 * dim), + Functions::ZeroFunction(2 * dim), cellwise_errors, QGauss(5), norm); @@ -117,7 +117,7 @@ test(VectorTools::NormType norm, double value) VectorTools::integrate_difference(dofh, solution, - ZeroFunction(2 * dim), + Functions::ZeroFunction(2 * dim), cellwise_errors, QGauss(5), norm, -- 2.39.5