Skip to content

Commit

Permalink
Merge pull request dealii#14048 from masterleinad/remove_unqualified_…
Browse files Browse the repository at this point in the history
…functions

Remove unqualified ContantFunction and ZeroFunction
  • Loading branch information
kronbichler committed Jun 28, 2022
2 parents d4cfbe2 + c71ca8f commit 0e76941
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 28 deletions.
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

0 comments on commit 0e76941

Please sign in to comment.