// list of boundaries where we have
// imposed Neumann value, and the
// corresponding Neumann values. This
-// information is represented by an
-// object of type
-// <code>FunctionMap@<dim@>::type</code> that is
-// essentially a map from boundary
+// information is represented by
+// a map from boundary
// indicators to function objects
// describing Neumann boundary values
// (in the present example program,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
// The above function returned one
// error indicator value for each
Vector<float> estimated_error_per_cell(
triangulation.n_active_cells());
- typename FunctionMap<dim>::type neumann_boundary;
+ std::map<types::boundary_id, const Function<dim> *> neumann_boundary;
KellyErrorEstimator<dim>::estimate(dof_handler,
QGauss<dim - 1>(3),
neumann_boundary,
{
Vector<float> estimated_error_per_cell(
this->triangulation->n_active_cells());
- KellyErrorEstimator<dim>::estimate(this->dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- this->solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ this->dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ this->solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(*this->triangulation,
estimated_error_per_cell,
0.3,
{
Vector<float> estimated_error_per_cell(
this->triangulation->n_active_cells());
- KellyErrorEstimator<dim>::estimate(this->dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- this->solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ this->dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ this->solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(*this->triangulation,
estimated_error_per_cell,
0.3,
RefinementWeightedKelly<dim>::refine_grid()
{
Vector<float> estimated_error(this->triangulation->n_active_cells());
- KellyErrorEstimator<dim>::estimate(this->dof_handler,
- *this->face_quadrature,
- typename FunctionMap<dim>::type(),
- this->solution,
- estimated_error);
+ KellyErrorEstimator<dim>::estimate(
+ this->dof_handler,
+ *this->face_quadrature,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ this->solution,
+ estimated_error);
typename DoFHandler<dim>::active_cell_iterator cell = this->dof_handler
.begin_active(),
constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
- typename FunctionMap<dim>::type boundary_functions;
- Solution<dim> solution_function;
+ std::map<types::boundary_id, const Function<dim> *> boundary_functions;
+ Solution<dim> solution_function;
boundary_functions[0] = &solution_function;
VectorTools::project_boundary_values(dof_handler,
boundary_functions,
constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
- typename FunctionMap<dim>::type boundary_functions;
- Solution<dim> solution_function;
+ std::map<types::boundary_id, const Function<dim> *> boundary_functions;
+ Solution<dim> solution_function;
boundary_functions[0] = &solution_function;
VectorTools::project_boundary_values(dof_handler,
boundary_functions,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_optimize(triangulation,
estimated_error_per_cell,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_optimize(triangulation,
estimated_error_per_cell);
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
Vector<float> estimated_error_per_cell(
triangulation.n_active_cells());
- typename FunctionMap<dim>::type neumann_boundary;
+ std::map<types::boundary_id, const Function<dim> *> neumann_boundary;
KellyErrorEstimator<dim>::estimate(dof_handler,
QGauss<dim - 1>(3),
neumann_boundary,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- typename FunctionMap<dim>::type neumann_boundary;
+ std::map<types::boundary_id, const Function<dim> *> neumann_boundary;
KellyErrorEstimator<dim>::estimate(dof_handler,
QGauss<dim - 1>(2),
neumann_boundary,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(2),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(2),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
// behavior of the
// DoFRenumbering::component_wise set
// of functions before December 2005
- DoFRenumbering::component_wise(static_cast<DoFHandler<dim> &>(mgdof),
- order);
+ DoFRenumbering::component_wise(mgdof, order);
print_dofs(mgdof, level);
}
}
// no other args
deallog << dof_handler.n_boundary_dofs() << std::endl;
- // with FunctionMap
- typename FunctionMap<dim>::type fm;
+ // with std::map
+ std::map<types::boundary_id, const Function<dim> *> fm;
fm[0] = nullptr;
deallog << dof_handler.n_boundary_dofs(fm) << std::endl;
// check
// DoFTools::
// make_boundary_sparsity_pattern (const DoFHandler<dim> &,
-// const typename FunctionMap<dim>::type &
-// const std::vector<unsigned int> &
+// const std::map<types::boundary_id, const
+// Function<dim>*> & const
+// std::vector<unsigned int> &
// SparsityPattern &);
DoFTools::map_dof_to_boundary_indices(dof_handler, set, map);
// create sparsity pattern
- typename FunctionMap<dim>::type boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> boundary_ids;
boundary_ids[0] = nullptr;
SparsityPattern sp(dof_handler.n_boundary_dofs(boundary_ids),
dof_handler.max_couplings_between_dofs());
// check
// DoFTools::
// make_boundary_sparsity_pattern (const DoFHandler<dim> &,
-// const typename FunctionMap<dim>::type &
-// const std::vector<unsigned int> &
+// const std::map<types::boundary_id, const
+// Function<dim>*> & const
+// std::vector<unsigned int> &
// DynamicSparsityPattern &);
DoFTools::map_dof_to_boundary_indices(dof_handler, set, map);
// create sparsity pattern
- typename FunctionMap<dim>::type boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> boundary_ids;
boundary_ids[0] = nullptr;
DynamicSparsityPattern sp(dof_handler.n_boundary_dofs(boundary_ids));
DoFTools::make_boundary_sparsity_pattern(dof_handler, boundary_ids, map, sp);
// check
// DoFTools::
// make_boundary_sparsity_pattern (const DoFHandler<dim> &,
-// const typename FunctionMap<dim>::type &
-// const std::vector<unsigned int> &
+// const std::map<types::boundary_id, const
+// Function<dim>*> & const
+// std::vector<unsigned int> &
// BlockSparsityPattern &);
set.insert(0);
DoFTools::map_dof_to_boundary_indices(dof_handler, set, map);
- typename FunctionMap<dim>::type boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> boundary_ids;
boundary_ids[0] = nullptr;
const unsigned int n_boundary_dofs =
dof_handler.n_boundary_dofs(boundary_ids);
// check
// DoFTools::
// make_boundary_sparsity_pattern (const DoFHandler<dim> &,
-// const typename FunctionMap<dim>::type &
-// const std::vector<unsigned int> &
+// const std::map<types::boundary_id, const
+// Function<dim>*> & const
+// std::vector<unsigned int> &
// BlockDynamicSparsityPattern &);
set.insert(0);
DoFTools::map_dof_to_boundary_indices(dof_handler, set, map);
- typename FunctionMap<dim>::type boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> boundary_ids;
boundary_ids[0] = nullptr;
const types::global_dof_index n_boundary_dofs =
dof_handler.n_boundary_dofs(boundary_ids);
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
LaplaceProblem<dim>::refine_grid()
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- face_quadrature_collection,
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ face_quadrature_collection,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
Vector<float> smoothness_indicators(triangulation.n_active_cells());
estimate_smoothness(smoothness_indicators);
{
Vector<float> estimated_error_per_cell(
this->triangulation->n_active_cells());
- KellyErrorEstimator<dim>::estimate(this->dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- this->solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ this->dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ this->solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(*this->triangulation,
estimated_error_per_cell,
0.3,
RefinementWeightedKelly<dim>::refine_grid()
{
Vector<float> estimated_error(this->triangulation->n_active_cells());
- KellyErrorEstimator<dim>::estimate(this->dof_handler,
- (*this->face_quadrature)[0],
- typename FunctionMap<dim>::type(),
- this->solution,
- estimated_error);
+ KellyErrorEstimator<dim>::estimate(
+ this->dof_handler,
+ (*this->face_quadrature)[0],
+ std::map<types::boundary_id, const Function<dim> *>(),
+ this->solution,
+ estimated_error);
typename hp::DoFHandler<dim>::active_cell_iterator
cell = this->dof_handler.begin_active(),
// the different boundary parts. We want the
// @p{function} to hold on all parts of the
// boundary
- typename FunctionMap<dim>::type boundary_functions;
+ std::map<types::boundary_id, const Function<dim>*> boundary_functions;
for (types::boundary_id c=0; c<255; ++c)
boundary_functions[c] = &function;
project_boundary_values (dof, boundary_functions, q_boundary,
if (project_to_boundary_first == true)
// boundary projection required
{
- /*
- // set up a list of boundary functions for
- // the different boundary parts. We want the
- // @p{function} to hold on all parts of the
- // boundary
- typename FunctionMap<dim>::type
- boundary_functions; for (unsigned char c=0; c<255; ++c)
- boundary_functions[c] = &function;
- project_boundary_values (dof,
- boundary_functions, q_boundary, boundary_values);
- */
+ // // set up a list of boundary functions for
+ // // the different boundary parts. We want the
+ // // @p{function} to hold on all parts of the
+ // // boundary
+ // std::map<types::boundary_id, const Function<dim>*>
+ // boundary_functions; for (unsigned char c=0; c<255; ++c)
+ // boundary_functions[c] = &function;
+ // project_boundary_values (dof,
+ // boundary_functions, q_boundary, boundary_values);
}
face_quadrature_formula.push_back(QGauss<dim - 1>(3));
face_quadrature_formula.push_back(QGauss<dim - 1>(3));
- KellyErrorEstimator<dim>::estimate(dof_handler,
- face_quadrature_formula,
- typename FunctionMap<dim>::type(),
- sol,
- error);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ face_quadrature_formula,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ sol,
+ error);
}
// sum up for a global:
face_quadrature_formula.push_back(dealii::QGauss<dim - 1>(3));
face_quadrature_formula.push_back(dealii::QGauss<dim - 1>(3));
- KellyErrorEstimator<dim>::estimate(dof_handler,
- face_quadrature_formula,
- typename FunctionMap<dim>::type(),
- sol,
- error);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ face_quadrature_formula,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ sol,
+ error);
}
// sum up for a global:
VectorTools::interpolate(dof_handler, Functions::SquareFunction<3>(), u);
KellyErrorEstimator<3>::estimate(
- dof_handler, QGauss<2>(2), FunctionMap<3>::type(), u, e);
+ dof_handler,
+ QGauss<2>(2),
+ std::map<types::boundary_id, const Function<3> *>(),
+ u,
+ e);
deallog << " " << static_cast<double>(e.l1_norm()) << std::endl;
deallog << " " << static_cast<double>(e.l2_norm()) << std::endl;
hp::DoFHandler<dim> dof(tr);
dof.distribute_dofs(element);
- MySquareFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ MySquareFunction<dim> coefficient;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
hp::QCollection<dim - 1> face_quadrature;
dof.distribute_dofs(element);
- MySquareFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ MySquareFunction<dim> coefficient;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
hp::QCollection<dim - 1> face_quadrature;
LaplaceProblem<dim>::refine_grid()
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- face_quadrature_collection,
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ face_quadrature_collection,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
Vector<float> smoothness_indicators(triangulation.n_active_cells());
estimate_smoothness(smoothness_indicators);
LaplaceProblem<dim>::refine_grid()
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- face_quadrature_collection,
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ face_quadrature_collection,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
Vector<float> smoothness_indicators(triangulation.n_active_cells());
estimate_smoothness(smoothness_indicators);
check_boundary(const hp::DoFHandler<dim> & dof,
const hp::MappingCollection<dim> &mapping)
{
- MySquareFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ MySquareFunction<dim> coefficient;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
hp::QCollection<dim - 1> face_quadrature;
Functions::ExpFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
for (unsigned int test = 0; test < 2; ++test)
check_boundary(const hp::DoFHandler<dim> & dof,
const hp::MappingCollection<dim> &mapping)
{
- MySquareFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ MySquareFunction<dim> coefficient;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
hp::QCollection<dim - 1> face_quadrature;
Functions::ExpFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
for (unsigned int test = 0; test < 2; ++test)
{
Vector<float> estimated_error_per_cell(
this->triangulation->n_active_cells());
- KellyErrorEstimator<dim>::estimate(this->dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- this->solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ this->dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ this->solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(*this->triangulation,
estimated_error_per_cell,
0.3,
LaplaceProblem<dim>::postprocess(const unsigned int cycle)
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- face_quadrature_collection,
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ face_quadrature_collection,
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
Vector<float> smoothness_indicators(triangulation.n_active_cells());
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
Vector<float> estimated_error_per_cell(
triangulation.n_active_cells());
- typename FunctionMap<dim>::type neumann_boundary;
+ std::map<types::boundary_id, const Function<dim> *> neumann_boundary;
KellyErrorEstimator<dim>::estimate(dof_handler,
QGauss<dim - 1>(3),
neumann_boundary,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- typename FunctionMap<dim>::type neumann_boundary;
+ std::map<types::boundary_id, const Function<dim> *> neumann_boundary;
KellyErrorEstimator<dim>::estimate(dof_handler,
QGauss<dim - 1>(2),
neumann_boundary,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
void
check_boundary(const DoFHandler<dim> &dof, const Mapping<dim> &mapping)
{
- MySquareFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ MySquareFunction<dim> coefficient;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
QGauss<dim - 1> face_quadrature(6);
Functions::ExpFunction<dim> coefficient;
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &coefficient;
for (unsigned int test = 0; test < 2; ++test)
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
FEValuesExtractors::Scalar pressure(dim);
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell,
- fe.component_mask(pressure));
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell,
+ fe.component_mask(pressure));
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
mg_sparsities.resize(0, nlevels - 1);
mg_ref_matrices.resize(0, nlevels - 1);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
std::vector<std::set<types::global_dof_index>> boundary_indices(nlevels);
MGTools::make_boundary_list(dof, dirichlet_boundary, boundary_indices);
}
mg_smoother.initialize(mg_matrices, smoother_data);
- MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
addit_data.level_mg_handler = level;
// extract the constraints due to Dirichlet boundary conditions
- ConstraintMatrix constraints;
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type functions;
+ ConstraintMatrix constraints;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> functions;
for (std::set<types::boundary_id>::const_iterator it =
dirichlet_boundaries.begin();
it != dirichlet_boundaries.end();
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
// Dirichlet BC
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ Functions::ZeroFunction<dim> zero_function;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
void
- initialize(const Mapping<dim> & mapping,
- const DoFHandler<dim> & dof_handler,
- const MGConstrainedDoFs & mg_constrained_dofs,
- const typename FunctionMap<dim>::type &dirichlet_boundary,
+ initialize(const Mapping<dim> & mapping,
+ const DoFHandler<dim> & dof_handler,
+ const MGConstrainedDoFs &mg_constrained_dofs,
+ const std::map<types::boundary_id, const Function<dim> *>
+ & dirichlet_boundary,
const unsigned int level = numbers::invalid_unsigned_int)
{
const QGauss<1> quad(n_q_points_1d);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ Functions::ZeroFunction<dim> zero_function;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
void
- initialize(const Mapping<dim> & mapping,
- const DoFHandler<dim> & dof_handler,
- const MGConstrainedDoFs & mg_constrained_dofs,
- const typename FunctionMap<dim>::type &dirichlet_boundary,
- const unsigned int level,
- const bool threaded)
+ initialize(const Mapping<dim> & mapping,
+ const DoFHandler<dim> & dof_handler,
+ const MGConstrainedDoFs &mg_constrained_dofs,
+ const std::map<types::boundary_id, const Function<dim> *>
+ & dirichlet_boundary,
+ const unsigned int level,
+ const bool threaded)
{
const QGauss<1> quad(n_q_points_1d);
typename MatrixFree<dim, number>::AdditionalData addit_data;
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ Functions::ZeroFunction<dim> zero_function;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
void
- initialize(const Mapping<dim> & mapping,
- const DoFHandler<dim> & dof_handler,
- const MGConstrainedDoFs & mg_constrained_dofs,
- const typename FunctionMap<dim>::type &dirichlet_boundary,
- const unsigned int level,
- const bool threaded)
+ initialize(const Mapping<dim> & mapping,
+ const DoFHandler<dim> & dof_handler,
+ const MGConstrainedDoFs &mg_constrained_dofs,
+ const std::map<types::boundary_id, const Function<dim> *>
+ & dirichlet_boundary,
+ const unsigned int level,
+ const bool threaded)
{
const QGauss<1> quad(n_q_points_1d);
typename MatrixFree<dim, number>::AdditionalData addit_data;
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ ZeroFunction<dim> zero_function;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
// Dirichlet BC
- ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ ZeroFunction<dim> zero_function;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
DoFTools::extract_locally_relevant_dofs(*dof[i], locally_relevant_dofs[i]);
// Dirichlet BC
- ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ ZeroFunction<dim> zero_function;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
addit_data.level_mg_handler = level;
// extract the constraints due to Dirichlet boundary conditions
- ConstraintMatrix constraints;
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type functions;
+ ConstraintMatrix constraints;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> functions;
for (std::set<types::boundary_id>::const_iterator it =
dirichlet_boundaries.begin();
it != dirichlet_boundaries.end();
mg_matrices[level].initialize(mapping, dof, dirichlet_boundaries, level);
}
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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_matrices.resize(0, nlevels - 1);
mg_constraints.resize(0, nlevels - 1);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
std::vector<std::set<types::global_dof_index>> boundary_indices(
triangulation.n_levels());
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- std::set<types::boundary_id> dirichlet_boundary_ids;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::set<types::boundary_id> dirichlet_boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(1.0);
dirichlet_boundary_ids.insert(0);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
else
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- locally_relevant_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ locally_relevant_solution,
+ estimated_error_per_cell);
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
triangulation, estimated_error_per_cell, 0.5, 0.3);
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
FEValuesExtractors::Scalar pressure(dim);
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell,
- fe.component_mask(pressure));
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell,
+ fe.component_mask(pressure));
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
triangulation, estimated_error_per_cell, 0.3, 0.0);
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(
static_cast<const DoFHandler<dim> &>(mg_dof_handler),
temp_solution.reinit(idx, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(
static_cast<const DoFHandler<dim> &>(mg_dof_handler),
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
LaplaceProblem<dim>::refine_grid()
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- locally_relevant_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ locally_relevant_solution,
+ estimated_error_per_cell);
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
triangulation, estimated_error_per_cell, 0.3, 0.03);
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
FEValuesExtractors::Scalar pressure(dim);
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell,
- fe.component_mask(pressure));
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell,
+ fe.component_mask(pressure));
// Note: this test does
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
FEValuesExtractors::Scalar pressure(dim);
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell,
- fe.component_mask(pressure));
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell,
+ fe.component_mask(pressure));
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
triangulation, estimated_error_per_cell, 0.3, 0.0);
DoFTools::make_hanging_node_constraints(
dof_handler, hanging_nodes_laplace_constraints);
- std::set<types::boundary_id> dirichlet_boundary_ids;
- typename FunctionMap<dim>::type dirichlet_boundary_functions;
- PotentialBCFunction<dim> bc_func(240, Point<dim>());
+ std::set<types::boundary_id> dirichlet_boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *>
+ dirichlet_boundary_functions;
+ PotentialBCFunction<dim> bc_func(240, Point<dim>());
dirichlet_boundary_ids.insert(0);
dirichlet_boundary_functions[0] = &bc_func;
VectorTools::interpolate_boundary_values(*mapping.get(),
cm.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(dofh, dirichlet_boundary, cm);
#include <deal.II/base/function.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
GridGenerator::hyper_cube(tr);
tr.refine_global(2);
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> mgdof(tr);
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy);
setup_tria(tr);
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> dofh(tr);
cell->update_cell_dof_indices_cache();
}
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
mg_constrained_dofs_ref.initialize(dofhref, dirichlet_boundary);
}
MGConstrainedDoFs mg_constrained_dofs;
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
mg_constrained_dofs.initialize(dofh, dirichlet_boundary);
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy);
setup_tria(tr);
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> dofh(tr);
cell->update_cell_dof_indices_cache();
}
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
mg_constrained_dofs_ref.initialize(dofhref, dirichlet_boundary);
}
MGConstrainedDoFs mg_constrained_dofs;
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
mg_constrained_dofs.initialize(dofh, dirichlet_boundary);
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/base/function.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
GridGenerator::hyper_cube(tr);
tr.refine_global(2);
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> mgdof(tr);
#include <deal.II/base/function.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
GridGenerator::hyper_cube(tr);
tr.refine_global(2);
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> mgdof(tr);
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(0.0);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(mg_dof_handler,
temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
triangulation, estimated_error_per_cell, 0.3, 0.0);
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- std::set<types::boundary_id> dirichlet_boundary_ids;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::set<types::boundary_id> dirichlet_boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(0.0);
dirichlet_boundary_ids.insert(0);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(0.0);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(mg_dof_handler,
temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
triangulation, estimated_error_per_cell, 0.3, 0.0);
Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
GridGenerator::hyper_cube(tr, -1, 1);
- typename FunctionMap<dim>::type dirichlet_boundary_functions;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *>
+ dirichlet_boundary_functions;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary_functions[0] = &homogeneous_dirichlet_bc;
tr.refine_global(1);
Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
GridGenerator::hyper_cube(tr, -1, 1);
- typename FunctionMap<dim>::type dirichlet_boundary_functions;
+ std::map<types::boundary_id, const Function<dim> *>
+ dirichlet_boundary_functions;
tr.refine_global(1);
refine_mesh(tr);
void
LaplaceProblem<dim>::test()
{
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[0] = &dirichlet_bc;
const unsigned int min_l = mg_matrices.min_level();
void
LaplaceProblem<dim>::test_boundary()
{
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[0] = &dirichlet_bc;
MGTools::make_boundary_list(mg_dof_handler_renumbered,
dirichlet_boundary,
void
LaplaceProblem<dim>::test()
{
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[0] = &dirichlet_bc;
MGConstrainedDoFs mg_constrained_dofs;
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
DoFTools::make_hanging_node_constraints(mg_dof_handler,
hanging_node_constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
DoFTools::make_hanging_node_constraints(mg_dof_handler,
hanging_node_constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(mg_dof_handler,
dirichlet_boundary,
temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
const double threshold =
0.6 * Utilities::MPI::max(estimated_error_per_cell.linfty_norm(),
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(mg_dof_handler,
dirichlet_boundary,
temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
const double threshold =
0.6 * Utilities::MPI::max(estimated_error_per_cell.linfty_norm(),
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(mg_dof_handler,
dirichlet_boundary,
temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
const double threshold =
0.6 * Utilities::MPI::max(estimated_error_per_cell.linfty_norm(),
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
const double threshold = 0.6 * estimated_error_per_cell.linfty_norm();
GridRefinement::refine(triangulation, estimated_error_per_cell, threshold);
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
constraints.clear();
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MappingQGeneric<dim> mapping(1);
VectorTools::interpolate_boundary_values(mapping,
{
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(3),
- typename FunctionMap<dim>::type(),
- solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(3),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ solution,
+ estimated_error_per_cell);
GridRefinement::refine_and_coarsen_fixed_number(triangulation,
estimated_error_per_cell,
0.3,
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(0.0);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
VectorTools::interpolate_boundary_values(mg_dof_handler,
temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
temp_solution = solution;
- KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
- mg_dof_handler),
- QGauss<dim - 1>(degree + 1),
- typename FunctionMap<dim>::type(),
- temp_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<dim>::estimate(
+ mg_dof_handler,
+ QGauss<dim - 1>(degree + 1),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ temp_solution,
+ estimated_error_per_cell);
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
triangulation, estimated_error_per_cell, 0.3, 0.0);
constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
- std::set<types::boundary_id> dirichlet_boundary_ids;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::set<types::boundary_id> dirichlet_boundary_ids;
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(1.0);
dirichlet_boundary_ids.insert(0);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
}
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> dofh(tr);
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
}
- Functions::ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
+ Functions::ZeroFunction<dim> zero;
+ std::map<types::boundary_id, const Function<dim> *> fmap;
fmap.insert(std::make_pair(0, &zero));
DoFHandler<dim> dofh(tr);
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_q.h>
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/function_map.h>
#include <deal.II/fe/fe_q.h>
const std::vector<const DoFHandler<dim> *> mgdof_ptr{&mgdof_1, &mgdof_2};
- std::vector<MGConstrainedDoFs> mg_constrained_dofs_vector(2);
- ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::vector<MGConstrainedDoFs> mg_constrained_dofs_vector(2);
+ 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)
mg_constrained_dofs_vector[i].initialize(*mgdof_ptr[i],
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ std::vector<MGConstrainedDoFs> mg_constrained_dofs_vector(2);
+ 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)
mg_constrained_dofs_vector[i].initialize(*mgdof_ptr[i],
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> homogeneous_dirichlet_bc(1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
MGConstrainedDoFs mg_constrained_dofs;
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- MGConstrainedDoFs mg_constrained_dofs;
- Functions::ZeroFunction<dim> zero_function;
- typename FunctionMap<dim>::type dirichlet_boundary;
+ MGConstrainedDoFs mg_constrained_dofs;
+ 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);
DoFHandler<dim> &dof = mgdof;
mgdof.distribute_dofs(fe);
mgdof.distribute_mg_dofs(fe);
- DoFRenumbering::component_wise(static_cast<DoFHandler<dim> &>(mgdof),
- target_component);
+ DoFRenumbering::component_wise(mgdof, target_component);
vector<types::global_dof_index> ndofs(
*std::max_element(target_component.begin(), target_component.end()) + 1);
DoFTools::count_dofs_per_component(dof, ndofs, true, target_component);
DoFRenumbering::component_wise(mg_dof_handler, level);
std::vector<std::set<unsigned int>> boundary_indices(tr.n_levels());
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
MGConstrainedDoFs mg_constrained_dofs;
std::vector<std::set<types::global_dof_index>> boundary_indices(
tr.n_levels());
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
MGTools::make_boundary_list(mg_dof_handler,
std::vector<std::set<types::global_dof_index>> boundary_indices(
tr.n_levels());
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
MGTools::make_boundary_list(mg_dof_handler,
std::vector<std::set<types::global_dof_index>> boundary_indices(
tr.n_levels());
- typename FunctionMap<dim>::type dirichlet_boundary;
- Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
+ std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
+ Functions::ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
MGTools::make_boundary_list(mg_dof_handler,
dealii::deallog << std::endl;
// call Kelly
- typename dealii::FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = &func;
dealii::Vector<float> error(dof_handler.n_dofs());
dealii::KellyErrorEstimator<dim>::estimate(
dof_handler,
face_quadrature_formula,
- typename dealii::FunctionMap<dim>::type(),
+ std::map<types::boundary_id, const Function<dim> *>(),
values,
error,
dealii::ComponentMask(),
dealii::KellyErrorEstimator<dim>::estimate(
dof_handler,
face_quadrature_formula,
- typename dealii::FunctionMap<dim>::type(),
+ std::map<types::boundary_id, const Function<dim> *>(),
values,
error,
dealii::ComponentMask(),
dealii::KellyErrorEstimator<dim>::estimate(
dof_handler,
face_quadrature_formula,
- typename dealii::FunctionMap<dim>::type(),
+ std::map<types::boundary_id, const Function<dim> *>(),
values,
error,
dealii::ComponentMask(),
dealii::deallog << std::endl;
// call Kelly
- typename dealii::FunctionMap<dim, std::complex<double>>::type function_map;
+ std::map<types::boundary_id, const Function<dim, std::complex<double>> *>
+ function_map;
function_map[0] = &func;
dealii::Vector<float> error(dof_handler.n_dofs());
dealii::KellyErrorEstimator<dim>::estimate(
dof_handler,
face_quadrature_formula,
- typename dealii::FunctionMap<dim, std::complex<double>>::type(),
+ std::map<types::boundary_id, const Function<dim, std::complex<double>> *>(),
values,
error,
dealii::ComponentMask(),
dealii::KellyErrorEstimator<dim>::estimate(
dof_handler,
face_quadrature_formula,
- typename dealii::FunctionMap<dim, std::complex<double>>::type(),
+ std::map<types::boundary_id, const Function<dim, std::complex<double>> *>(),
values,
error,
dealii::ComponentMask(),
dealii::KellyErrorEstimator<dim>::estimate(
dof_handler,
face_quadrature_formula,
- typename dealii::FunctionMap<dim, std::complex<double>>::type(),
+ std::map<types::boundary_id, const Function<dim, std::complex<double>> *>(),
values,
error,
dealii::ComponentMask(),
dof.distribute_dofs(fe);
Functions::ConstantFunction<dim> constant_function(1., dim);
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
function_map[j] = &constant_function;
DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe);
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = function_list[i];
// interpolate boundary values
QGauss<dim - 1> quadrature(degree + 2);
MappingQGeneric<dim> mapping(1);
- TestFunction<dim> f(degree - 1);
- std::map<types::global_dof_index, double> boundary_constraints;
- typename FunctionMap<dim>::type boundary_map;
+ TestFunction<dim> f(degree - 1);
+ std::map<types::global_dof_index, double> boundary_constraints;
+ std::map<types::boundary_id, const Function<dim> *> boundary_map;
for (types::boundary_id i = 0; i < 255; ++i)
boundary_map[i] = &f;
VectorTools::project_boundary_values(
dof.distribute_dofs(fe);
Functions::ConstantFunction<dim> constant_function(1., dim);
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
function_map[j] = &constant_function;
TopLevel<dim>::refine_initial_grid()
{
Vector<float> error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(2),
- typename FunctionMap<dim>::type(),
- incremental_displacement,
- error_per_cell,
- ComponentMask(),
- nullptr,
- MultithreadInfo::n_threads(),
- this_mpi_process);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(2),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ incremental_displacement,
+ error_per_cell,
+ ComponentMask(),
+ nullptr,
+ MultithreadInfo::n_threads(),
+ this_mpi_process);
const unsigned int n_local_cells =
triangulation.n_locally_owned_active_cells();
PETScWrappers::MPI::Vector distributed_error_per_cell(
TopLevel<dim>::refine_initial_grid()
{
Vector<float> error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<dim>::estimate(dof_handler,
- QGauss<dim - 1>(2),
- typename FunctionMap<dim>::type(),
- incremental_displacement,
- error_per_cell,
- ComponentMask(),
- nullptr,
- MultithreadInfo::n_threads(),
- this_mpi_process);
+ KellyErrorEstimator<dim>::estimate(
+ dof_handler,
+ QGauss<dim - 1>(2),
+ std::map<types::boundary_id, const Function<dim> *>(),
+ incremental_displacement,
+ error_per_cell,
+ ComponentMask(),
+ nullptr,
+ MultithreadInfo::n_threads(),
+ this_mpi_process);
const unsigned int n_local_cells =
triangulation.n_locally_owned_active_cells();
PETScWrappers::MPI::Vector distributed_error_per_cell(
TimerOutput::Scope t(timer, "refine");
Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
- KellyErrorEstimator<2>::estimate(dof_handler,
- QGauss<2 - 1>(3),
- typename FunctionMap<2>::type(),
- locally_relevant_solution,
- estimated_error_per_cell);
+ KellyErrorEstimator<2>::estimate(
+ dof_handler,
+ QGauss<2 - 1>(3),
+ std::map<types::boundary_id, const Function<2> *>(),
+ locally_relevant_solution,
+ estimated_error_per_cell);
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
triangulation, estimated_error_per_cell, 0.3, 0.03);
triangulation.execute_coarsening_and_refinement();
DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe);
- typename FunctionMap<dim>::type function_map;
+ std::map<types::boundary_id, const Function<dim> *> function_map;
function_map[0] = function_list[i];
// interpolate boundary values
DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe);
- typename FunctionMap<dim, std::complex<double>>::type function_map;
+ std::map<types::boundary_id, const Function<dim, std::complex<double>> *>
+ function_map;
function_map[0] = function_list[i];
// interpolate boundary values
hp::DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe);
- typename FunctionMap<dim, std::complex<double>>::type function_map;
+ std::map<types::boundary_id, const Function<dim, std::complex<double>> *>
+ function_map;
function_map[0] = function_list[i];
// interpolate boundary values