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<2>(1)</code> instead of
- <code>ZeroFunction<2>()</code> to have unit Dirichlet boundary
+ <code>Functions::ConstantFunction<2>(1)</code> instead of
+ <code>Functions::ZeroFunction<2>()</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.
@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
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);
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);
{
// 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