Vector<float> values(triangulation.n_active_cells());
VectorTools::integrate_difference(dof_handler,
solution,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
values,
QGauss<dim>(fe.degree + 1),
VectorTools::Linfty_norm);
VectorTools::interpolate_boundary_values(
fluid_dh,
0,
- ZeroFunction<spacedim>(spacedim + 1),
+ Functions::ZeroFunction<spacedim>(spacedim + 1),
constraints,
fluid_fe->component_mask(velocities));
constraints.close();
} // 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>;
-
/**
* @ingroup functions
*/
template <int dim, typename RangeNumberType = double>
-class ComponentSelectFunction : public ConstantFunction<dim, RangeNumberType>
+class ComponentSelectFunction
+ : public Functions::ConstantFunction<dim, RangeNumberType>
{
public:
/**
const unsigned int selected,
const RangeNumberType value,
const unsigned int n_components)
- : ConstantFunction<dim, RangeNumberType>(value, n_components)
+ : Functions::ConstantFunction<dim, RangeNumberType>(value, n_components)
, selected_components(std::make_pair(selected, selected + 1))
{}
ComponentSelectFunction<dim, RangeNumberType>::ComponentSelectFunction(
const unsigned int selected,
const unsigned int n_components)
- : ConstantFunction<dim, RangeNumberType>(1., n_components)
+ : Functions::ConstantFunction<dim, RangeNumberType>(1., n_components)
, selected_components(std::make_pair(selected, selected + 1))
{
AssertIndexRange(selected, n_components);
ComponentSelectFunction<dim, RangeNumberType>::ComponentSelectFunction(
const std::pair<unsigned int, unsigned int> &selected,
const unsigned int n_components)
- : ConstantFunction<dim, RangeNumberType>(1., n_components)
+ : Functions::ConstantFunction<dim, RangeNumberType>(1., n_components)
, selected_components(selected)
{
Assert(selected_components.first < selected_components.second,
template <int dim, typename RangeNumberType>
void
ComponentSelectFunction<dim, RangeNumberType>::substitute_function_value_with(
- const ConstantFunction<dim, RangeNumberType> &f)
+ const Functions::ConstantFunction<dim, RangeNumberType> &f)
{
Point<dim> p;
for (unsigned int i = 0; i < this->function_value_vector.size(); ++i)
// 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<dim, RangeNumberType>) +
- ConstantFunction<dim, RangeNumberType>::memory_consumption());
+ return (
+ sizeof(*this) - sizeof(Functions::ConstantFunction<dim, RangeNumberType>) +
+ Functions::ConstantFunction<dim, RangeNumberType>::memory_consumption());
}
//---------------------------------------------------------------------------
solution -= solution2;
error_from_exact(dh,
solution,
- ConstantFunction<DoFHandlerType::space_dimension>(
+ Functions::ConstantFunction<DoFHandlerType::space_dimension>(
0, component_names.size()),
weight);
}
error_from_exact(mapping,
dh,
solution,
- ConstantFunction<DoFHandlerType::space_dimension>(
+ Functions::ConstantFunction<DoFHandlerType::space_dimension>(
0, component_names.size()),
weight);
}
AffineConstraints<double> & constraints,
const Mapping<dim, spacedim> & mapping)
{
- ZeroFunction<dim> zero_function(dim);
+ Functions::ZeroFunction<dim> zero_function(dim);
std::map<types::boundary_id, const Function<spacedim> *> function_map;
for (const types::boundary_id boundary_id : boundary_ids)
function_map[boundary_id] = &zero_function;
AffineConstraints<double> & constraints,
const Mapping<dim, spacedim> & mapping)
{
- ZeroFunction<dim> zero_function(dim);
+ Functions::ZeroFunction<dim> zero_function(dim);
std::map<types::boundary_id, const Function<spacedim> *> function_map;
for (const types::boundary_id boundary_id : boundary_ids)
function_map[boundary_id] = &zero_function;
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(dof_handler,
0,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
constraints);
for (unsigned int i = 0; i < vec_predicates.size(); ++i)
{
// constant function is chosen as enrichment function
- ConstantFunction<dim> func(i);
+ Functions::ConstantFunction<dim> func(i);
vec_enrichments.push_back(std::make_shared<ConstantFunction<dim>>(func));
}
for (unsigned int i = 0; i < vec_predicates.size(); ++i)
{
// constant function.
- ConstantFunction<dim> func(10 + i); // constant function
+ Functions::ConstantFunction<dim> func(10 + i); // constant function
vec_enrichments.push_back(std::make_shared<ConstantFunction<dim>>(func));
}
for (unsigned int i = 0; i < vec_predicates.size(); ++i)
{
// constant function.
- ConstantFunction<dim> func(10 + i); // constant function
+ Functions::ConstantFunction<dim> func(10 + i); // constant function
vec_enrichments.push_back(std::make_shared<ConstantFunction<dim>>(func));
}
else
{
pcout << "Dummy function added at " << i << std::endl;
- ConstantFunction<dim> func(0);
+ Functions::ConstantFunction<dim> func(0);
vec_enrichments.push_back(
std::make_shared<ConstantFunction<dim>>(func));
}
Vector<float> difference_per_cell(triangulation.n_active_cells());
VectorTools::integrate_difference(dof_handler,
localized_solution,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
difference_per_cell,
q_collection,
VectorTools::H1_norm);
for (unsigned int i = 0; i < vec_predicates.size(); ++i)
{
// constant function.
- ConstantFunction<dim> func(10 + i); // constant function
+ Functions::ConstantFunction<dim> func(10 + i); // constant function
vec_enrichments.push_back(std::make_shared<ConstantFunction<dim>>(func));
}
dof_handler.distribute_dofs(fe);
Vector<double> solution(dof_handler.n_dofs());
- VectorTools::interpolate(dof_handler, ZeroFunction<dim>(), solution);
+ VectorTools::interpolate(dof_handler,
+ Functions::ZeroFunction<dim>(),
+ solution);
deallog << "Success, dim = " << dim << std::endl;
}
VectorTools::project_boundary_values_curl_conforming_l2(
dof_handler,
first_vector_component,
- ZeroFunction<dim, std::complex<double>>(dim),
+ Functions::ZeroFunction<dim, std::complex<double>>(dim),
0,
constraints);
VectorTools::project_boundary_values_curl_conforming_l2(
dof_handler,
first_vector_component,
- ZeroFunction<dim>(dim),
+ Functions::ZeroFunction<dim>(dim),
0,
constraints);
dof_handler.distribute_dofs(fe);
Vector<double> solution(dof_handler.n_dofs());
- VectorTools::interpolate(dof_handler, ZeroFunction<dim>(), solution);
+ VectorTools::interpolate(dof_handler,
+ Functions::ZeroFunction<dim>(),
+ solution);
deallog << "Success, dim = " << dim << std::endl;
}
AffineConstraints<double> constraints;
VectorTools::interpolate_boundary_values(dof_handler,
0,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
constraints);
constraints.close();
AffineConstraints<double> constraints;
VectorTools::interpolate_boundary_values(dof,
0,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
constraints);
constraints.close();
mg_smoother.initialize(mg_matrices, smoother_data);
MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
mg_constrained_dofs.initialize(dof, dirichlet_boundary);
mg_smoother.initialize(mg_matrices, smoother_data);
MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
mg_constrained_dofs.initialize(dof, dirichlet_boundary);
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
// Dirichlet BC
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
// Dirichlet BC
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
DoFTools::extract_locally_relevant_dofs(*dof[i], locally_relevant_dofs[i]);
// Dirichlet BC
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
constraints.reinit(relevant_dofs);
VectorTools::interpolate_boundary_values(dof,
0,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
constraints);
constraints.close();
scratch_data.fe_values.reinit(cell);
- std::vector<double> rhs_values(n_q_points);
- ConstantFunction<dim> right_hand_side(-2.0);
+ std::vector<double> rhs_values(n_q_points);
+ Functions::ConstantFunction<dim> right_hand_side(-2.0);
right_hand_side.value_list(scratch_data.fe_values.get_quadrature_points(),
rhs_values);
const unsigned int n_face_q_points =
scratch_data.fe_face_values.get_quadrature().size();
- std::vector<double> face_boundary_values(n_face_q_points);
- ConstantFunction<dim> boundary_values(1.0);
+ std::vector<double> face_boundary_values(n_face_q_points);
+ Functions::ConstantFunction<dim> boundary_values(1.0);
scratch_data.fe_face_values.reinit(cell, face_no);
boundary_values.value_list(
VectorTools::integrate_difference(mapping,
dof_handler,
solution,
- ZeroFunction<dim>(),
+ Functions::ZeroFunction<dim>(),
norm_per_cell,
QGauss<dim>(gauss_degree + 1),
VectorTools::H1_seminorm);
dealii::VectorTools::interpolate_boundary_values(
dof_handler,
id,
- ConstantFunction<dim>(static_cast<double>(id) + 42.0, dim),
+ Functions::ConstantFunction<dim>(static_cast<double>(id) + 42.0, dim),
constraints);
VectorTools::compute_no_normal_flux_constraints(dof_handler,
// 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<dim>(1, 2),
// prepare dof_values
LinearAlgebra::distributed::Vector<double> dgq_solution;
dgq_solution.reinit(dgq_locally_owned_dofs, dgq_ghost_dofs, MPI_COMM_WORLD);
- VectorTools::interpolate(dgq_dof_handler, ZeroFunction<dim>(), dgq_solution);
+ VectorTools::interpolate(dgq_dof_handler,
+ Functions::ZeroFunction<dim>(),
+ dgq_solution);
dgq_solution.update_ghost_values();
parallel::distributed::SolutionTransfer<
mgdof.distribute_mg_dofs();
MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
mg_constrained_dofs.initialize(mgdof, dirichlet_boundary);
const std::vector<const DoFHandler<dim> *> mgdof_ptr{&mgdof_1, &mgdof_2};
std::vector<MGConstrainedDoFs> mg_constrained_dofs_vector(2);
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
for (unsigned int i = 0; i < mgdof_ptr.size(); ++i)
mgdof.distribute_mg_dofs();
MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
mg_constrained_dofs.initialize(mgdof, dirichlet_boundary);
const std::vector<const DoFHandler<dim> *> mgdof_ptr{&mgdof_1, &mgdof_2};
std::vector<MGConstrainedDoFs> mg_constrained_dofs_vector(2);
- ZeroFunction<dim> zero_function;
+ Functions::ZeroFunction<dim> zero_function;
std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
for (unsigned int i = 0; i < mgdof_ptr.size(); ++i)
{
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);
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
Particles::Generators::probabilistic_locations<dim, spacedim>(
space_tria,
- ConstantFunction<spacedim, double>(1.),
+ Functions::ConstantFunction<spacedim, double>(1.),
true,
Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) *
estimated_n_particles_per_processor,
Particles::Generators::probabilistic_locations<dim, spacedim>(
space_tria,
- ConstantFunction<spacedim, double>(1.),
+ Functions::ConstantFunction<spacedim, double>(1.),
true,
Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) *
estimated_n_particles_per_processor,
Particles::Generators::probabilistic_locations<dim, spacedim>(
space_tria,
- ConstantFunction<spacedim, double>(1.),
+ Functions::ConstantFunction<spacedim, double>(1.),
true,
Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) *
estimated_n_particles_per_processor,
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(x_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(y_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
fe.component_mask(z_displacement));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement) |
fe.component_mask(z_displacement)));
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
else
VectorTools::interpolate_boundary_values(
dof_handler_ref,
boundary_id,
- ZeroFunction<dim>(n_components),
+ Functions::ZeroFunction<dim>(n_components),
constraints,
(fe.component_mask(x_displacement)));
}
const ComponentSelectFunction<dim> component_mask(1, 2);
VectorTools::integrate_difference(dofh,
solution,
- ZeroFunction<dim>(2),
+ Functions::ZeroFunction<dim>(2),
cellwise_errors,
quadrature,
norm,
2 * dim);
VectorTools::integrate_difference(dofh,
solution,
- ZeroFunction<dim>(2 * dim),
+ Functions::ZeroFunction<dim>(2 * dim),
cellwise_errors,
QGauss<dim>(5),
norm);
VectorTools::integrate_difference(dofh,
solution,
- ZeroFunction<dim>(2 * dim),
+ Functions::ZeroFunction<dim>(2 * dim),
cellwise_errors,
QGauss<dim>(5),
norm,