const ComponentMask & component_mask)
{
std::map<types::boundary_id, const Function<spacedim, number> *>
- function_map;
- function_map[boundary_component] = &boundary_function;
+ function_map = {{boundary_component, &boundary_function}};
interpolate_boundary_values(
mapping, dof, function_map, boundary_values, component_mask);
}
const ComponentMask & component_mask)
{
std::map<types::boundary_id, const Function<spacedim, number> *>
- function_map;
- function_map[boundary_component] = &boundary_function;
+ function_map = {{boundary_component, &boundary_function}};
interpolate_boundary_values(
mapping, dof, function_map, boundary_values, component_mask);
}
std::map<types::global_dof_index, number> boundary_values;
interpolate_boundary_values(
mapping, dof, function_map, boundary_values, component_mask_);
- typename std::map<types::global_dof_index, number>::const_iterator
- boundary_value = boundary_values.begin();
- for (; boundary_value != boundary_values.end(); ++boundary_value)
+ for (const auto &boundary_value : boundary_values)
{
- if (constraints.can_store_line(boundary_value->first) &&
- !constraints.is_constrained(boundary_value->first))
+ if (constraints.can_store_line(boundary_value.first) &&
+ !constraints.is_constrained(boundary_value.first))
{
- constraints.add_line(boundary_value->first);
- constraints.set_inhomogeneity(boundary_value->first,
- boundary_value->second);
+ constraints.add_line(boundary_value.first);
+ constraints.set_inhomogeneity(boundary_value.first,
+ boundary_value.second);
}
}
}
const ComponentMask & component_mask)
{
std::map<types::boundary_id, const Function<spacedim, number> *>
- function_map;
- function_map[boundary_component] = &boundary_function;
+ function_map = {{boundary_component, &boundary_function}};
interpolate_boundary_values(
mapping, dof, function_map, constraints, component_mask);
}
std::map<types::global_dof_index, number> boundary_values;
interpolate_boundary_values(
mapping, dof, function_map, boundary_values, component_mask_);
- typename std::map<types::global_dof_index, number>::const_iterator
- boundary_value = boundary_values.begin();
- for (; boundary_value != boundary_values.end(); ++boundary_value)
+ for (const auto &boundary_value : boundary_values)
{
- if (constraints.can_store_line(boundary_value->first) &&
- !constraints.is_constrained(boundary_value->first))
+ if (constraints.can_store_line(boundary_value.first) &&
+ !constraints.is_constrained(boundary_value.first))
{
- constraints.add_line(boundary_value->first);
- constraints.set_inhomogeneity(boundary_value->first,
- boundary_value->second);
+ constraints.add_line(boundary_value.first);
+ constraints.set_inhomogeneity(boundary_value.first,
+ boundary_value.second);
}
}
}
const ComponentMask & component_mask)
{
std::map<types::boundary_id, const Function<spacedim, number> *>
- function_map;
- function_map[boundary_component] = &boundary_function;
+ function_map = {{boundary_component, &boundary_function}};
interpolate_boundary_values(
mapping, dof, function_map, constraints, component_mask);
}