Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unqualified ContantFunction and ZeroFunction #14048

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/news/changes/incompatibilities/20220624Arndt-3
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Removed: The deprecated classes ConstantFunction and ZeroFunction
have been removed.
<br>
(Daniel Arndt, 2022/06/24)
6 changes: 3 additions & 3 deletions examples/step-3/doc/results.dox
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ suggestions:
Change the boundary condition: The code uses the Functions::ZeroFunction
function to generate zero boundary conditions. However, you may want to try
non-zero constant boundary values using
<code>ConstantFunction&lt;2&gt;(1)</code> instead of
<code>ZeroFunction&lt;2&gt;()</code> to have unit Dirichlet boundary
<code>Functions::ConstantFunction&lt;2&gt;(1)</code> instead of
<code>Functions::ZeroFunction&lt;2&gt;()</code> to have unit Dirichlet boundary
values. More exotic functions are described in the documentation of the
Functions namespace, and you may pick one to describe your particular boundary
values.
Expand Down Expand Up @@ -139,7 +139,7 @@ suggestions:
@code
VectorTools::interpolate_boundary_values(dof_handler,
1,
ConstantFunction<2>(1.),
Functions::ConstantFunction<2>(1.),
boundary_values);
@endcode
If you have this call immediately after the first one to this function, then
Expand Down
2 changes: 1 addition & 1 deletion examples/step-7/doc/results.dox
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ we can compute $\|u\| \approx \|u_h\|=\|0-u_h\|$ by calling
Vector<float> norm_per_cell(triangulation.n_active_cells());
VectorTools::integrate_difference(dof_handler,
solution,
ZeroFunction<dim>(),
Functions::ZeroFunction<dim>(),
norm_per_cell,
QGauss<dim>(fe->degree + 1),
VectorTools::L2_norm);
Expand Down
4 changes: 2 additions & 2 deletions examples/step-81/step-81.cc
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,13 @@ namespace Step81
VectorTools::project_boundary_values_curl_conforming_l2(
dof_handler,
0, /* real part */
dealii::ZeroFunction<dim>(2 * dim),
Functions::ZeroFunction<dim>(2 * dim),
0, /* boundary id */
constraints);
VectorTools::project_boundary_values_curl_conforming_l2(
dof_handler,
dim, /* imaginary part */
dealii::ZeroFunction<dim>(2 * dim),
Functions::ZeroFunction<dim>(2 * dim),
0, /* boundary id */
constraints);

Expand Down
21 changes: 0 additions & 21 deletions include/deal.II/base/function.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,27 +564,6 @@ namespace Functions
};
} // namespace Functions

/**
* Provide a function which always returns the constant values handed to the
* constructor.
*
* @deprecated use Functions::ConstantFunction instead.
*/
template <int dim, typename RangeNumberType = double>
using ConstantFunction DEAL_II_DEPRECATED =
Functions::ConstantFunction<dim, RangeNumberType>;

/**
* Provide a function which always returns zero.
*
* @deprecated use Functions::ZeroFunction instead.
*/
template <int dim, typename RangeNumberType = double>
using ZeroFunction DEAL_II_DEPRECATED =
Functions::ZeroFunction<dim, RangeNumberType>;



/**
* This is a constant vector-valued function, in which one or more components
* of the vector have a constant value and all other components are zero. It
Expand Down
3 changes: 2 additions & 1 deletion tests/fe/fe_enriched_color_06.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ main(int argc, char **argv)
{
// constant function.
Functions::ConstantFunction<dim> func(10 + i); // constant function
vec_enrichments.push_back(std::make_shared<ConstantFunction<dim>>(func));
vec_enrichments.push_back(
std::make_shared<Functions::ConstantFunction<dim>>(func));
}

// Construct helper class to construct FE collection
Expand Down