n_q_points, std::vector<Tensor<1, 2>>(n_components));
fe_values.get_function_gradients(solution, grads_here);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// double u0 = this_value[q_point](0);
// double v0 = this_value[q_point](1);
{
coefficient->value_list(fe_values.get_quadrature_points(),
coefficient_values);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
coefficient->vector_value_list(fe_values.get_quadrature_points(),
coefficient_vector_values);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
}
*/
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
// const double weight = q.weight(point);
rhs_values);
cell_vector = 0;
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
cell_vector(i) += rhs_values[point] *
fe_values.shape_value(i, point) *
rhs_values);
cell_vector = 0;
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int comp_i = 0; comp_i < fe.n_components();
++comp_i)
n_q_points, std::vector<Tensor<1, 3>>(n_components));
fe_values.get_function_gradients(solution, grads_here);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
double u0 = 0;
double v0 = 0;
{
coefficient->value_list(fe_values.get_quadrature_points(),
coefficient_values);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
coefficient->vector_value_list(fe_values.get_quadrature_points(),
coefficient_vector_values);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
const unsigned int dofs_per_face = fe.dofs_per_face;
std::vector<unsigned int> face_dof_indices(dofs_per_face);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
// const double weight = q.weight(point);
rhs_values);
cell_vector = 0;
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
cell_vector(i) += rhs_values[point] *
fe_values.shape_value(i, point) *
rhs_values);
cell_vector = 0;
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (const auto point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int comp_i = 0; comp_i < fe.n_components();
++comp_i)
Vector<double>(n_components));
fe_values.get_function_values(solution, this_value);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
double u = this_value[q_point](0), v = this_value[q_point](1);
Point<2> p = fe_values.quadrature_point(q_point);
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
fe_values.reinit(cell);
deallog << "Jacobians: ";
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "[ ";
for (unsigned int d = 0; d < dim; ++d)
}
deallog << std::endl;
deallog << "Derivatives of shape function: ";
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "[ ";
for (unsigned int d = 0; d < dim; ++d)
fe_values.reinit(cell);
deallog << "Jacobians: ";
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "[ ";
for (unsigned int d = 0; d < dim; ++d)
}
deallog << std::endl;
deallog << "Derivatives of shape function: ";
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "[ ";
for (unsigned int d = 0; d < dim; ++d)
fe_values.reinit(cell);
deallog << "Jacobians: ";
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "[ ";
for (unsigned int d = 0; d < dim; ++d)
}
deallog << std::endl;
deallog << "Derivatives of shape function: ";
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "[ ";
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
for (unsigned int j = 0; j < fe_values.dofs_per_cell; ++j)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
mass_matrix[cell->index()](i, j) += fe_values.shape_value(i, q) *
fe_values.shape_value(j, q) *
fe_values.reinit(cell);
right_hand_side.vector_value_list(fe_values.get_quadrature_points(),
rhs_values);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
n_q_points, std::vector<Tensor<1, 2>>(n_components));
fe_values.get_function_gradients(solution, grads_here);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// double u0 = this_value[q_point](0);
// double v0 = this_value[q_point](1);
{
coefficient->value_list(fe_values.get_quadrature_points(),
coefficient_values);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
coefficient->vector_value_list(fe_values.get_quadrature_points(),
coefficient_vector_values);
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
}
}
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (auto point : fe_values.quadrature_point_indices())
{
const double weight = fe_values.JxW(point);
// const double weight = q.weight(point);
rhs_values);
cell_vector = 0;
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (auto point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
cell_vector(i) += rhs_values[point] *
fe_values.shape_value(i, point) *
rhs_values);
cell_vector = 0;
- for (unsigned int point = 0; point < n_q_points; ++point)
+ for (auto point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int comp_i = 0; comp_i < fe.n_components();
++comp_i)
++cell)
{
fe_values.reinit(cell);
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
AssertThrow(fe_values.shape_value(0, q) == 1, ExcInternalError());
}
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
boundary_integral +=
fe_face_values[single_component].value(i, q) *
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<3, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral +=
fe_values[single_component].third_derivative(i, q) *
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<2, dim> hessian =
fe_face_values[single_component].hessian(i, q);
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<3, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral +=
fe_values[single_component].third_derivative(i, q) *
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<2, dim> hessian =
fe_face_values[single_component].hessian(i, q);
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
boundary_integral +=
fe_face_values[single_component].value(i, q) *
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<2, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].hessian(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<1, dim> gradient =
fe_face_values[single_component].gradient(i, q);
fe_values.get_quadrature_points();
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
deallog << "dof=" << i << " qp=" << q_points[q_point]
<< " f(qp)=" << function.value(q_points[q_point])
<< " N(qp)=" << fe_values.shape_value(i, q_point)
fe_face_values.get_quadrature_points();
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_face_values.quadrature_point_indices())
deallog << "dof=" << i << " qp=" << q_points[q_point]
<< " f(qp)=" << function.value(q_points[q_point])
<< " N(qp)=" << fe_face_values.shape_value(i, q_point)
fe_values.get_function_values(solution_pou, solution_values_pou);
fe_values.get_function_values(solution, solution_values);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
deallog << " qp=" << q_points[q_point]
<< " f(qp)=" << function.value(q_points[q_point])
<< " U_fe(qp)=" << solution_values_fe[q_point]
fe_values.get_function_values(solution, solution_values);
deallog << " cell=" << cell->center() << std::endl;
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// find non-zero shape_value
deallog << " qp=" << q_points[q_point]
rhs_values.resize(n_q_points);
rhs.value_list(fe_values.get_quadrature_points(), rhs_values);
- for (unsigned int q_index = 0; q_index < n_q_points; ++q_index)
+ for (const auto q_index : fe_values.quadrature_point_indices())
{
double radius = center.distance(fe_values.quadrature_point(q_index));
tmp_rhs_value);
// add tmp to the total one at quadrature points
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
rhs_value[q_point] += tmp_rhs_value[q_point];
}
cell_system_matrix = 0;
cell_rhs = 0;
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
for (unsigned int j = i; j < dofs_per_cell; ++j)
// check shape functions
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values_system.quadrature_point_indices())
check_consistency(
q_points[q_point],
function,
fe_face_values_system.get_quadrature_points();
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points_face; ++q_point)
+ for (const auto q_point :
+ fe_face_values_system.quadrature_point_indices())
check_consistency(
q_points[q_point],
function,
// check shape functions
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values_system.quadrature_point_indices())
check_consistency(
q_points[q_point],
fun1,
fe_face_values_system.get_quadrature_points();
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points_face; ++q_point)
+ for (const auto q_point :
+ fe_face_values_system.quadrature_point_indices())
check_consistency(
q_points[q_point],
fun1,
potential.value_list(fe_values.get_quadrature_points(),
potential_values);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int j = i; j < dofs_per_cell; ++j)
{
if (cell->active_fe_index() == 0) // plain FE
{
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int j = i; j < dofs_per_cell; ++j)
{
if (i_group == fe_group && j_group == fe_group) // fe - fe
{
- for (unsigned int q_point = 0; q_point < n_q_points;
- ++q_point)
+ for (const auto q_point :
+ fe_values.quadrature_point_indices())
{
cell_stiffness_matrix(i, j) +=
(fe_values[fe_extractor].gradient(i, q_point) *
else if (i_group == fe_group &&
j_group == pou_group) // fe - pou
{
- for (unsigned int q_point = 0; q_point < n_q_points;
- ++q_point)
+ for (const auto q_point :
+ fe_values.quadrature_point_indices())
{
cell_stiffness_matrix(i, j) +=
(fe_values[fe_extractor].gradient(i, q_point) *
else if (i_group == pou_group &&
j_group == fe_group) // pou - fe
{
- for (unsigned int q_point = 0; q_point < n_q_points;
- ++q_point)
+ for (const auto q_point :
+ fe_values.quadrature_point_indices())
{
cell_stiffness_matrix(i, j) +=
((fe_values[pou_extractor].gradient(i,
Assert(i_group == pou_group && j_group == pou_group,
ExcInternalError());
- for (unsigned int q_point = 0; q_point < n_q_points;
- ++q_point)
+ for (const auto q_point :
+ fe_values.quadrature_point_indices())
{
cell_stiffness_matrix(i, j) +=
((fe_values[pou_extractor].gradient(i,
fe_field_function.vector_value_list(fe_values.get_quadrature_points(),
values);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < 3; ++d)
deallog << values_ref[q_point][d] - values[q_point](d) << " ";
values);
std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
cell->get_dof_indices(dof_indices);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < 3; ++d)
deallog << values_ref[q_point][d] - values[q_point](d) << " ";
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
boundary_integral +=
fe_face_values[single_component].value(i, q) *
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<2, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].hessian(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<1, dim> gradient =
fe_face_values[single_component].gradient(i, q);
right_hand_side.vector_value_list(fe_values.get_quadrature_points(),
rhs_values);
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
Tensor<1, dim, std::complex<double>> rhs;
right_hand_side.vector_value_list(fe_values.get_quadrature_points(),
rhs_values);
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
Tensor<1, dim> rhs;
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
boundary_integral +=
fe_face_values[single_component].value(i, q) *
right_hand_side.rhs_value_list(fe_values.get_quadrature_points(),
rhs_value_list);
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
Tensor<1, dim> rhs_value;
for (unsigned int d = 0; d < dim; ++d)
// Calc values of curlE from fe solution:
cell->get_dof_indices(local_dof_indices);
// Loop over quad points to calculate solution:
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// Split exact solution into real/imaginary parts:
for (unsigned int component = 0; component < dim; component++)
rhs_value_list);
// Loop over all element quad points:
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// store rhs value at this q point & turn into tensor
for (unsigned int component = 0; component < dim; component++)
const std::vector<double> &JxW_values = fe_values.get_JxW_values();
fe_values[vec].get_function_divergences(v, div_v);
fe_values[vec].get_function_curls(v, curl_v);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
total_div += JxW_values[q_point] * div_v[q_point];
total_curl += JxW_values[q_point] * curl_v[q_point];
fe_values[vec].get_function_divergences(v, div_v);
fe_values[vec].get_function_curls(v, curl_v);
fe_values[vec].get_function_hessians(v, hessians);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
total_div += JxW_values[q_point] * div_v[q_point];
total_curl += JxW_values[q_point] * curl_v[q_point];
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<3, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral +=
fe_values[single_component].third_derivative(i, q) *
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<2, dim> hessian =
fe_face_values[single_component].hessian(i, q);
cell_rhs = 0;
for (unsigned int i = 0; i < dofs_per_cell; ++i)
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
for (unsigned int j = 0; j < dofs_per_cell; ++j)
cell_matrix(i, j) +=
right_hand_side.vector_value_list(fe_values.get_quadrature_points(),
rhs_values);
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int k = 0; k < dofs_per_cell; ++k)
{
const std::vector<Point<dim>> &quad_points =
fe_v_face.get_quadrature_points();
- for (unsigned int q = 0; q < n_q_face; ++q)
+ for (const auto q : fe_v_face.quadrature_point_indices())
{
double jump =
jumpfunction.jump(quad_points[q], normals[q]);
fe_v.reinit(cell);
cell->get_dof_indices(local_dof_indices);
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_v.quadrature_point_indices())
{
double div = 0;
for (unsigned int i = 0; i < dofs_per_cell - 1; ++i)
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
boundary_integral +=
fe_face_values[single_component].value(i, q) *
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<2, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].hessian(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<1, dim> gradient =
fe_face_values[single_component].gradient(i, q);
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<3, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral +=
fe_values[single_component].third_derivative(i, q) *
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<2, dim> hessian =
fe_face_values[single_component].hessian(i, q);
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<1, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].gradient(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
boundary_integral +=
fe_face_values[single_component].value(i, q) *
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<2, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral += fe_values[single_component].hessian(i, q) *
fe_values.JxW(q);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<1, dim> gradient =
fe_face_values[single_component].gradient(i, q);
ss << "component=" << c << ", dof=" << i << std::endl;
Tensor<3, dim> bulk_integral;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
bulk_integral +=
fe_values[single_component].third_derivative(i, q) *
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
fe_face_values.reinit(cell, face);
- for (unsigned int q = 0;
- q < fe_face_values.n_quadrature_points;
- ++q)
+ for (const auto q : fe_face_values.quadrature_point_indices())
{
Tensor<2, dim> hessian =
fe_face_values[single_component].hessian(i, q);
cell_rhs = 0.0;
fe_values.reinit(cell);
- for (unsigned int q_point_n = 0;
- q_point_n < fe_values.n_quadrature_points;
- ++q_point_n)
+ for (const auto q_point_n : fe_values.quadrature_point_indices())
{
const double point_forcing =
manufactured_forcing->value(fe_values.quadrature_point(q_point_n));
FEValuesExtractors::Scalar single_component(c);
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "i=" << i << ", q=" << q << std::endl;
deallog << " " << fe_values[single_component].value(i, q) << ' ';
FEValuesExtractors::Vector vec_components(c);
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "i=" << i << ", q=" << q << std::endl;
deallog << " " << fe_values[vec_components].value(i, q) << ' ';
FEValuesExtractors::Scalar single_component(c);
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "i=" << i << ", q=" << q << std::endl;
deallog << " " << fe_values[single_component].value(i, q)
FEValuesExtractors::Vector vec_components(c);
for (unsigned int i = 0; i < fe_values.dofs_per_cell; ++i)
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << "i=" << i << ", q=" << q << std::endl;
deallog << " ";
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << scalar_values[q] << std::endl;
Assert(std::fabs(scalar_values[q] - vector_values[q](c)) <=
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << scalar_values[q] << std::endl;
Assert((scalar_values[q] - vector_values[q][c]).norm() <=
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << scalar_values[q] << std::endl;
Assert((scalar_values[q] - vector_values[q][c]).norm() <=
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << scalar_values[q] << std::endl;
Assert(std::fabs(scalar_values[q] - vector_values[q](c)) <=
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < dim; ++d)
deallog << scalar_values[q][d] << (d < dim - 1 ? " " : "");
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int e = 0; e < dim; ++e)
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int e = 0; e < dim; ++e)
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int e = 0; e < dim; ++e)
scalar_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int e = 0; e < dim; ++e)
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
deallog << selected_vector_values[q][d] << std::endl;
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
deallog << selected_vector_values[q][d] << std::endl;
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
deallog << selected_vector_values[q][d] << std::endl;
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
deallog << selected_vector_values[q][d] << std::endl;
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
for (unsigned int e = 0; e < dim; ++e)
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
for (unsigned int e = 0; e < dim; ++e)
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << selected_vector_values[q] << std::endl;
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int e = 0; e < dim; ++e)
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << selected_vector_values[q] << std::endl;
fe_function, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
deallog << selected_vector_values[q] << std::endl;
function_vals, selected_vector_values);
deallog << "component=" << c << std::endl;
- for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
for (unsigned int d = 0; d < dim; ++d)
{
for (unsigned int e = 0; e < dim; ++e)
right_hand_side.rhs_value_list(fe_values.get_quadrature_points(),
rhs_value_list);
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
Tensor<1, dim> rhs_value;
for (unsigned int d = 0; d < dim; ++d)
// Calc values of curlE from fe solution:
cell->get_dof_indices(local_dof_indices);
// Loop over quad points to calculate solution:
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// Split exact solution into real/imaginary parts:
for (unsigned int component = 0; component < dim; component++)
rhs_value_list);
// Loop over all element quad points:
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
// store rhs value at this q point & turn into tensor
for (unsigned int component = 0; component < dim; component++)
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int j = 0; j < dofs_per_cell; ++j)
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
const unsigned int comp_i = fe.system_to_component_index(i).first,
comp_j = fe.system_to_component_index(j).first;
for (unsigned int comp_i = 0; comp_i < fe.n_components(); ++comp_i)
for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
for (unsigned int comp_j = 0; comp_j < fe.n_components(); ++comp_j)
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
// velocity-velocity coupling?
if ((comp_i < dim) && (comp_j < dim))
for (unsigned int comp_j = 0; comp_j < fe.n_components();
++comp_j)
if (fe.get_nonzero_components(j)[comp_j] == true)
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
// velocity-velocity coupling?
if ((comp_i < dim) && (comp_j < dim))
for (unsigned int comp_i = 0; comp_i < fe.n_components(); ++comp_i)
for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
for (unsigned int comp_j = 0; comp_j < fe.n_components(); ++comp_j)
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
// velocity-velocity coupling?
if ((comp_i < dim) && (comp_j < dim))
for (unsigned int comp_j = 0; comp_j < fe.n_components();
++comp_j)
if (fe.get_nonzero_components(j)[comp_j] == true)
- for (unsigned int q = 0; q < n_q_points; ++q)
+ for (const auto q : fe_values.quadrature_point_indices())
{
// velocity-velocity coupling?
if ((comp_i < dim) && (comp_j < dim))
Vector<double>(n_components));
fe_values.get_function_values(solution, this_value);
- for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
+ for (const auto q_point : fe_values.quadrature_point_indices())
{
double u = this_value[q_point](0), v = this_value[q_point](1);
Point<2> p = fe_values.quadrature_point(q_point);
n_q_proj, Vector<double>(n_components));
fe_v_n.get_function_values(solution, this_value_n);
- for (unsigned int q_point = 0; q_point < n_q_face; ++q_point)
+ for (const auto q_point : fe_v_face.quadrature_point_indices())
{
Tensor<1, 2> vn = fe_v_face.normal_vector(q_point);
double nx = vn[0];
n_q_face, Vector<double>(n_components));
fe_v_face_n.get_function_values(solution, this_value_n);
- for (unsigned int q_point = 0; q_point < n_q_face; ++q_point)
+ for (const auto q_point : fe_v_face.quadrature_point_indices())
{
Tensor<1, 2> vn = fe_v_face.normal_vector(q_point);
double nx = vn[0];