const FEValuesExtractors::Vector velocities(0);
const FEValuesExtractors::Scalar pressure(dim);
- typename DoFHandler<dim>::active_cell_iterator cell = darcy_dof_handler
- .begin_active(),
- endc =
- darcy_dof_handler.end();
- typename DoFHandler<dim>::active_cell_iterator saturation_cell =
- saturation_dof_handler.begin_active();
+ auto cell = darcy_dof_handler.begin_active();
+ const auto endc = darcy_dof_handler.end();
+ auto saturation_cell = saturation_dof_handler.begin_active();
for (; cell != endc; ++cell, ++saturation_cell)
{
// AffineConstraints class do the insertion of the cell matrix
// elements to the global matrix, which already condenses the hanging node
// constraints.
- typename DoFHandler<dim>::active_cell_iterator cell = darcy_dof_handler
- .begin_active(),
- endc =
- darcy_dof_handler.end();
- typename DoFHandler<dim>::active_cell_iterator saturation_cell =
- saturation_dof_handler.begin_active();
+ auto cell = darcy_dof_handler.begin_active();
+ const auto endc = darcy_dof_handler.end();
+ auto saturation_cell = saturation_dof_handler.begin_active();
for (; cell != endc; ++cell, ++saturation_cell)
{
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : saturation_dof_handler.active_cell_iterators())
{
saturation_fe_values.reinit(cell);
local_matrix = 0;
const double global_S_variation =
global_S_range.second - global_S_range.first;
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
- typename DoFHandler<dim>::active_cell_iterator darcy_cell =
- darcy_dof_handler.begin_active();
+ auto cell = saturation_dof_handler.begin_active();
+ const auto endc = saturation_dof_handler.end();
+ auto darcy_cell = darcy_dof_handler.begin_active();
for (; cell != endc; ++cell, ++darcy_cell)
{
saturation_fe_values.reinit(cell);
time_step / old_time_step,
old_saturation_solution);
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
- for (unsigned int cell_no = 0; cell != endc; ++cell, ++cell_no)
+ for (const auto &cell : saturation_dof_handler.active_cell_iterators())
{
+ const unsigned int cell_no = cell->active_cell_index();
fe_values.reinit(cell);
fe_values.get_function_gradients(extrapolated_saturation_solution,
grad_saturation);
}
{
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
-
- for (unsigned int cell_no = 0; cell != endc; ++cell, ++cell_no)
+ for (const auto &cell : saturation_dof_handler.active_cell_iterators())
{
+ const unsigned int cell_no = cell->active_cell_index();
cell->clear_coarsen_flag();
cell->clear_refine_flag();
std::vector<types::global_dof_index> local_saturation_dof_indices(
saturation_fe.dofs_per_cell);
- typename DoFHandler<dim>::active_cell_iterator
- joint_cell = joint_dof_handler.begin_active(),
- joint_endc = joint_dof_handler.end(),
- darcy_cell = darcy_dof_handler.begin_active(),
- saturation_cell = saturation_dof_handler.begin_active();
+ auto joint_cell = joint_dof_handler.begin_active();
+ const auto joint_endc = joint_dof_handler.end();
+ auto darcy_cell = darcy_dof_handler.begin_active();
+ auto saturation_cell = saturation_dof_handler.begin_active();
for (; joint_cell != joint_endc;
++joint_cell, ++darcy_cell, ++saturation_cell)
double max_global_aop_indicator = 0.0;
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : saturation_dof_handler.active_cell_iterators())
{
double max_local_mobility_reciprocal_difference = 0.0;
double max_local_permeability_inverse_l1_norm = 0.0;
double max_velocity_times_dF_dS = 0;
- typename DoFHandler<dim>::active_cell_iterator cell = darcy_dof_handler
- .begin_active(),
- endc =
- darcy_dof_handler.end();
- typename DoFHandler<dim>::active_cell_iterator saturation_cell =
- saturation_dof_handler.begin_active();
+ auto cell = darcy_dof_handler.begin_active();
+ const auto endc = darcy_dof_handler.end();
+ auto saturation_cell = saturation_dof_handler.begin_active();
for (; cell != endc; ++cell, ++saturation_cell)
{
darcy_fe_values.reinit(cell);
double min_saturation = std::numeric_limits<double>::max(),
max_saturation = -std::numeric_limits<double>::max();
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : saturation_dof_handler.active_cell_iterators())
{
fe_values.reinit(cell);
fe_values.get_function_values(old_saturation_solution,
double min_saturation = std::numeric_limits<double>::max(),
max_saturation = -std::numeric_limits<double>::max();
- typename DoFHandler<dim>::active_cell_iterator
- cell = saturation_dof_handler.begin_active(),
- endc = saturation_dof_handler.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : saturation_dof_handler.active_cell_iterators())
{
fe_values.reinit(cell);
fe_values.get_function_values(old_saturation_solution,