adouble *x = new adouble[n];
adouble y = 1.0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
xp[i] = (i + 1.0) / (2.0 + i);
trace_on(1);
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
{
x[i] <<= xp[i];
y *= x[i];
gradient(1, n, xp, g);
double err_grad = 0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
err_grad += std::abs(g[i] - yp / xp[i]);
deallog << "Error (gradient): " << err_grad << std::endl;
hessian(1, n, xp, H);
double error_hess = 0;
- for (unsigned int i = 0; i < n; i++)
- for (unsigned int j = 0; j < n; j++)
+ for (unsigned int i = 0; i < n; ++i)
+ for (unsigned int j = 0; j < n; ++j)
if (i > j)
error_hess += std::abs(H[i][j] - g[i] / xp[j]);
delete[] g;
g = nullptr;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
delete[] H[i];
delete[] H;
H = nullptr;
adtl::setNumDir(n);
adtl::adouble *x = new adtl::adouble[n];
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
{
x[i] = (i + 1.0) / (2.0 + i);
x[i].setADValue(i, 1);
}
adtl::adouble y = 1.0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
y *= x[i];
// --- Function ---
// --- Gradient ---
double err_grad = 0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
err_grad += std::abs(y.getADValue(i) - y.getValue() / x[i].getValue());
deallog << "Error (gradient): " << err_grad << std::endl;
std::vector<adouble> y(m, 1.0);
if (reset_values == false)
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
xp[i] = (i + 1.0) / (2.0 + i);
trace_on(tape_index);
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
{
x[i] <<= xp[i];
for (unsigned int j = 0; j < m; ++j)
// --- Change values ---
if (reset_values == true)
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
xp[i] = (i + 1.0) / (2.0 + i);
// --- Functions ---
jacobian(tape_index, m, n, xp.data(), J);
deallog << "Function jacobian J:" << std::endl;
- for (unsigned int j = 0; j < m; j++)
+ for (unsigned int j = 0; j < m; ++j)
{
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
deallog << J[j][i] << (i < n - 1 ? "," : "");
deallog << std::endl;
delete[] f;
f = nullptr;
- for (unsigned int j = 0; j < m; j++)
+ for (unsigned int j = 0; j < m; ++j)
delete[] J[j];
delete[] J;
J = nullptr;
adouble *x = new adouble[n];
adouble *y = new adouble[m];
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
xp[i] = (i + 1.0) / (2.0 + i);
for (unsigned int j = 0; j < m; ++j)
y[j] = 1.0;
trace_on(1);
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
{
x[i] <<= xp[i];
for (unsigned int j = 0; j < m; ++j)
jacobian(1, m, n, xp, J);
deallog << "Function jacobian J:" << std::endl;
- for (unsigned int j = 0; j < m; j++)
+ for (unsigned int j = 0; j < m; ++j)
{
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
deallog << J[j][i] << (i < n - 1 ? "," : "");
deallog << std::endl;
delete[] f;
f = nullptr;
- for (unsigned int j = 0; j < m; j++)
+ for (unsigned int j = 0; j < m; ++j)
delete[] J[j];
delete[] J;
J = nullptr;
adtl::setNumDir(n);
adtl::adouble *x = new adtl::adouble[n];
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
{
x[i] = (i + 1.0) / (2.0 + i);
x[i].setADValue(i, 1);
for (unsigned int j = 0; j < m; ++j)
y[j] = 1.0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
for (unsigned int j = 0; j < m; ++j)
y[j] *= (j + 1) * x[i];
// --- Jacobian ---
deallog << "Function jacobian J:" << std::endl;
- for (unsigned int j = 0; j < m; j++)
+ for (unsigned int j = 0; j < m; ++j)
{
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
deallog << y[j].getADValue(i) << (i < n - 1 ? "," : "");
deallog << std::endl;
index_sets[this_subdomain].add_range(i_min, subdomain_association.size());
}
- for (unsigned int i = 0; i < n_subdomains; i++)
+ for (unsigned int i = 0; i < n_subdomains; ++i)
index_sets[i].compress();
return index_sets;
/* keep constrained dofs */ true);
std::vector<dealii::types::global_dof_index> n_locally_owned_dofs(
n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
dealii::SparsityTools::distribute_sparsity_pattern(csp,
{
std::vector<std::complex<double>> lambda(eigenfunctions.size());
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
eigenfunctions[i] = PetscScalar();
dealii::SolverControl solver_control(dof_handler.n_dofs(),
}
}
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
dealii::deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-normal:
index_sets[this_subdomain].add_range(i_min, subdomain_association.size());
}
- for (unsigned int i = 0; i < n_subdomains; i++)
+ for (unsigned int i = 0; i < n_subdomains; ++i)
index_sets[i].compress();
return index_sets;
constraints,
/* keep constrained dofs */ true);
std::vector<types::global_dof_index> n_locally_owned_dofs(n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
SparsityTools::distribute_sparsity_pattern(csp,
const double shift = 4.0;
std::vector<std::complex<double>> lambda(eigenfunctions.size());
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
eigenfunctions[i] = 0.;
}
}
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-normal:
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
if (std::abs(eigenfunctions[j] * Bx - (i == j)) > 1e-8)
deallog << "Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
if (std::abs(eigenfunctions[j] * Bx - (i == j)) > 1e-8)
deallog << "Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
if (std::abs(eigenfunctions[j] * Bx - (i == j)) > 1e-8)
deallog << "Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
index_sets[this_subdomain].add_range(i_min, subdomain_association.size());
}
- for (unsigned int i = 0; i < n_subdomains; i++)
+ for (unsigned int i = 0; i < n_subdomains; ++i)
index_sets[i].compress();
return index_sets;
/* keep constrained dofs */ true);
std::vector<dealii::types::global_dof_index> n_locally_owned_dofs(
n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
dealii::SparsityTools::distribute_sparsity_pattern(csp,
{
std::vector<std::complex<double>> lambda(eigenfunctions.size());
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
eigenfunctions[i] = PetscScalar();
dealii::SolverControl solver_control(dof_handler.n_dofs(),
eigenfunctions,
eigenvalues.size());
- for (unsigned int i = 0; i < lambda.size(); i++)
+ for (unsigned int i = 0; i < lambda.size(); ++i)
eigenvalues[i] = lambda[i].real();
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
dealii::deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-orthonormal:
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
eigenvalues.size());
deallog.depth_file(previous_depth);
- for (unsigned int i = 0; i < lambda.size(); i++)
+ for (unsigned int i = 0; i < lambda.size(); ++i)
eigenvalues[i] = lambda[i].real();
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-orthonormal:
{
mass.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
laplace, mass, invert, lambda, eigenfunctions, eigenvalues.size());
deallog.depth_file(previous_depth);
- for (unsigned int i = 0; i < lambda.size(); i++)
+ for (unsigned int i = 0; i < lambda.size(); ++i)
eigenvalues[i] = lambda[i].real();
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-orthonormal:
{
mass.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
{
const double err = std::abs(eigenfunctions[j] * Bx - (i == j));
Assert(err < precision,
laplace, mass, invert, lambda, eigenfunctions, eigenvalues.size());
deallog.depth_file(previous_depth);
- for (unsigned int i = 0; i < lambda.size(); i++)
+ for (unsigned int i = 0; i < lambda.size(); ++i)
eigenvalues[i] = lambda[i].real();
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-orthonormal:
LinearAlgebra::distributed::Vector<double> Ax(eigenfunctions[0]);
for (unsigned int i = 0; i < eigenfunctions.size(); ++i)
{
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
{
const double err =
std::abs(eigenfunctions[j] * eigenfunctions[i] - (i == j));
index_sets[this_subdomain].add_range(i_min, subdomain_association.size());
}
- for (unsigned int i = 0; i < n_subdomains; i++)
+ for (unsigned int i = 0; i < n_subdomains; ++i)
index_sets[i].compress();
return index_sets;
constraints,
/* keep constrained dofs */ true);
std::vector<types::global_dof_index> n_locally_owned_dofs(n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
SparsityTools::distribute_sparsity_pattern(csp,
const double shift = 4.0;
std::vector<std::complex<double>> lambda(eigenfunctions.size());
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
eigenfunctions[i] = 0.;
static ReductionControl inner_control_c(/*maxiter*/ stiffness_matrix.m(),
eigenvalues.size());
deallog.depth_file(previous_depth);
- for (unsigned int i = 0; i < lambda.size(); i++)
+ for (unsigned int i = 0; i < lambda.size(); ++i)
eigenvalues[i] = lambda[i].real();
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-orthonormal:
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
std::pair<Point<spacedim>, Point<spacedim>> boundaries;
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
boundaries.first[i] = 0.2 - i * 0.2;
boundaries.second[i] = 0.8 + i * 0.8;
{
std::pair<Point<3>, Point<3>> boundaries;
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < 3; ++i)
{
boundaries.second[i] = 1.0;
}
std::pair<Point<spacedim>, Point<spacedim>> unit;
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
unit.first[i] = 0.0;
unit.second[i] = 1.0;
deallog << b.get_boundary_points().second << std::endl;
std::pair<Point<spacedim>, Point<spacedim>> boundaries;
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
unit.first[i] = 1.0;
unit.second[i] = 2.0 + i;
test_bounding_box()
{
std::pair<Point<spacedim>, Point<spacedim>> unit;
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
unit.first[i] = 0.0;
unit.second[i] = 1.0;
// This is a simple neighbor
std::pair<Point<spacedim>, Point<spacedim>> second;
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
second.first[i] = 1.0;
second.second[i] = 2.0;
std::pair<Point<spacedim>, Point<spacedim>> second_1;
second_1.first[0] = 0.0;
second_1.second[0] = 1.0;
- for (int i = 1; i < spacedim; i++)
+ for (int i = 1; i < spacedim; ++i)
{
second_1.first[i] = 1.0;
second_1.second[i] = 2.0;
deallog << "Is neighbor D with D: " << (int)d.get_neighbor_type(d)
<< std::endl;
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
second.first[i] = -10.0;
second.second[i] = -8.0;
<< std::endl;
// A and F are mergeable because one next to the other
- for (int i = 0; i < spacedim; i++)
+ for (int i = 0; i < spacedim; ++i)
{
second.first[i] = 0.0;
second.second[i] = 1.0;
qpd_const_optional = manager_const.try_get_data(cell);
AssertThrow(qpd_optional, ExcInternalError());
AssertThrow(qpd_const_optional, ExcInternalError());
- for (unsigned int q = 0; q < q_points.size(); q++)
+ for (unsigned int q = 0; q < q_points.size(); ++q)
{
const double correct_value = func.value(q_points[q]);
const double value = qpd[q]->value;
data_storage.initialize(cell, rhs.size());
std::vector<std::shared_ptr<MyQData>> qpd =
data_storage.get_data(cell);
- for (unsigned int q = 0; q < rhs.size(); q++)
+ for (unsigned int q = 0; q < rhs.size(); ++q)
qpd[q]->value = my_func.value(q_points[q]);
{
// before initialization of the next cell, try_get_data must
{
std::vector<std::shared_ptr<MyQData>> qpd =
data_storage.get_data(cell);
- for (unsigned int q = 0; q < rhs.size(); q++)
+ for (unsigned int q = 0; q < rhs.size(); ++q)
qpd[q]->value = my_func.value(q_points[q]);
}
{
std::vector<std::shared_ptr<MyQData>> qpd =
data_storage.get_data(cell);
- for (unsigned int q = 0; q < rhs.size(); q++)
+ for (unsigned int q = 0; q < rhs.size(); ++q)
AssertThrow(qpd[q]->value == default_value,
ExcWrongValue(qpd[q]->value,
default_value,
test_all_coordinate_directions()
{
deallog << "dim = " << dim << std::endl;
- for (unsigned int direction = 0; direction < dim; direction++)
+ for (unsigned int direction = 0; direction < dim; ++direction)
test_truncates_derivatives_correctly<dim>(direction);
}
const Functions::LevelSet::Plane<dim> level_set(point_in_plane, normal);
Point<dim> point;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
point[i] = 1;
print_derivatives_at_point(level_set, point);
check_value(const Function<dim> &f)
{
Point<dim> p;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] = i;
deallog << f.value(p) << std::endl;
check_gradient(const Function<dim> &f)
{
Point<dim> p;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] = i;
deallog << f.gradient(p) << std::endl;
check_laplacian(const Function<dim> &f)
{
Point<dim> p;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] = i;
deallog << f.laplacian(p) << std::endl;
{
deallog << " d = " << d << std::endl;
Point<dim> p;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] = i;
deallog << f.value(p, d) << std::endl;
{
deallog << " d = " << d << std::endl;
Point<dim> p;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] = i;
deallog << f.gradient(p, d) << std::endl;
{
deallog << " d = " << d << std::endl;
Point<dim> p;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] = i;
deallog << f.laplacian(p, d) << std::endl;
{
const unsigned int n_points = 10;
std::vector<double> x(n_points), y(n_points);
- for (unsigned int i = 0; i < n_points; i++)
+ for (unsigned int i = 0; i < n_points; ++i)
{
x[i] = i + 0.5 * std::sin(i);
y[i] = i + std::cos(i * i);
{
const unsigned int n_points = 10;
std::vector<double> x(n_points), y(n_points);
- for (unsigned int i = 0; i < n_points; i++)
+ for (unsigned int i = 0; i < n_points; ++i)
{
x[i] = i + 0.5 * std::sin(i);
y[i] = i + std::cos(i * i);
Assert(r > 0.0, ExcMessage("r is not positive"));
dir /= r;
SymmetricTensor<2, dim> dir_x_dir;
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = i; j < dim; j++)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = i; j < dim; ++j)
dir_x_dir[i][j] = dir[i] * dir[j];
return Z * std::exp(-Z * r) *
{
std::array<double, dim> res;
res[0] = -Z * std::exp(-Z * sp[0]);
- for (unsigned int i = 1; i < dim; i++)
+ for (unsigned int i = 1; i < dim; ++i)
res[i] = 0.;
return res;
}
{
std::array<double, 6> res;
res[0] = Z * Z * std::exp(-Z * sp[0]);
- for (unsigned int i = 1; i < 6; i++)
+ for (unsigned int i = 1; i < 6; ++i)
res[i] = 0.;
return res;
}
sp[1] = theta;
sp[2] = phi;
Point<dim> p = GeometricUtilities::Coordinates::from_spherical(sp);
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] += center[i];
// check values:
sp[1] = theta;
sp[2] = phi;
Point<dim> p = GeometricUtilities::Coordinates::from_spherical(sp);
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
p[i] += center[i];
// check values:
const Point<dim> origin;
std::array<double, dim> sorigin;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
sorigin[d] = 0.;
Point<dim> one;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
one[d] = 1.;
std::array<double, dim> sone;
Point<dim> p = GeometricUtilities::Coordinates::from_spherical(sp);
const std::array<double, dim> sp2 =
GeometricUtilities::Coordinates::to_spherical(p);
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
AssertThrow(std::fabs(sp[i] - sp2[i]) <= std::fabs(sp[i]) * 1e-10,
DifferentComponent(i, sp[i], sp2[i]));
}
GeometryInfo<dim>::unit_normal_vector[i];
deallog << "Direction " << i << " = " << unit_normal_vector << std::endl;
// check consistency with other arrays within GeometryInfo
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int j = 0; j < dim; ++j)
{
const double obtained = unit_normal_vector[j];
const double expected =
is1.print(deallog);
deallog << "List of indices: " << std::endl;
- for (unsigned int i = 0; i < indices.size(); i++)
+ for (unsigned int i = 0; i < indices.size(); ++i)
deallog << indices[i] << ' ';
deallog << std::endl;
- for (unsigned int i = 0; i < indices.size(); i++)
+ for (unsigned int i = 0; i < indices.size(); ++i)
Assert(is1.index_within_set(indices[i]) == i, ExcInternalError());
deallog << "OK" << std::endl;
deallog << "Original index set: " << std::endl;
is1.print(deallog);
- for (unsigned int i = 0; i < is1.size(); i++)
+ for (unsigned int i = 0; i < is1.size(); ++i)
Assert(is1.is_element(i) == zeros_and_ones[i], ExcInternalError());
deallog << "OK" << std::endl;
src.size()),
ArrayView<double>(dst.data(), dst.size()));
- for (size_t i = 0; i < src.size(); i++)
+ for (size_t i = 0; i < src.size(); ++i)
deallog << static_cast<int>(src[i]) << " ";
deallog << std::endl;
- for (size_t i = 0; i < dst.size(); i++)
+ for (size_t i = 0; i < dst.size(); ++i)
deallog << static_cast<int>(dst[i]) << " ";
deallog << std::endl;
}
if (cell->is_active() && cell->is_locally_owned())
{
auto c = cell->center();
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
c[i] = c[i] / delta;
const auto lid = static_cast<unsigned int>(norm_point_to_lex(c));
if (dim == 2 && dir == 0)
{
- for (unsigned int j = 0, c = start * n_points_face; j < end; j++)
- for (unsigned int i = start; i < n_points_1D; i++)
+ for (unsigned int j = 0, c = start * n_points_face; j < end; ++j)
+ for (unsigned int i = start; i < n_points_1D; ++i)
indices_want.push_back(c++);
}
else if (dim == 2 && dir == 1)
{
- for (unsigned int j = 0; j < n_points_1D; j++)
- for (unsigned int i = start; i < end; i++)
+ for (unsigned int j = 0; j < n_points_1D; ++j)
+ for (unsigned int i = start; i < end; ++i)
indices_want.push_back(j * n_points_face + i);
}
else
comm);
AlignedVector<double> src(indices_has.size());
- for (unsigned int i = 0; i < indices_has.size(); i++)
+ for (unsigned int i = 0; i < indices_has.size(); ++i)
src[i] = indices_has[i];
src.size()),
ArrayView<double>(dst.data(), dst.size()));
- for (size_t i = 0; i < src.size(); i++)
+ for (size_t i = 0; i < src.size(); ++i)
deallog << static_cast<int>(src[i]) << " ";
deallog << std::endl;
- for (size_t i = 0; i < dst.size(); i++)
+ for (size_t i = 0; i < dst.size(); ++i)
deallog << static_cast<int>(dst[i]) << " ";
deallog << std::endl << std::endl;
- for (size_t i = 0; i < dst.size(); i++)
+ for (size_t i = 0; i < dst.size(); ++i)
AssertDimension(dst[i], indices_want[i]);
}
void
test_dim(const MPI_Comm &comm, const bool do_revert)
{
- for (int dir = 0; dir < dim; dir++)
+ for (int dir = 0; dir < dim; ++dir)
test<dim>(comm, do_revert, dir);
}
AlignedVector<double> src(index_set_has.size(), 0);
AlignedVector<double> dst(index_set_want.size(), 0);
- for (unsigned int i = 0; i < index_set_has.size(); i++)
+ for (unsigned int i = 0; i < index_set_has.size(); ++i)
src[i] = Utilities::MPI::this_mpi_process(comm) * 100 + i;
vector.export_to_ghosted_array(ArrayView<const double>(src.data(),
src.size()),
ArrayView<double>(dst.data(), dst.size()));
- for (size_t i = 0; i < src.size(); i++)
+ for (size_t i = 0; i < src.size(); ++i)
deallog << static_cast<int>(src[i]) << " ";
deallog << std::endl;
- for (size_t i = 0; i < dst.size(); i++)
+ for (size_t i = 0; i < dst.size(); ++i)
deallog << static_cast<int>(dst[i]) << " ";
deallog << std::endl;
}
{
deallog << "dim = " << dim << std::endl;
- for (unsigned int direction = 0; direction < dim; direction++)
+ for (unsigned int direction = 0; direction < dim; ++direction)
test_truncates_derivatives_correctly<dim>(direction);
}
AssertDimension(roots.size(), degree);
Vector<double> roots_reference(degree);
LAPACKFullMatrix<double> eigenvalue_mat(degree, degree);
- for (unsigned int k = 1; k < degree; k++)
+ for (unsigned int k = 1; k < degree; ++k)
{
eigenvalue_mat(k - 1, k) = std::sqrt(
4. * k * (k + alpha) * (k + beta) * (k + alpha + beta) /
AssertDimension(roots.size(), degree);
Vector<double> roots_reference(degree);
LAPACKFullMatrix<double> eigenvalue_mat(degree, degree);
- for (unsigned int k = 1; k < degree; k++)
+ for (unsigned int k = 1; k < degree; ++k)
{
eigenvalue_mat(k - 1, k) = std::sqrt(
4. * k * (k + alpha) * (k + beta) * (k + alpha + beta) /
// arbitrary point
double evalutation_number = 12.123;
- for (unsigned int pp = 0; pp < p_dim; pp++)
+ for (unsigned int pp = 0; pp < p_dim; ++pp)
{
coefficients_a.push_back(pp);
fe_values.get_quadrature_points();
const std::vector<std::shared_ptr<const DATA>> qpd =
manager.get_data(cell);
- for (unsigned int q = 0; q < q_points.size(); q++)
+ for (unsigned int q = 0; q < q_points.size(); ++q)
{
const double value = func.value(q_points[q]);
const double value2 = qpd[q]->value;
data_storage.initialize(cell, rhs.size());
std::vector<std::shared_ptr<MyQData>> qpd =
data_storage.get_data(cell);
- for (unsigned int q = 0; q < rhs.size(); q++)
+ for (unsigned int q = 0; q < rhs.size(); ++q)
qpd[q]->value = my_func.value(q_points[q]);
}
dof_handler.clear();
fe_values.get_quadrature_points();
const std::vector<std::shared_ptr<const DATA>> qpd =
manager.get_data(cell);
- for (unsigned int q = 0; q < q_points.size(); q++)
+ for (unsigned int q = 0; q < q_points.size(); ++q)
{
const double f_1 = func.value(q_points[q], 0);
const double f_2 = func.value(q_points[q], 1);
data_storage.initialize(cell, rhs.size());
std::vector<std::shared_ptr<MyQData>> qpd =
data_storage.get_data(cell);
- for (unsigned int q = 0; q < rhs.size(); q++)
+ for (unsigned int q = 0; q < rhs.size(); ++q)
{
qpd[q]->value1 = my_func.value(q_points[q], 0);
qpd[q]->value2 = my_func.value(q_points[q], 1);
fe_values.get_quadrature_points();
const std::vector<std::shared_ptr<const MyData>> qpd =
manager.template get_data<MyData>(cell);
- for (unsigned int q = 0; q < q_points.size(); q++)
+ for (unsigned int q = 0; q < q_points.size(); ++q)
{
const double f_1 = func.value(q_points[q], 0);
const double f_2 = func.value(q_points[q], 1);
data_storage.template initialize<MyData>(cell, rhs.size());
std::vector<std::shared_ptr<MyData>> qpd =
data_storage.template get_data<MyData>(cell);
- for (unsigned int q = 0; q < rhs.size(); q++)
+ for (unsigned int q = 0; q < rhs.size(); ++q)
{
qpd[q]->value1 = my_func.value(q_points[q], 0);
qpd[q]->value2 = my_func.value(q_points[q], 1);
test()
{
dealii::TableIndices<dim> new_size;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
new_size[d] = 5;
dealii::Table<dim, int> unrolled;
create_box()
{
std::pair<Point<dim>, Point<dim>> lower_upper_corner;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
{
lower_upper_corner.first[i] = -1.0 / (i + 1);
lower_upper_corner.second[i] = 1.0 / (i + 1);
gradient(const Point<dim> &, const unsigned int) const override
{
Tensor<1, dim> grad;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
grad[i] = i + 1;
return grad;
hessian(const Point<dim> &, const unsigned int) const
{
SymmetricTensor<2, dim> hess;
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = 0; j < dim; ++j)
hess[i][j] = (i + 1) * (j + 1);
return hess;
deallog << "value: ";
print_bounds(value_bounds);
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
{
deallog << "gradient[" << i << "]: ";
print_bounds(gradient_bounds[i]);
auto exponentiated_array = Utilities::fixed_power<3>(array);
- for (unsigned int i = 0; i < VectorizedArrayType::size(); i++)
+ for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i)
deallog << exponentiated_array[i] << " ";
deallog << std::endl;
exponentiated_array = Utilities::fixed_power<-3>(array);
- for (unsigned int i = 0; i < VectorizedArrayType::size(); i++)
+ for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i)
deallog << exponentiated_array[i] << " ";
deallog << std::endl;
}
{
deallog << " test " << VectorizedArrayType::size() << " array elements"
<< std::endl;
- for (unsigned int i = 0; i < VectorizedArrayType::size(); i++)
+ for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i)
if (array[i] != number)
deallog << " problem in element " << i << std::endl;
}
auto exponentiated_array = std::pow(array, number);
- for (unsigned int i = 0; i < VectorizedArrayType::size(); i++)
+ for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i)
deallog << exponentiated_array[i] << " ";
deallog << std::endl;
}
auto exponentiated_array = std::pow(array, number);
- for (unsigned int i = 0; i < VectorizedArrayType::size(); i++)
+ for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i)
deallog << exponentiated_array[i] << " ";
deallog << std::endl;
}
<< std::endl;
VectorizedArrayType left;
- for (unsigned int i = 0; i < VectorizedArrayType::size(); i++)
+ for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i)
left[i] = i + 1.;
VectorizedArrayType right(3.);
offsets[v] = v * n_numbers;
std::array<Number *, width> other_and_offset;
- for (unsigned int v = 0; v < width; v++)
+ for (unsigned int v = 0; v < width; ++v)
other_and_offset[v] = other + offsets[v];
for (unsigned int i = 0; i < n_vectors; ++i)
{
VectorizedArray<Number> vector;
- for (unsigned int v = 0; v < VectorizedArray<Number>::size(); v++)
+ for (unsigned int v = 0; v < VectorizedArray<Number>::size(); ++v)
vector[v] = v;
test_const(vector);
// (i.e. the first component of the FESystem)
// 1 for yes, 0 for no.
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
deallog << " shapefunction " << i
<< " is Nedelec: " << (fe.is_primitive(i) ? "false" : "true")
<< std::endl;
for (; cell != endc; ++cell)
{
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
deallog << " DoF " << local_dof_indices[i]
<< " belongs to base element "
<< fe.system_to_base_index(i).first.first << ", instance "
for (; cell != endc; ++cell)
{
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
deallog << " DoF " << local_dof_indices[i] << " belongs to base "
<< fe.system_to_base_index(i).first.first << ", instance "
<< fe.system_to_base_index(i).first.second << std::endl;
// (i.e. the first component of the FESystem)
// 1 for yes, 0 for no.
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
deallog << " shapefunction " << i
<< " is Nedelec: " << (fe.is_primitive(i) ? "false" : "true")
<< std::endl;
for (; cell != endc; ++cell)
{
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
deallog << " DoF " << local_dof_indices[i]
<< " belongs to base element "
<< fe.system_to_base_index(i).first.first << ", instance "
for (; cell != endc; ++cell)
{
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
deallog << " DoF " << local_dof_indices[i] << " belongs to base "
<< fe.system_to_base_index(i).first.first << ", instance "
<< fe.system_to_base_index(i).first.second << std::endl;
const std::vector<types::global_dof_index> dofs_per_component =
DoFTools::count_dofs_per_fe_component(dof_handler);
- for (unsigned int i = 0; i < 3; i++)
+ for (unsigned int i = 0; i < 3; ++i)
{
deallog << "DoFs in the " << i
<< ". component: " << dofs_per_component.at(i) << std::endl;
const std::vector<types::global_dof_index> dofs_per_component_hp =
DoFTools::count_dofs_per_fe_component(hp_dof_handler);
- for (unsigned int i = 0; i < 3; i++)
+ for (unsigned int i = 0; i < 3; ++i)
{
deallog << "DoFs in the " << i
<< ". component: " << dofs_per_component_hp.at(i) << std::endl;
const std::vector<Point<2>> &v = tria.get_vertices();
MappingQ<2> map(1);
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::pair<Triangulation<2>::active_cell_iterator, Point<2>> cell =
GridTools::find_active_cell_around_point(map, tria, v[i]);
MappingQ<2> map(5);
// Test for a number of points, every ten degrees
- for (unsigned int i = 0; i < 200; i++)
+ for (unsigned int i = 0; i < 200; ++i)
{
Point<2> p(std::sin((double)i / 100. * numbers::PI),
std::cos((double)i / 100. * numbers::PI));
void
check(Triangulation<2> &tria)
{
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::vector<Triangulation<2>::active_cell_iterator> cells =
GridTools::find_cells_adjacent_to_vertex(tria, i);
deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": "
<< cells.size() << " cells" << std::endl;
- for (unsigned c = 0; c < cells.size(); c++)
+ for (unsigned c = 0; c < cells.size(); ++c)
{
for (const unsigned int v : GeometryInfo<2>::vertex_indices())
deallog << "<" << cells[c]->vertex(v) << "> ";
void
check(Triangulation<3> &tria)
{
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::vector<Triangulation<3>::active_cell_iterator> cells =
GridTools::find_cells_adjacent_to_vertex(tria, i);
deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": "
<< cells.size() << " cells" << std::endl;
- for (unsigned c = 0; c < cells.size(); c++)
+ for (unsigned c = 0; c < cells.size(); ++c)
deallog << " " << cells[c] << std::endl;
}
}
void
check(Triangulation<2> &tria)
{
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::vector<Triangulation<2>::active_cell_iterator> cells =
GridTools::find_cells_adjacent_to_vertex(tria, i);
deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": "
<< cells.size() << " cells" << std::endl;
- for (unsigned c = 0; c < cells.size(); c++)
+ for (unsigned c = 0; c < cells.size(); ++c)
deallog << " " << cells[c] << std::endl;
}
}
void
check(Triangulation<2> &tria)
{
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::vector<Triangulation<2>::active_cell_iterator> cells =
GridTools::find_cells_adjacent_to_vertex(tria, i);
deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": "
<< cells.size() << " cells" << std::endl;
- for (unsigned c = 0; c < cells.size(); c++)
+ for (unsigned c = 0; c < cells.size(); ++c)
deallog << " " << cells[c] << std::endl;
}
}
void
check(Triangulation<3> &tria)
{
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::vector<Triangulation<3>::active_cell_iterator> cells =
GridTools::find_cells_adjacent_to_vertex(tria, i);
deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": "
<< cells.size() << " cells" << std::endl;
- for (unsigned c = 0; c < cells.size(); c++)
+ for (unsigned c = 0; c < cells.size(); ++c)
deallog << " " << cells[c] << std::endl;
}
}
void
check(Triangulation<3> &tria)
{
- for (unsigned i = 0; i < tria.n_vertices(); i++)
+ for (unsigned i = 0; i < tria.n_vertices(); ++i)
{
std::vector<Triangulation<3>::active_cell_iterator> cells =
GridTools::find_cells_adjacent_to_vertex(tria, i);
deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": "
<< cells.size() << " cells" << std::endl;
- for (unsigned c = 0; c < cells.size(); c++)
+ for (unsigned c = 0; c < cells.size(); ++c)
deallog << " " << cells[c] << std::endl;
}
}
check(Triangulation<3> &tria)
{
const std::vector<Point<3>> &v = tria.get_vertices();
- for (unsigned i = 0; i < v.size(); i++)
+ for (unsigned i = 0; i < v.size(); ++i)
deallog << "["
<< GridTools::find_closest_vertex(tria,
v[i] +
// definitely inside the domain (we here
// have a circle of radius 1, so find
// points inside a radius of 0.9)
- for (int i = 0; i < 1000; i++)
+ for (int i = 0; i < 1000; ++i)
{
double r = sqrt(.9 * random_value<double>());
double phi = 2 * 3.14 * (1.0 * Testing::rand() / RAND_MAX);
DoFTools::map_dofs_to_support_points(mapping_collection, dof_handler, hp_map);
// output the elements
- for (unsigned int i = 0; i < hp_map.size(); i++)
+ for (unsigned int i = 0; i < hp_map.size(); ++i)
{
// both maps should contain the same
Assert(hp_map[i] == map[i], ExcInternalError());
hp_map);
// output the elements
- for (unsigned int i = 0; i < hp_map.size(); i++)
+ for (unsigned int i = 0; i < hp_map.size(); ++i)
{
deallog << " Location of " << i << " th DoF: " << hp_map[i] << " | ";
}
const unsigned int cycle)
{
unsigned int n_points = 2;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
// don't test exactly at the support points, since point_value is not stable
// there
const double eps = 1. / (16. * n_points);
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<double> value1(1);
Vector<double> value2(1);
<< "pass" << std::endl;
}
}
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<double> value1(1);
Vector<double> value2(1);
const bool expected2d[] = {1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0};
const bool expected3d[] = {1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0};
const bool *expected = dim == 2 ? expected2d : expected3d;
- for (int i = 0; i < 11; i++)
+ for (int i = 0; i < 11; ++i)
{
Point<dim> testpoint;
testpoint(0) = testcoord[i][0];
const bool expected2d[] = {1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1};
const bool expected3d[] = {1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0};
const bool *expected = dim == 2 ? expected2d : expected3d;
- for (int i = 0; i < 14; i++)
+ for (int i = 0; i < 14; ++i)
{
Point<dim> testpoint;
testpoint(0) = testcoord[i][0];
check(const FiniteElement<dim> &fe)
{
for (const unsigned int face : GeometryInfo<dim>::face_indices())
- for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
+ for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
if (fe.has_support_on_face(i, face))
deallog << "Basis function " << i << " has support on face " << face
<< std::endl;
SparseMatrix<double> A(sparsity);
// and loop over the elements of it
- for (SparseMatrix<double>::const_iterator k = A.begin(); k != A.end(); k++)
+ for (SparseMatrix<double>::const_iterator k = A.begin(); k != A.end(); ++k)
deallog << k->row() << ' ' << k->column() << ' ' << k->value() << std::endl;
}
Step4<2>::check_periodicity(const unsigned int cycle) const
{
unsigned int n_points = 4;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
// don't test exactly at the support points, since point_value is not stable
bool all_passed = true;
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<double> value1(1);
Vector<double> value2(1);
Step4<2>::check_periodicity(const unsigned int cycle) const
{
unsigned int n_points = 4;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
// don't test exactly at the support points, since point_value is not stable
bool all_passed = true;
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<double> value1(1);
Vector<double> value2(1);
virtual void
vector_value(const Point<dim> &p, Vector<double> &values) const
{
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
values(i) = p(i);
}
};
for (unsigned int j = 0; j < 13; ++j)
{
exact_integral = 0;
- for (unsigned int k = 0; k <= j; k++)
+ for (unsigned int k = 0; k <= j; ++k)
exact_integral +=
newton_binomial(j, k) * pow(a, static_cast<int>(j - k)) *
(pow(b - a, static_cast<int>(k) + 1) / (k + 1) * log(b - a) -
{
initlog();
- for (unsigned int n = 1; n < 5; n++)
+ for (unsigned int n = 1; n < 5; ++n)
{
deallog << "Test<1,2>, continuous finite element q_" << n << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_2.inp", n);
{
initlog();
- for (unsigned int n = 1; n < 5; n++)
+ for (unsigned int n = 1; n < 5; ++n)
{
deallog << "Test<1,2>, continuous finite element q_" << n << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_2.inp", n);
solution = 1.0;
deallog << "Old values:" << std::endl;
- for (unsigned int i = 0; i < solution.size(); i++)
+ for (unsigned int i = 0; i < solution.size(); ++i)
deallog << solution(i) << std::endl;
soltrans.interpolate(solution, tmp);
deallog << "New values:" << std::endl;
- for (unsigned int i = 0; i < tmp.size(); i++)
+ for (unsigned int i = 0; i < tmp.size(); ++i)
deallog << tmp(i) << std::endl;
return 0;
void
fill_matrix(FullMatrix<number> &A)
{
- for (unsigned int i = 0; i < A.m(); i++)
- for (unsigned int j = 0; j < A.n(); j++)
+ for (unsigned int i = 0; i < A.m(); ++i)
+ for (unsigned int j = 0; j < A.n(); ++j)
A(i, j) = number(i * A.n() + j + 1);
}
display_matrix(FullMatrix<number> M)
{
deallog << M.m() << "x" << M.n() << " matrix" << std::endl;
- for (unsigned int i = 0; i < M.m(); i++)
+ for (unsigned int i = 0; i < M.m(); ++i)
{
- for (unsigned int j = 0; j < M.n(); j++)
+ for (unsigned int j = 0; j < M.n(); ++j)
deallog << M(i, j) << " ";
deallog << std::endl;
}
void
fill_tensor_2(Tensor<2, b> &T)
{
- for (unsigned int i = 0; i < b; i++)
- for (unsigned int j = 0; j < b; j++)
+ for (unsigned int i = 0; i < b; ++i)
+ for (unsigned int j = 0; j < b; ++j)
T[i][j] = i * b + j + 1;
}
display_tensor_2(Tensor<2, b> &T)
{
deallog << b << "x" << b << " tensor" << std::endl;
- for (unsigned int i = 0; i < b; i++)
+ for (unsigned int i = 0; i < b; ++i)
{
- for (unsigned int j = 0; j < b; j++)
+ for (unsigned int j = 0; j < b; ++j)
deallog << T[i][j] << " ";
deallog << std::endl;
}
Tensor<2, 3> T1;
fill_tensor_2(T1);
- for (unsigned int n = 0; n < 3; n++)
- for (unsigned int i = 0; i < 10 - n; i++)
- for (unsigned int j = 0; j < 10 - n; j++)
+ for (unsigned int n = 0; n < 3; ++n)
+ for (unsigned int i = 0; i < 10 - n; ++i)
+ for (unsigned int j = 0; j < 10 - n; ++j)
{
A1.copy_from(T1, 0, n, 0, n, i, j);
display_matrix(A1);
FullMatrix<double> A2(3, 3);
fill_matrix(A2);
Tensor<2, 3> T2;
- for (unsigned int n = 0; n < 3; n++)
- for (unsigned int i = 0; i < 3 - n; i++)
- for (unsigned int j = 0; j < 3 - n; j++)
+ for (unsigned int n = 0; n < 3; ++n)
+ for (unsigned int i = 0; i < 3 - n; ++i)
+ for (unsigned int j = 0; j < 3 - n; ++j)
{
A2.copy_to(T2, 0, n, 0, n, i, j);
display_tensor_2(T2);
indexset_1.add_index(5);
indexset_1.compress();
LinearAlgebra::ReadWriteVector<double> rw_vector(indexset_1);
- for (unsigned int i = 0; i < local_nonzero.n_elements(); i++)
+ for (unsigned int i = 0; i < local_nonzero.n_elements(); ++i)
rw_vector(local_nonzero.nth_index_in_set(i)) =
local_nonzero.nth_index_in_set(i);
ExcDimensionMismatch(computed_quantities.size(),
inputs.solution_values.size()));
- for (unsigned int i = 0; i < computed_quantities.size(); i++)
+ for (unsigned int i = 0; i < computed_quantities.size(); ++i)
{
Assert(computed_quantities[i].size() == 1,
ExcDimensionMismatch(computed_quantities[i].size(), 1));
ExcDimensionMismatch(computed_quantities.size(),
inputs.solution_values.size()));
- for (unsigned int i = 0; i < computed_quantities.size(); i++)
+ for (unsigned int i = 0; i < computed_quantities.size(); ++i)
{
Assert(computed_quantities[i].size() == 2,
ExcDimensionMismatch(computed_quantities[i].size(), 2));
// Print out all DoF support points on the two faces:
deallog << "DoFs of face_1:";
- for (unsigned int c = 0; c < fe.n_components(); c++)
+ for (unsigned int c = 0; c < fe.n_components(); ++c)
{
deallog << std::endl << " component " << c << ":";
for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
}
deallog << std::endl;
deallog << "DoFs of face_2:";
- for (unsigned int c = 0; c < fe.n_components(); c++)
+ for (unsigned int c = 0; c < fe.n_components(); ++c)
{
deallog << std::endl << " component " << c << ":";
for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
// Print out all DoF support points on the two faces:
deallog << "DoFs of face_1:";
- for (unsigned int c = 0; c < fe.n_components(); c++)
+ for (unsigned int c = 0; c < fe.n_components(); ++c)
{
deallog << std::endl << " component " << c << ":";
for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
}
deallog << std::endl;
deallog << "DoFs of face_2:";
- for (unsigned int c = 0; c < fe.n_components(); c++)
+ for (unsigned int c = 0; c < fe.n_components(); ++c)
{
deallog << std::endl << " component " << c << ":";
for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
cm.distribute(constrained);
// Cast Vector<double> to Vector<std::complex<double>>
- for (unsigned int index = 0; index < unconstrained.size(); index++)
+ for (unsigned int index = 0; index < unconstrained.size(); ++index)
{
unconstrained_complex[index] = unconstrained[index];
}
ExcDimensionMismatch(return_value.size(), this->n_components));
// Just fill the vector with the appropriate components
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
if (std::sqrt(center.square()) < 0.25)
ExcDimensionMismatch(return_value.size(), this->n_components));
// Parabolic inflow profile
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
ExcDimensionMismatch(return_value.size(), this->n_components));
// Just fill the vector with the appropriate components
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
const Tensor<1, dim> &B) const
{
double return_val = 0;
- for (unsigned int k = 0; k < dim; k++)
+ for (unsigned int k = 0; k < dim; ++k)
{
return_val += A[k] * B[k];
}
const Vector<double> &B) const
{
double return_val = 0;
- for (unsigned int k = 0; k < dim; k++)
+ for (unsigned int k = 0; k < dim; ++k)
{
return_val += A[k] * B(k);
}
ExcDimensionMismatch(return_value.size(), this->n_components));
// Parabolic inflow profile
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
std::vector<Vector<double>> shape_functions(dof_handler.n_dofs());
std::vector<std::string> names;
- for (unsigned int s = 0; s < shape_functions.size(); s++)
+ for (unsigned int s = 0; s < shape_functions.size(); ++s)
{
names.push_back(std::string("N_") + dealii::Utilities::int_to_string(s));
DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
{
data_out.add_data_vector(shape_functions[i], names[i]);
}
#ifdef DATA_OUT_FE_ENRICHED
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
if (!constraints.is_constrained(s))
{
names.push_back(std::string("N_") +
DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
{
names.push_back(std::string("N_") + dealii::Utilities::int_to_string(s));
// find out which
unsigned int local_dof = 0;
cell->get_dof_indices(local_dof_indices);
- for (; local_dof < dofs_per_cell; local_dof++)
+ for (; local_dof < dofs_per_cell; ++local_dof)
if (local_dof_indices[local_dof] == global_dof)
break;
DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
// output to check if all is good:
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
{
Vector<double> shape_function;
shape_function.reinit(dof_handler.n_dofs());
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
// output to check if all is good:
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
{
Vector<double> shape_function;
shape_function.reinit(dof_handler.n_dofs());
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
// output to check if all is good:
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
{
Vector<double> shape_function;
shape_function.reinit(dof_handler.n_dofs());
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(patches);
Assert(r > 0.0, ExcMessage("r is not positive"));
dir /= r;
SymmetricTensor<2, dim> dir_x_dir;
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = i; j < dim; j++)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = i; j < dim; ++j)
dir_x_dir[i][j] = dir[i] * dir[j];
return std::exp(-r) *
{
Point<dim> p1, p2;
std::vector<unsigned int> repetitions(dim);
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = -1.0;
p2[d] = 2.0;
Assert(r > 0.0, ExcMessage("r is not positive"));
dir /= r;
SymmetricTensor<2, dim> dir_x_dir;
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = i; j < dim; j++)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = i; j < dim; ++j)
dir_x_dir[i][j] = dir[i] * dir[j];
return std::exp(-r) *
DoFHandler<dim> dof_handler_system(triangulation);
Point<dim> p1, p2, p3;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = 0.0;
p2[d] = 0.0;
{
Point<dim> p1, p2;
std::vector<unsigned int> repetitions(dim);
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = -1.0;
p2[d] = 2.0;
/* keep constrained dofs */ false);
std::vector<types::global_dof_index> n_locally_owned_dofs(n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] =
locally_owned_dofs_per_processor[i].n_elements();
eigenfunctions,
eigenfunctions.size());
- for (unsigned int i = 0; i < eigenfunctions.size(); i++)
+ for (unsigned int i = 0; i < eigenfunctions.size(); ++i)
{
constraints.distribute(eigenfunctions[i]);
eigenfunctions_locally_relevant[i] = eigenfunctions[i];
number_of_eigenvalues);
std::vector<Vector<float> *> error(number_of_eigenvalues);
- for (unsigned int i = 0; i < number_of_eigenvalues; i++)
+ for (unsigned int i = 0; i < number_of_eigenvalues; ++i)
{
sol[i] = &eigenfunctions_locally_relevant[i];
error[i] = &vec_estimated_error_per_cell[i];
}
// sum up for a global:
- for (unsigned int c = 0; c < estimated_error_per_cell.size(); c++)
+ for (unsigned int c = 0; c < estimated_error_per_cell.size(); ++c)
{
double er = 0.0;
- for (unsigned int i = 0; i < number_of_eigenvalues; i++)
+ for (unsigned int i = 0; i < number_of_eigenvalues; ++i)
er += vec_estimated_error_per_cell[i][c] *
vec_estimated_error_per_cell[i][c];
<< triangulation.n_active_cells() << sep << dof_handler.n_dofs()
<< sep << std::scientific;
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
output << eigenvalues[i] << sep;
output << std::endl;
void
EigenvalueProblem<dim>::run()
{
- for (unsigned int cycle = 0; cycle < 4; cycle++)
+ for (unsigned int cycle = 0; cycle < 4; ++cycle)
{
pcout << "Cycle " << cycle << std::endl;
const std::pair<unsigned int, unsigned int> n_cells = setup_system();
/* keep constrained dofs */ false);
std::vector<types::global_dof_index> n_locally_owned_dofs(n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] =
locally_owned_dofs_per_processor[i].n_elements();
eigenfunctions,
eigenfunctions.size());
- for (unsigned int i = 0; i < eigenfunctions.size(); i++)
+ for (unsigned int i = 0; i < eigenfunctions.size(); ++i)
{
constraints.distribute(eigenfunctions[i]);
eigenfunctions_locally_relevant[i] = eigenfunctions[i];
number_of_eigenvalues);
std::vector<dealii::Vector<float> *> error(number_of_eigenvalues);
- for (unsigned int i = 0; i < number_of_eigenvalues; i++)
+ for (unsigned int i = 0; i < number_of_eigenvalues; ++i)
{
sol[i] = &eigenfunctions_locally_relevant[i];
error[i] = &vec_estimated_error_per_cell[i];
}
// sum up for a global:
- for (unsigned int c = 0; c < estimated_error_per_cell.size(); c++)
+ for (unsigned int c = 0; c < estimated_error_per_cell.size(); ++c)
{
double er = 0.0;
- for (unsigned int i = 0; i < number_of_eigenvalues; i++)
+ for (unsigned int i = 0; i < number_of_eigenvalues; ++i)
er += vec_estimated_error_per_cell[i][c] *
vec_estimated_error_per_cell[i][c];
<< triangulation.n_active_cells() << sep << dof_handler.n_dofs()
<< sep << std::scientific;
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
output << eigenvalues[i] << sep;
output << std::endl;
void
EigenvalueProblem<dim>::run()
{
- for (unsigned int cycle = 0; cycle < 2; cycle++)
+ for (unsigned int cycle = 0; cycle < 2; ++cycle)
{
pcout << "Cycle " << cycle << std::endl;
const std::pair<unsigned int, unsigned int> n_cells = setup_system();
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++)
+ for (unsigned int component = 0; component < dim; ++component)
{
exactsol[component] = exactsol_list[q_point][component];
exactcurlsol[component] = exactcurlsol_list[q_point][component];
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 component = 0; component < dim; ++component)
{
rhs_value_vector[component] =
rhs_value_list[q_point](component);
fourier_coefficients);
deallog << "calculated:" << std::endl;
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
deallog << fourier_coefficients[i].real() << " "
<< fourier_coefficients[i].imag() << std::endl;
deallog << "exact:" << std::endl;
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
deallog << exact[i].real() << " " << exact[i].imag() << std::endl;
}
legendre.calculate(local_dof_values, cell_active_fe_index, coeff_out);
}
- for (unsigned int i = 0; i < coeff_in.size(); i++)
+ for (unsigned int i = 0; i < coeff_in.size(); ++i)
deallog << coeff_in[i] << " ";
deallog << std::endl;
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
deallog << coeff_out[i] << " ";
deallog << std::endl;
const unsigned int dim = 2;
const unsigned int N = 4;
Table<dim, double> coefficients(4, 4);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
coefficients(i, j) = i * N + j;
std::pair<std::vector<unsigned int>, std::vector<double>> res =
FESeries::process_coefficients<2, double>(coefficients, pred_ind, norm);
- for (unsigned int i = 0; i < res.first.size(); i++)
+ for (unsigned int i = 0; i < res.first.size(); ++i)
deallog << res.first[i] << " : " << res.second[i] << std::endl;
}
hp::FECollection<dim> fe_collection;
hp::QCollection<dim> quadrature_formula;
- for (unsigned int p = poly_degree; p <= poly_degree + 3; p++)
+ for (unsigned int p = poly_degree; p <= poly_degree + 3; ++p)
{
fe_collection.push_back(dealii::FE_Q<dim>(p));
quadrature_formula.push_back(dealii::QGauss<dim>(p + 1 + 5));
legendre.calculate(local_dof_values, cell_active_fe_index, coeff_out);
deallog << "local dofs:";
- for (unsigned int i = 0; i < cell_n_dofs; i++)
+ for (unsigned int i = 0; i < cell_n_dofs; ++i)
dealii::deallog << " " << local_dof_values[i];
dealii::deallog << std::endl;
}
deallog << "calculated:" << std::endl;
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
deallog << coeff_out[i] << std::endl;
std::vector<double> coeff_exp(3);
coeff_exp[1] = 3.123557585310879e-4;
coeff_exp[2] = 2.104375000953028e-4;
deallog << "exact:" << std::endl;
- for (unsigned int i = 0; i < coeff_exp.size(); i++)
+ for (unsigned int i = 0; i < coeff_exp.size(); ++i)
deallog << coeff_exp[i] << std::endl;
dof_handler.clear();
{
const unsigned int dim = 1;
deallog << "Pl @ -1;0;1" << std::endl;
- for (unsigned int l = 0; l < N; l++)
+ for (unsigned int l = 0; l < N; ++l)
{
deallog << "l=" << l << ": ";
for (double x = -1.0; x <= 1.0; x += 1.0)
QGauss<dim> quadrature(8);
deallog << "orthogonality: " << std::endl;
- for (unsigned int k1 = 0; k1 < N; k1++)
- for (unsigned int k2 = 0; k2 < N; k2++)
+ for (unsigned int k1 = 0; k1 < N; ++k1)
+ for (unsigned int k2 = 0; k2 < N; ++k2)
{
double ortho = 0;
for (unsigned int q = 0; q < quadrature.size(); ++q)
Lh(const Point<dim> &x_q, const TableIndices<dim> &indices)
{
double res = 1.0;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
const double x = 2.0 * (x_q[d] - 0.5);
Assert((x_q[d] <= 1.0) && (x_q[d] >= 0.),
{
double f = 0.0;
- for (unsigned int i = 0; i < coefficients.size(0); i++)
- for (unsigned int j = 0; j < coefficients.size(1); j++)
+ for (unsigned int i = 0; i < coefficients.size(0); ++i)
+ for (unsigned int j = 0; j < coefficients.size(1); ++j)
f += Lh(point, TableIndices<2>(i, j)) * coefficients(i, j);
return f;
{
double f = 0.0;
- for (unsigned int i = 0; i < coefficients.size(0); i++)
- for (unsigned int j = 0; j < coefficients.size(1); j++)
- for (unsigned int k = 0; k < coefficients.size(2); k++)
+ for (unsigned int i = 0; i < coefficients.size(0); ++i)
+ for (unsigned int j = 0; j < coefficients.size(1); ++j)
+ for (unsigned int k = 0; k < coefficients.size(2); ++k)
f += Lh(point, TableIndices<3>(i, j, k)) * coefficients(i, j, k);
return f;
void
print(const Table<2, double> &coeff)
{
- for (unsigned int i = 0; i < coeff.size(0); i++)
- for (unsigned int j = 0; j < coeff.size(1); j++)
+ for (unsigned int i = 0; i < coeff.size(0); ++i)
+ for (unsigned int j = 0; j < coeff.size(1); ++j)
deallog << coeff(i, j) << " ";
deallog << std::endl;
}
void
print(const Table<3, double> &coeff)
{
- for (unsigned int i = 0; i < coeff.size(0); i++)
- for (unsigned int j = 0; j < coeff.size(1); j++)
- for (unsigned int k = 0; k < coeff.size(2); k++)
+ for (unsigned int i = 0; i < coeff.size(0); ++i)
+ for (unsigned int j = 0; j < coeff.size(1); ++j)
+ for (unsigned int k = 0; k < coeff.size(2); ++k)
deallog << coeff(i, j, k) << " ";
deallog << std::endl;
}
resize(Table<3, double> &coeff, const unsigned int N)
{
TableIndices<3> size;
- for (unsigned int d = 0; d < 3; d++)
+ for (unsigned int d = 0; d < 3; ++d)
size[d] = N;
coeff.reinit(size);
}
hp::QCollection<dim> quadrature_formula;
// add some extra FEs in fe_collection
- for (unsigned int p = 1; p <= max_poly; p++)
+ for (unsigned int p = 1; p <= max_poly; ++p)
{
fe_collection.push_back(FE_Q<dim>(p));
quadrature_formula.push_back(QGauss<dim>(p + 1 + 5));
const unsigned int p = 1;
Table<dim, double> coeff_in(coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
- for (unsigned int j = 0; j < coeff_1d; j++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
coeff_in(i, j) = 1.0 + ind++;
LegendreFunction<dim> function(coeff_in);
const unsigned int p = 2;
Table<dim, double> coeff_in(coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
- for (unsigned int j = 0; j < coeff_1d; j++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
coeff_in(i, j) = 1.0 + ind++;
LegendreFunction<dim> function(coeff_in);
const unsigned int p = 1;
Table<dim, double> coeff_in(coeff_1d, coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
- for (unsigned int j = 0; j < coeff_1d; j++)
- for (unsigned int k = 0; k < coeff_1d; k++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
+ for (unsigned int k = 0; k < coeff_1d; ++k)
coeff_in(i, j, k) = 1.0 + ind++;
LegendreFunction<dim> function(coeff_in);
const unsigned int p = 2;
Table<dim, double> coeff_in(coeff_1d, coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
- for (unsigned int j = 0; j < coeff_1d; j++)
- for (unsigned int k = 0; k < coeff_1d; k++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
+ for (unsigned int k = 0; k < coeff_1d; ++k)
coeff_in(i, j, k) = 1.0 + ind++;
LegendreFunction<dim> function(coeff_in);
QGauss<1> base_quadrature(2);
QIterated<dim> quadrature(base_quadrature, N);
- for (unsigned int i = 0; i < fe_collection.size(); i++)
+ for (unsigned int i = 0; i < fe_collection.size(); ++i)
fourier_q_collection.push_back(quadrature);
const std::vector<unsigned int> n_coefficients_per_direction(
0.0000000000000000e+00,
1.1949019042912971e-04,
5.9982796422221083e-05};
- for (unsigned int i = 0; i < 9; i++)
+ for (unsigned int i = 0; i < 9; ++i)
local_dof_values[i] = dofs[i];
const unsigned int cell_active_fe_index = 0;
cell_active_fe_index,
fourier_coefficients);
- for (unsigned int i = 0; i < fourier_coefficients.size(0); i++)
- for (unsigned int j = 0; j < fourier_coefficients.size(1); j++)
+ for (unsigned int i = 0; i < fourier_coefficients.size(0); ++i)
+ for (unsigned int j = 0; j < fourier_coefficients.size(1); ++j)
if ((i * i + j * j < N * N) && (i * i + j * j > 0))
deallog << (i * i + j * j) << " : " << fourier_coefficients(i, j)
<< std::endl;
const unsigned int dim = 2;
const unsigned int N = 4;
Table<dim, double> coefficients(4, 4);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
coefficients(i, j) = i * N + j;
std::pair<std::vector<unsigned int>, std::vector<double>> res =
FESeries::process_coefficients<2, double>(coefficients, pred_ind, norm);
- for (unsigned int i = 0; i < res.first.size(); i++)
+ for (unsigned int i = 0; i < res.first.size(); ++i)
deallog << res.first[i] << " : " << res.second[i] << std::endl;
}
std::vector<double> x(N), y(N);
// fill the data
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
{
x[i] = 0.1 * i;
y[i] = k_in * x[i] + b_in;
std::vector<unsigned int> block_component(n_stress_components +
n_gamma_components,
1);
- for (unsigned int ii = 0; ii < n_stress_components; ii++)
+ for (unsigned int ii = 0; ii < n_stress_components; ++ii)
block_component[ii] = 0;
DoFRenumbering::component_wise(dof_handler);
std::vector<unsigned int> block_component(n_stress_components +
n_gamma_components,
1);
- for (unsigned int ii = 0; ii < n_stress_components; ii++)
+ for (unsigned int ii = 0; ii < n_stress_components; ++ii)
block_component[ii] = 0;
DoFRenumbering::component_wise(dof_handler);
std::vector<unsigned int> block_component(n_stress_components +
n_gamma_components,
1);
- for (unsigned int ii = 0; ii < n_stress_components; ii++)
+ for (unsigned int ii = 0; ii < n_stress_components; ++ii)
block_component[ii] = 0;
DoFRenumbering::component_wise(dof_handler);
<< local_divergences[q] << std::endl
<< local_scalar_values[q] << std::endl;
- for (unsigned int m = 0; m < dim; m++)
+ for (unsigned int m = 0; m < dim; ++m)
{
- for (unsigned int n = 0; n < dim; n++)
+ for (unsigned int n = 0; n < dim; ++n)
AssertThrow((local_values[q])[m][n] == stress_value,
ExcInternalError());
std::vector<unsigned int> block_component(n_stress_components +
n_gamma_components,
1);
- for (unsigned int ii = 0; ii < n_stress_components; ii++)
+ for (unsigned int ii = 0; ii < n_stress_components; ++ii)
block_component[ii] = 0;
DoFRenumbering::component_wise(dof_handler);
{
static const unsigned int dim = 3;
{
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
{
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int j = 0; j < dim; ++j)
{
TableIndices<2> indices(i, j);
unsigned int unrolled =
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++)
+ for (unsigned int component = 0; component < dim; ++component)
{
exactsol[component] = exactsol_list[q_point][component];
exactcurlsol[component] = exactcurlsol_list[q_point][component];
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 component = 0; component < dim; ++component)
{
rhs_value_vector[component] =
rhs_value_list[q_point](component);
ExcDimensionMismatch(return_value.size(), this->n_components));
// Just fill the vector with the appropriate components
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
{
Assert(return_value.size() == this->n_components,
ExcDimensionMismatch(return_value.size(), this->n_components));
- for (unsigned int iCount = 0; iCount < this->n_components; iCount++)
+ for (unsigned int iCount = 0; iCount < this->n_components; ++iCount)
return_value(iCount) = value(p, iCount);
}
deallog << "Original Vector V" << std::endl;
deallog << "=================" << std::endl;
- for (unsigned int i = 0; i < First4.size(); i++)
+ for (unsigned int i = 0; i < First4.size(); ++i)
{
First4(i) = ints[i];
deallog << First4(i) << " ";
deallog << "Original Vector W" << std::endl;
deallog << "=================" << std::endl;
- for (unsigned int i = 0; i < Second4.size(); i++)
+ for (unsigned int i = 0; i < Second4.size(); ++i)
{
Second4(i) = ints[i + 1];
deallog << Second4(i) << " ";
deallog << "Vector V" << std::endl;
deallog << "========" << std::endl;
- for (unsigned int i = 0; i < First9.size(); i++)
+ for (unsigned int i = 0; i < First9.size(); ++i)
{
First9(i) = ints[i];
deallog << First9(i) << " ";
deallog << "Vector V" << std::endl;
deallog << "========" << std::endl;
- for (unsigned int i = 0; i < First9.size(); i++)
+ for (unsigned int i = 0; i < First9.size(); ++i)
{
First9(i) = ints[8 - i];
deallog << First9(i) << " ";
{
const number tolerance = 100. * std::numeric_limits<number>::epsilon();
deallog << M.m() << "x" << M.n() << " matrix" << std::endl;
- for (unsigned int i = 0; i < M.m(); i++)
+ for (unsigned int i = 0; i < M.m(); ++i)
{
- for (unsigned int j = 0; j < M.n(); j++)
+ for (unsigned int j = 0; j < M.n(); ++j)
deallog << filter_out_small_numbers(M(i, j), tolerance) << " ";
deallog << std::endl;
}
{
const number tolerance = 100. * std::numeric_limits<number>::epsilon();
deallog << M.m() << "x" << M.n() << " matrix" << std::endl;
- for (unsigned int i = 0; i < M.m(); i++)
+ for (unsigned int i = 0; i < M.m(); ++i)
{
- for (unsigned int j = 0; j < M.n(); j++)
+ for (unsigned int j = 0; j < M.n(); ++j)
deallog << filter_out_small_numbers(M(i, j), tolerance) << " ";
deallog << std::endl;
}
void
fill_matrix(FullMatrix<number> &A)
{
- for (unsigned int i = 0; i < A.m(); i++)
- for (unsigned int j = 0; j < A.n(); j++)
+ for (unsigned int i = 0; i < A.m(); ++i)
+ for (unsigned int j = 0; j < A.n(); ++j)
A(i, j) = number(i * A.n() + j + 1);
}
void
fill_matrix_invertible(FullMatrix<number> &A)
{
- for (unsigned int i = 0; i < A.m(); i++)
- for (unsigned int j = 0; j < A.n(); j++)
+ for (unsigned int i = 0; i < A.m(); ++i)
+ for (unsigned int j = 0; j < A.n(); ++j)
{
A(i, j) = number(i * j);
if (i == j)
{
CellId id = cell->id();
auto cell_base = tria_pdt.create_cell_iterator(id);
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
Assert(std::abs(cell->center()[d] - cell_base->center()[d]) < 1e-9,
ExcMessage("Cells do not match"));
}
auto cell_base = basetria.create_cell_iterator(id);
// Assert(cell->center() == cell_base->center(),
// ExcMessage("Cells do not match"));
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
Assert(std::abs(cell->center()[d] - cell_base->center()[d]) < 1e-9,
ExcMessage("Cells do not match"));
}
GridGenerator::hyper_cube(basetria);
basetria.refine_global(1);
- for (int i = 1; i < n_refinements; i++)
+ for (int i = 1; i < n_refinements; ++i)
{
for (auto &cell : basetria.active_cell_iterators())
{
bool refinement_flag = true;
- for (int d = 0; d < dim; d++)
+ for (int d = 0; d < dim; ++d)
refinement_flag &= cell->center()[d] < 0.5;
if (refinement_flag)
{
CellId id = cell->id();
auto cell_base = basetria.create_cell_iterator(id);
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
Assert(std::abs(cell->center()[d] - cell_base->center()[d]) < 1e-9,
ExcMessage("Cells do not match"));
}
if (cell->is_locally_owned())
{
bool flag = true;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
if (cell->center()[d] > 0.0)
flag = false;
if (flag)
if (cell->is_locally_owned())
{
bool flag = true;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
if (cell->center()[d] > 0.0)
flag = false;
if (flag)
if (cell->is_locally_owned())
{
bool flag = true;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
if (cell->center()[d] > 0.0)
flag = false;
if (flag)
if (do_mg)
{
- for (auto level = 0u; level < tria.n_levels(); level++)
+ for (auto level = 0u; level < tria.n_levels(); ++level)
deallog << "n_cells on level=" << level << ": "
<< tria.n_cells(level) << std::endl;
- for (auto level = 0u; level < tria.n_levels(); level++)
+ for (auto level = 0u; level < tria.n_levels(); ++level)
deallog << "n_active_cells on level=" << level << ": "
<< tria.n_active_cells(level) << std::endl;
}
if (do_mg)
{
- for (auto level = 0u; level < n_levels; level++)
+ for (auto level = 0u; level < n_levels; ++level)
deallog << "n_dofs on level=" << level << ": "
<< dof_handler.n_dofs(level) << std::endl;
- for (auto level = 0u; level < n_levels; level++)
+ for (auto level = 0u; level < n_levels; ++level)
deallog << "n_locally_owned_mg_dofs on level=" << level << ": "
<< dof_handler.locally_owned_mg_dofs(level).n_elements()
<< std::endl;
}
unsigned int output_computed_pts = 0;
- for (unsigned int c = 0; c < output_cells.size(); c++)
+ for (unsigned int c = 0; c < output_cells.size(); ++c)
{
output_computed_pts += output_points[c].size();
const auto &cell = output_cells[c];
std::pair<Point<spacedim>, Point<spacedim>> boundaries;
boundaries.first[0] = tot_bbox;
boundaries.second[0] = tot_bbox + 1;
- for (int i = 1; i < spacedim; i++)
+ for (int i = 1; i < spacedim; ++i)
boundaries.second[i] = 1;
BoundingBox<spacedim> new_box(boundaries);
for (unsigned int i = 0; i < tot_bbox; ++i)
{
points[i][0] = i + 0.5;
- for (unsigned int j = 1; j < spacedim; j++)
+ for (unsigned int j = 1; j < spacedim; ++j)
points[i][j] = 0.5;
}
std::pair<Point<spacedim>, Point<spacedim>> boundaries;
boundaries.first[0] = tot_bbox;
boundaries.second[0] = tot_bbox + 1;
- for (int i = 1; i < spacedim; i++)
+ for (int i = 1; i < spacedim; ++i)
boundaries.second[i] = 1;
BoundingBox<spacedim> new_box(boundaries);
for (unsigned int i = 0; i < tot_bbox; ++i)
{
points[i][0] = i + 0.5;
- for (unsigned int j = 1; j < spacedim; j++)
+ for (unsigned int j = 1; j < spacedim; ++j)
points[i][j] = 0.5;
}
{
double l2_inverse = std::numeric_limits<double>::max();
- for (unsigned int d = 0; d < distance_source.size(); d++)
+ for (unsigned int d = 0; d < distance_source.size(); ++d)
l2_inverse = std::min((p - distance_source[d]).norm_square(), l2_inverse);
l2_inverse = std::max(l2_inverse, 1.e-5);
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
if (std::sqrt(center.square()) < 0.5)
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
if (std::sqrt(center.square()) < 0.25)
cell = dof_handler.begin_active();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
deallog << "This is a "
<< (cell->active_fe_index() == 1 ? "FE_Nothing" : "FE_Q")
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
if (std::sqrt(center.square()) < 0.25)
endc =
triangulation.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
if (cell->subdomain_id() == 1)
cell->set_active_fe_index(1);
endc =
triangulation.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
if (cell->subdomain_id() == 1)
cell->set_active_fe_index(1);
endc =
triangulation.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
Point<dim> center = cell->center();
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
if (cell->subdomain_id() == 1)
cell->set_active_fe_index(1);
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl << " ";
std::vector<types::global_dof_index> local_dof_indices(
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 0)
cell->set_active_fe_index(1);
else
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 0)
cell->set_active_fe_index(1);
else
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 0)
cell->set_active_fe_index(1);
else
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl << " ";
std::vector<types::global_dof_index> local_dof_indices(
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl << " ";
std::vector<types::global_dof_index> local_dof_indices(
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl << " ";
std::vector<types::global_dof_index> local_dof_indices(
triangulationL.begin_active()->set_material_id(0);
triangulationR.begin_active()->set_material_id(id_of_lagrange_mult);
- for (unsigned int i = 0; i < n_faces_per_cell; i++)
+ for (unsigned int i = 0; i < n_faces_per_cell; ++i)
{
triangulationL.begin_active()->face(i)->set_boundary_id(i);
triangulationR.begin_active()->face(i)->set_boundary_id(n_faces_per_cell +
{
std::vector<unsigned int> block_component(
n_components, u_block); // init to represent u everywhere
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
block_component[i + dim] = lambda_block;
//(1) set active FE indices based in material id...
Triangulation<dim> triangulation;
{
Point<dim> p1, p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
p1[d] = -1;
p2[0] = 1.0;
std::vector<unsigned int> repetitoins(dim, 1);
counter++;
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
{
Vector<double> shape_function;
shape_function.reinit(dof_handler.n_dofs());
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(0);
// fill some vector
Vector<double> solution(dof_handler.n_dofs());
- for (unsigned int dof = 0; dof < dof_handler.n_dofs(); dof++)
+ for (unsigned int dof = 0; dof < dof_handler.n_dofs(); ++dof)
solution[dof] = 21.0 * (dof % 2) + 0.5 + dof % 3;
constraints.distribute(solution);
const std::vector<dealii::Point<dim>> &q_points =
fe_face_values.get_quadrature_points();
- for (unsigned int q = 0; q < n_q_points; q++)
+ for (unsigned int q = 0; q < n_q_points; ++q)
deallog << "u[" << q_points[q] << "]={" << values[q][0] << ","
<< values[q][1] << "}" << std::endl;
}
const Point<dim> &p1 = pair1.first;
const Point<dim> &p2 = pair2.first;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
const bool is_equal = (std::abs(p1[d] - p2[d]) < precision);
if (!is_equal)
Triangulation<dim> triangulation;
{
Point<dim> p1, p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
p2[d] = 1.0;
p1[0] = -1.0;
std::vector<unsigned int> repetitoins(dim, 1);
counter++;
std::vector<Vector<double>> shape_functions;
std::vector<std::string> names;
- for (unsigned int s = 0; s < dof_handler.n_dofs(); s++)
+ for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s)
{
Vector<double> shape_function;
shape_function.reinit(dof_handler.n_dofs());
}
data_out.add_data_vector(fe_index, "fe_index");
- for (unsigned int i = 0; i < shape_functions.size(); i++)
+ for (unsigned int i = 0; i < shape_functions.size(); ++i)
data_out.add_data_vector(shape_functions[i], names[i]);
data_out.build_patches(0);
// fill some vector
Vector<double> solution(dof_handler.n_dofs());
- for (unsigned int dof = 0; dof < dof_handler.n_dofs(); dof++)
+ for (unsigned int dof = 0; dof < dof_handler.n_dofs(); ++dof)
solution[dof] = 1.5 * (dof % 7) + 0.5 * dim + 2.0 * (dof % 3);
constraints.distribute(solution);
const std::vector<dealii::Point<dim>> &q_points =
fe_face_values.get_quadrature_points();
- for (unsigned int q = 0; q < n_q_points; q++)
+ for (unsigned int q = 0; q < n_q_points; ++q)
{
// since our face is [0,1]^{dim-1}, the quadrature rule
// will coincide with quadrature points on mother face.
// Use that to limit output of sub-faces at the same quadrature
// points only.
Point<dim - 1> qpt;
- for (unsigned int d = 0; d < dim - 1; d++)
+ for (unsigned int d = 0; d < dim - 1; ++d)
qpt[d] = q_points[q][d + 1];
unsigned int q_found = 0;
- for (; q_found < quad_formula.size(); q_found++)
+ for (; q_found < quad_formula.size(); ++q_found)
if (quad_formula.point(q_found).distance(qpt) < 1e-5)
break;
std::sort(pairs_point_value.begin(),
pairs_point_value.end(),
less_than_key<dim>());
- for (unsigned int p = 0; p < pairs_point_value.size(); p++)
+ for (unsigned int p = 0; p < pairs_point_value.size(); ++p)
{
const Point<dim> & pt = pairs_point_value[p].first;
const Vector<double> &val = pairs_point_value[p].second;
Assert(val.size() == n_comp, ExcInternalError());
deallog << "@" << pt << " u = {" << val[0];
- for (unsigned int c = 1; c < n_comp; c++)
+ for (unsigned int c = 1; c < n_comp; ++c)
deallog << "," << val[c];
deallog << "}" << std::endl;
}
if (apply_constrains)
deallog << hp_string << std::endl;
- for (unsigned int i = 0; i < n_dofs; i++)
+ for (unsigned int i = 0; i < n_dofs; ++i)
{
v = 0.;
v[i] = 1.;
const unsigned int n_q_points =
hp_fe_values.get_present_fe_values().n_quadrature_points;
- for (unsigned int q_index = 0; q_index < n_q_points; q_index++)
+ for (unsigned int q_index = 0; q_index < n_q_points; ++q_index)
{
- for (unsigned int i = 0; i < dofs_per_cell; i++)
+ for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
- for (unsigned int j = i; j < dofs_per_cell; j++)
+ for (unsigned int j = i; j < dofs_per_cell; ++j)
{
cell_matrix(i, j) += (fe_values.shape_grad(i, q_index) *
fe_values.shape_grad(j, q_index)) *
}
// exploit symmetry
- for (unsigned int i = 0; i < dofs_per_cell; i++)
- for (unsigned int j = i; j < dofs_per_cell; j++)
+ for (unsigned int i = 0; i < dofs_per_cell; ++i)
+ for (unsigned int j = i; j < dofs_per_cell; ++j)
cell_matrix(j, i) = cell_matrix(i, j);
setup_geometry();
setup_system();
- for (unsigned int cycle = 0; cycle <= n_cycles; cycle++)
+ for (unsigned int cycle = 0; cycle <= n_cycles; ++cycle)
{
pcout << std::endl << "Cycle " << cycle << std::endl;
n_cycles,
output_name)
{
- for (unsigned int p = 1; p <= n_cycles; p++)
+ for (unsigned int p = 1; p <= n_cycles; ++p)
{
// Laplace<dim>::fe.push_back(FE_Q_Hierarchical<dim>(p));
Laplace<dim>::fe.push_back(FE_Q<dim>(p));
*/
endc = dof_handler.end();
- for (cell = dof_handler.begin_active(); cell != endc; cell++)
+ for (cell = dof_handler.begin_active(); cell != endc; ++cell)
if (cell->level() > 1)
cell->set_coarsen_flag();
std::vector<unsigned int> block_component(total_dim, 0);
- for (unsigned int comp = 0; comp < total_dim; comp++)
+ for (unsigned int comp = 0; comp < total_dim; ++comp)
{
if (comp < solid_dim)
block_component[comp] = 0;
// prints out which dofs are coupled
deallog << "---------------Coupled dofs---------------" << std::endl;
- for (unsigned int i = 0; i < solid_fluid_pairs.size(); i++)
+ for (unsigned int i = 0; i < solid_fluid_pairs.size(); ++i)
{
deallog << "solid dof: " << solid_fluid_pairs[i].first
<< ", fluid dof: " << solid_fluid_pairs[i].second << std::endl;
}
- for (unsigned int i = 0; i < solid_fluid_pairs.size(); i++)
+ for (unsigned int i = 0; i < solid_fluid_pairs.size(); ++i)
{
deallog << "solid dof: " << solid_mesh_pairs[i].first
<< ", mesh dof: " << solid_mesh_pairs[i].second << std::endl;
}
else
{
- for (unsigned int i = 0; i < 5; i++)
+ for (unsigned int i = 0; i < 5; ++i)
{
mat.add(local_dofs1[i], local_dofs1[i], local_mat(i, i));
rhs(local_dofs1[i]) += local_vec(i);
}
- for (unsigned int i = 0; i < 5; i++)
+ for (unsigned int i = 0; i < 5; ++i)
{
mat.add(local_dofs2[i], local_dofs2[i], local_mat(i, i));
rhs(local_dofs2[i]) += local_vec(i);
// Middle rows
unsigned int start = 0;
- for (unsigned int y = 1; y < top; y++)
+ for (unsigned int y = 1; y < top; ++y)
{
start += step;
d(start) =
inv_mass.reinit(X);
// Set initial guess.
- for (unsigned int i = 0; i < N / 2; i++)
+ for (unsigned int i = 0; i < N / 2; ++i)
{
X(2 * i) = -1.2;
X(2 * i + 1) = 1.0;
eigensolver.solve(OP, mass, OP, lambda, eigenfunctions, eigenvalues.size());
deallog.depth_file(previous_depth);
- for (unsigned int i = 0; i < lambda.size(); i++)
+ for (unsigned int i = 0; i < lambda.size(); ++i)
eigenvalues[i] = lambda[i].real();
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
deallog << eigenvalues[i] << std::endl;
// make sure that we have eigenvectors and they are mass-orthonormal:
LinearAlgebra::distributed::Vector<double> Ax(eigenfunctions[0]);
for (unsigned int i = 0; i < eigenfunctions.size(); ++i)
{
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
{
const double err =
std::abs(eigenfunctions[j] * eigenfunctions[i] - (i == j));
const unsigned int num_points = 20;
deallog << "=================================" << std::endl;
;
- for (unsigned int i = 0; i < num_points; i++)
+ for (unsigned int i = 0; i < num_points; ++i)
deallog << manifold.get_intermediate_point(P1,
P2,
(1.0 * i) / (num_points - 1))
// derived
Point<dim> center;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
center[d] = d;
Triangulation<dim> triangulation;
gp.radius[0] = x[0];
gp.ball_centers[0] = Point<2>(s, 0.0);
- for (unsigned int k = 1; k < x.size(); k++)
+ for (unsigned int k = 1; k < x.size(); ++k)
{
gp.radius[k] = x[k];
gp.ball_centers[k] = Point<2>(0.0, 0.0);
vertices[8] = Point<2>(.5 * d + s, -.5 * d);
// touching circle
- for (unsigned int k = 0; k < x.size(); k++)
+ for (unsigned int k = 0; k < x.size(); ++k)
{
double z = (k == 0) ? s : 0.0;
r = x[k];
cell_v[11][3] = 15;
// layer cells
- for (unsigned int k = 1; k < x.size(); k++)
+ for (unsigned int k = 1; k < x.size(); ++k)
{
const unsigned int m = k + 1;
const double s = 0.1;
std::vector<double> x{1.0, 1.5, 2.0, 2.5, 3.0};
concentric_disks(triangulation, s, x, gp);
- for (unsigned int i = 0; i < gp.n_balls; i++)
+ for (unsigned int i = 0; i < gp.n_balls; ++i)
{
balls.emplace_back(gp.ball_centers[i]);
}
// assigning manifolds, with layers 100, 101, 102, 103
- for (unsigned int i = 0; i < gp.n_balls; i++)
+ for (unsigned int i = 0; i < gp.n_balls; ++i)
{
triangulation.set_manifold(100 + i, balls[i]);
}
double sum_1 = 0.0, sum_x = 0.0, sum_x2 = 0.0, sum_y = 0.0, sum_xy = 0.0;
- for (unsigned int i = 0; i < x.size(); i++)
+ for (unsigned int i = 0; i < x.size(); ++i)
{
sum_1 += 1.0;
sum_x += x[i];
dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
- for (unsigned int v = 0; v < vpc; v++)
+ for (unsigned int v = 0; v < vpc; ++v)
{
if (moved[cell->vertex_index(v)] == false)
{
moved[cell->vertex_index(v)] = true;
Point<dim> vertex_disp;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
vertex_disp[d] = displacements(cell->vertex_dof_index(v, d));
}
std::vector<double> m(19 * 19);
if (1) // works if changed to "if (0)" <<<<<<<<<
- for (unsigned int i = 0; i < 19; i++)
- for (unsigned int j = 0; j < 19; j++)
+ for (unsigned int i = 0; i < 19; ++i)
+ for (unsigned int j = 0; j < 19; ++j)
{
/// all points are inside
points[19 * i + j](0) = -0.7 + (i + 1) * .07;
n_components,
number>::value_type;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi_m.reinit(face);
phi_m.read_dof_values(src);
n_components,
number>::value_type;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
n_components,
number>::value_type;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi_m.reinit(face);
phi_m.read_dof_values(src);
n_components,
number>::value_type;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
const unsigned int n_vect = VectorizedArray<number>::size();
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi_m.reinit(face);
phi_m.read_dof_values(src);
const unsigned int n_vect = VectorizedArray<number>::size();
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, 1, number> phi_outer(data,
false);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi.reinit(face);
phi_outer.reinit(face);
{
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, 1, number> phi(data);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi.reinit(face);
auto quadrature_point = phi.quadrature_point(q);
VectorizedArrayType coefficient;
- for (unsigned int v = 0; v < VectorizedArrayType::size(); v++)
+ for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
{
Point<dim, Number> point;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
point[d] = quadrature_point[d][v];
coefficient[v] = (point.square() < 0.5 * 0.5) ? 20 : 1;
}
matrix_free.initialize_dof_vector(diagonal_global_reference);
matrix_free.initialize_dof_vector(temp);
- for (unsigned int i = 0; i < src.size(); i++)
+ for (unsigned int i = 0; i < src.size(); ++i)
{
if (src.get_partitioner()->in_local_range(i))
src[i] = 1.0;
if (test_matrix)
{
- for (unsigned int j = 0; j < src.size(); j++)
+ for (unsigned int j = 0; j < src.size(); ++j)
if (temp[j] != 0.0)
A_ref(j, i) = temp[j];
else if (i == j)
Number,
VectorizedArrayType>
phi(data, pair);
- for (auto cell = pair.first; cell < pair.second; cell++)
+ for (auto cell = pair.first; cell < pair.second; ++cell)
{
phi.reinit(cell);
phi.read_dof_values(src);
}
},
[&](const auto &, auto &dst, const auto &src, const auto range) {
- for (unsigned int face = range.first; face < range.second; face++)
+ for (unsigned int face = range.first; face < range.second; ++face)
{
phi_m.reinit(face);
phi_p.reinit(face);
phi_p(matrix_free, false);
- for (unsigned int i = 0; i < src.size() / 2; i++)
+ for (unsigned int i = 0; i < src.size() / 2; ++i)
src[i] = 1;
- for (unsigned int i = src.size() / 2; i < src.size(); i++)
+ for (unsigned int i = src.size() / 2; i < src.size(); ++i)
src[i] = 2;
dst = 0.0;
phi_m.read_dof_values(src);
- for (unsigned int i = 0; i < phi_m.static_dofs_per_component; i++)
+ for (unsigned int i = 0; i < phi_m.static_dofs_per_component; ++i)
deallog << static_cast<int>(phi_m.begin_dof_values()[i][0])
<< " ";
deallog << std::endl;
phi_m.gather_evaluate(src, EvaluationFlags::values);
- for (unsigned int i = 0; i < phi_m.static_n_q_points; i++)
+ for (unsigned int i = 0; i < phi_m.static_n_q_points; ++i)
deallog << static_cast<int>(phi_m.begin_values()[i][0]) << " ";
deallog << std::endl;
phi_p.read_dof_values(src);
- for (unsigned int i = 0; i < phi_p.static_dofs_per_component; i++)
+ for (unsigned int i = 0; i < phi_p.static_dofs_per_component; ++i)
deallog << static_cast<int>(phi_p.begin_dof_values()[i][0])
<< " ";
deallog << std::endl;
phi_p.gather_evaluate(src, EvaluationFlags::values);
- for (unsigned int i = 0; i < phi_p.static_n_q_points; i++)
+ for (unsigned int i = 0; i < phi_p.static_n_q_points; ++i)
deallog << static_cast<int>(phi_p.begin_values()[i][0]) << " ";
deallog << std::endl << std::endl;
}
FEFaceEvaluation<dim, fe_degree, fe_degree + 1, 1, number> check(data,
true);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
ref.reinit(face);
check.reinit(face);
FEFaceEvaluation<dim, -1, 0, 1, number> ref(data, true);
FEFaceEvaluation<dim, -1, 0, 1, number> check(data, true);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
ref.reinit(face);
check.reinit(face);
void
test()
{
- for (unsigned int i = 1; i < 25; i++)
+ for (unsigned int i = 1; i < 25; ++i)
{
- for (unsigned int j = 1; j < 25; j++)
+ for (unsigned int j = 1; j < 25; ++j)
if (FEEvaluation<dim, -1, 0, 1>::fast_evaluation_supported(i, j))
deallog << 1 << " ";
else
deallog << " ";
deallog << std::endl;
}
- for (unsigned int i = 1; i < 25; i++)
+ for (unsigned int i = 1; i < 25; ++i)
{
- for (unsigned int j = 1; j < 25; j++)
+ for (unsigned int j = 1; j < 25; ++j)
if (FEFaceEvaluation<dim, -1, 0, 1>::fast_evaluation_supported(i, j))
deallog << 1 << " ";
else
fe_val.get_function_gradients(src, reference_grads);
fe_val.get_function_hessians(src, reference_hess);
- for (int q = 0; q < (int)fe_eval.n_q_points; q++)
+ for (int q = 0; q < (int)fe_eval.n_q_points; ++q)
{
errors[0] +=
std::fabs(fe_eval.get_value(q)[j] - reference_values[q]);
{
FEFaceEvaluation<dim, fe_degree, fe_degree + 1, 1, number> fe_eval(data,
true);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
fe_val0.get_function_gradients(src[0], reference_grads0);
fe_val0.get_function_hessians(src[0], reference_hess0);
- for (int q = 0; q < (int)fe_eval0.n_q_points; q++)
+ for (int q = 0; q < (int)fe_eval0.n_q_points; ++q)
{
errors[0] +=
std::fabs(fe_eval0.get_value(q)[j] - reference_values0[q]);
fe_val1.get_function_gradients(src[1], reference_grads1);
fe_val1.get_function_hessians(src[1], reference_hess1);
- for (int q = 0; q < (int)fe_eval1.n_q_points; q++)
+ for (int q = 0; q < (int)fe_eval1.n_q_points; ++q)
{
errors[3] +=
std::fabs(fe_eval1.get_value(q)[j] - reference_values1[q]);
fe_val0.get_function_gradients(src[0], reference_grads0);
fe_val0.get_function_hessians(src[0], reference_hess0);
- for (int q = 0; q < (int)fe_eval0.n_q_points; q++)
+ for (int q = 0; q < (int)fe_eval0.n_q_points; ++q)
{
errors[0] +=
std::fabs(fe_eval0.get_value(q)[j] - reference_values0[q]);
fe_val1.get_function_gradients(src[1], reference_grads1);
fe_val1.get_function_hessians(src[1], reference_hess1);
- for (int q = 0; q < (int)fe_eval1.n_q_points; q++)
+ for (int q = 0; q < (int)fe_eval1.n_q_points; ++q)
{
errors[3] +=
std::fabs(fe_eval1.get_value(q)[j] - reference_values1[q]);
fe_val2.get_function_gradients(src[2], reference_grads2);
fe_val2.get_function_hessians(src[2], reference_hess2);
- for (int q = 0; q < (int)fe_eval2.n_q_points; q++)
+ for (int q = 0; q < (int)fe_eval2.n_q_points; ++q)
{
errors[6] +=
std::fabs(fe_eval2.get_value(q)[j] - reference_values2[q]);
const VectorType &,
const std::pair<unsigned int, unsigned int> &pair) const
{
- for (auto cell = pair.first; cell < pair.second; cell++)
+ for (auto cell = pair.first; cell < pair.second; ++cell)
for (auto lane = 0u; lane < data.n_active_entries_per_cell_batch(cell);
lane++)
cells.emplace(data.get_cell_iterator(cell, lane)->id());
const VectorType &,
const std::pair<unsigned int, unsigned int> &pair) const
{
- for (auto face = pair.first; face < pair.second; face++)
+ for (auto face = pair.first; face < pair.second; ++face)
for (auto lane = 0u; lane < data.n_active_entries_per_face_batch(face);
lane++)
{
const VectorType &,
const std::pair<unsigned int, unsigned int> &pair) const
{
- for (auto face = pair.first; face < pair.second; face++)
+ for (auto face = pair.first; face < pair.second; ++face)
for (auto lane = 0u; lane < data.n_active_entries_per_face_batch(face);
lane++)
boundaries.emplace(
Point<dim> p;
for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
{
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
p[d] = p_vec[d][v];
res[v] = value(p);
}
VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval_neighbor.reinit(face);
number,
VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval_neighbor.reinit(face);
number,
VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.gather_evaluate(src,
number,
VectorizedArrayType>::value_type;
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi_m.reinit(face);
phi_m.gather_evaluate(src, EvaluationFlags::values);
value_type u_plus;
u_plus = make_vectorized_array<number, VectorizedArrayType::size()>(1.3);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.gather_evaluate(src, EvaluationFlags::values);
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval(data, true);
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval_neighbor(data, false);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval_neighbor.reinit(face);
const std::pair<unsigned int, unsigned int> & face_range) const
{
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval(data, true);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
AlignedVector<VectorizedArray<number>> local_diagonal_vector(
phi.dofs_per_cell);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi.reinit(face);
phi_outer.reinit(face);
AlignedVector<VectorizedArray<number>> local_diagonal_vector(
phi.dofs_per_cell);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi.reinit(face);
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval(data, true);
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval_neighbor(data, false);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval_neighbor.reinit(face);
const std::pair<unsigned int, unsigned int> & face_range) const
{
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval(data, true);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
AlignedVector<VectorizedArray<number>> local_diagonal_vector(
phi.dofs_per_cell);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi.reinit(face);
phi_outer.reinit(face);
AlignedVector<VectorizedArray<number>> local_diagonal_vector(
phi.dofs_per_cell);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi.reinit(face);
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval(data, true);
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval_neighbor(data, false);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval_neighbor.reinit(face);
const std::pair<unsigned int, unsigned int> & face_range) const
{
FEFaceEvaluation<dim, -1, 0, 1, number> fe_eval(data, true);
- for (unsigned int face = face_range.first; face < face_range.second; face++)
+ for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.read_dof_values(src);
Point<dim> p1, p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
p2[d] = 1.0;
GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
matrix_free.initialize_dof_vector(src);
matrix_free.initialize_dof_vector(dst);
- for (unsigned int i = 0; i < Utilities::pow(fe_degree + 1, dim); i++)
+ for (unsigned int i = 0; i < Utilities::pow(fe_degree + 1, dim); ++i)
src.begin()[i] = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) + 1;
matrix_free.loop(&Test::dummy_operation_1,
i < 2 * Utilities::pow(fe_degree + 1, dim);
i++)
dst.begin()[i] = 0;
- for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); i++)
+ for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); ++i)
deallog << static_cast<int>(dst[i]) << " ";
deallog << std::endl << std::endl;
}
const std::pair<unsigned int, unsigned int> &) const
{
deallog << "src:" << std::endl;
- for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); i++)
+ for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); ++i)
deallog << static_cast<int>(src[i]) << " ";
deallog << std::endl;
Triangulation<dim>::limit_level_difference_at_vertices);
GridGenerator::hyper_cube(tria);
- for (unsigned int i = 0; i < 3; i++)
+ for (unsigned int i = 0; i < 3; ++i)
{
tria.begin_active(i)->set_refine_flag();
tria.execute_coarsening_and_refinement();
cell_ids.resize(n_cells);
FEEvaluation<dim, 1> fe_eval(data);
- for (unsigned int cell = 0; cell < n_cells; cell++)
+ for (unsigned int cell = 0; cell < n_cells; ++cell)
{
fe_eval.reinit(cell);
const std::pair<unsigned int, unsigned int> &pair) const
{
FEEvaluation<dim, 1> fe_eval(data);
- for (auto cell = pair.first; cell < pair.second; cell++)
+ for (auto cell = pair.first; cell < pair.second; ++cell)
{
fe_eval.reinit(cell);
const auto cell_data = fe_eval.read_cell_data(cell_ids);
{
FEFaceEvaluation<dim, 1> fe_eval_m(data, true);
FEFaceEvaluation<dim, 1> fe_eval_p(data, false);
- for (auto face = pair.first; face < pair.second; face++)
+ for (auto face = pair.first; face < pair.second; ++face)
{
fe_eval_m.reinit(face);
fe_eval_p.reinit(face);
const std::pair<unsigned int, unsigned int> &pair) const
{
FEFaceEvaluation<dim, 1> fe_eval(data, true);
- for (auto face = pair.first; face < pair.second; face++)
+ for (auto face = pair.first; face < pair.second; ++face)
{
fe_eval.reinit(face);
const auto cell_data = fe_eval.read_cell_data(cell_ids);
unsigned int n_cells = data.n_cell_batches() + data.n_ghost_cell_batches();
cell_ids.resize(n_cells);
- for (unsigned int cell = 0; cell < n_cells; cell++)
+ for (unsigned int cell = 0; cell < n_cells; ++cell)
for (auto lane = 0u; lane < data.n_active_entries_per_cell_batch(cell);
lane++)
cell_ids[cell][lane] = data.get_cell_iterator(cell, lane)->id();
FEFaceEvaluation<dim, 1> fe_eval_m(data, true);
FEFaceEvaluation<dim, 1> fe_eval_p(data, false);
- for (auto cell = pair.first; cell < pair.second; cell++)
+ for (auto cell = pair.first; cell < pair.second; ++cell)
{
for (auto lane = 0u; lane < data.n_active_entries_per_cell_batch(cell);
lane++)
Utilities::MPI::Partitioner v(local_owned, local_relevant, comm);
for (unsigned int i = 0; i < v.ghost_targets().size(); ++i)
- for (unsigned int j = 0; j < v.ghost_targets()[i].second; j++)
+ for (unsigned int j = 0; j < v.ghost_targets()[i].second; ++j)
deallog << v.ghost_targets()[i].first << std::endl;
}
}
++it;
++it;
it = triangulation.begin(1);
- for (unsigned int a = 0; a < 4; a++)
+ for (unsigned int a = 0; a < 4; ++a)
it->child(a)->set_coarsen_flag();
triangulation.prepare_coarsening_and_refinement();
tria_distrib.refine_global(n_global);
tria_sequential.refine_global(n_global);
- for (unsigned int i = 0; i < n_local; i++)
+ for (unsigned int i = 0; i < n_local; ++i)
{
// refine both the distributed and the sequential triangulation. the
// following relies on the fact that the first cell of the "global"
StokesProblem<2>::check_periodicity(const unsigned int cycle) const
{
unsigned int n_points = 4;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<double> value1(3);
Vector<double> value2(3);
ghost[i] = 0.;
if (rank == 0)
- for (int i = 0; i < 8; i++)
+ for (int i = 0; i < 8; ++i)
owned[i] = i;
// update ghost values
v = 0.;
// set local values
- for (unsigned int i = 0; i < local_nonzero.n_elements(); i++)
+ for (unsigned int i = 0; i < local_nonzero.n_elements(); ++i)
v(local_nonzero.nth_index_in_set(i)) = local_nonzero.nth_index_in_set(i);
// set value from processor which does not own it:
v = 0.;
// set local values
- for (unsigned int i = 0; i < local_nonzero.n_elements(); i++)
+ for (unsigned int i = 0; i < local_nonzero.n_elements(); ++i)
v(local_nonzero.nth_index_in_set(i)) = local_nonzero.nth_index_in_set(i);
// set value from processor which does not own it:
LaplaceProblem<2>::check_periodicity(const unsigned int cycle) const
{
unsigned int n_points = 2;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
// don't test exactly at the support points, since point_value is not stable
// there
const double eps = 1. / (16. * n_points);
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<PetscScalar> value1(1);
Vector<PetscScalar> value2(1);
LaplaceProblem<3>::check_periodicity(const unsigned int cycle) const
{
unsigned int n_points = 2;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
// don't test exactly at the support points, since point_value is not stable
// there
const double eps = 1. / (16. * n_points);
- for (unsigned int i = 1; i < n_points; i++)
- for (unsigned int j = 1; j < n_points; j++)
+ for (unsigned int i = 1; i < n_points; ++i)
+ for (unsigned int j = 1; j < n_points; ++j)
{
Vector<PetscScalar> value1(1);
Vector<PetscScalar> value2(1);
StokesProblem<2>::check_periodicity(const unsigned int cycle) const
{
unsigned int n_points = 4;
- for (unsigned int i = 0; i < cycle; i++)
+ for (unsigned int i = 0; i < cycle; ++i)
n_points *= 2;
// don't test exactly at the support points, since point_value is not stable
// there
const double eps = 1. / (16. * n_points);
- for (unsigned int i = 1; i < n_points; i++)
+ for (unsigned int i = 1; i < n_points; ++i)
{
Vector<double> value1(3);
Vector<double> value2(3);
corner[d] = -L;
MappingQ1<dim> mapping;
- for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ilevel++)
+ for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ++ilevel)
{
// pick an corner cell and refine
for (auto &cell : triangulation.active_cell_iterators())
corner[d] = -L;
MappingQ1<dim> mapping;
- for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ilevel++)
+ for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ++ilevel)
{
// pick an corner cell and refine
for (auto &cell : triangulation.active_cell_iterators())
resize(Table<dim, T> &coeff, const unsigned int N)
{
TableIndices<dim> size;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
size[d] = N;
coeff.reinit(size);
}
QGauss<1> base_quadrature(2);
QIterated<dim> quadrature(base_quadrature, max_degree);
- for (unsigned int i = 0; i < fe_collection.size(); i++)
+ for (unsigned int i = 0; i < fe_collection.size(); ++i)
fourier_q_collection.push_back(quadrature);
const std::vector<unsigned int> n_coefficients_per_direction(
std::vector<Point<dim>> points;
- for (int i = 0; i < 2; i++)
- for (int j = 0; j < 2; j++)
+ for (int i = 0; i < 2; ++i)
+ for (int j = 0; j < 2; ++j)
if (dim == 3)
- for (int k = 0; k < 2; k++)
+ for (int k = 0; k < 2; ++k)
points.push_back(
Point<dim>(.25 + .5 * i, .25 + .5 * j, .25 + .5 * k));
else
Vector<double> value(1);
- for (; point_iterator != points_end; point_iterator++)
+ for (; point_iterator != points_end; ++point_iterator)
{
try
{
resize(Table<dim, T> &coeff, const unsigned int N)
{
TableIndices<dim> size;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
size[d] = N;
coeff.reinit(size);
}
QGauss<1> base_quadrature(2);
QIterated<dim> quadrature(base_quadrature, max_degree);
- for (unsigned int i = 0; i < fe_collection.size(); i++)
+ for (unsigned int i = 0; i < fe_collection.size(); ++i)
fourier_q_collection.push_back(quadrature);
const std::vector<unsigned int> n_coefficients_per_direction(
tria.refine_global(1);
// refine cells in the first quadrant
- for (unsigned int i = 1; i < 3; i++)
+ for (unsigned int i = 1; i < 3; ++i)
{
for (auto cell : tria.active_cell_iterators())
if (cell->is_locally_owned())
{
bool flag = true;
- for (int d = 0; d < dim; d++)
+ for (int d = 0; d < dim; ++d)
if (cell->center()[d] > 0.0)
flag = false;
if (flag)
test(
const MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType type)
{
- for (unsigned int i = 1; i <= 15; i++)
+ for (unsigned int i = 1; i <= 15; ++i)
{
const auto sequence =
MGTransferGlobalCoarseningTools::create_polynomial_coarsening_sequence(
deallog.precision(8);
- for (unsigned int i = 1; i < 5; i++)
+ for (unsigned int i = 1; i < 5; ++i)
test<2, double>(i);
}
deallog.precision(8);
- for (unsigned int i = 1; i < 5; i++)
+ for (unsigned int i = 1; i < 5; ++i)
test<2, double>(i);
}
deallog.precision(8);
- for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; fe_degree_fine++)
+ for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; ++fe_degree_fine)
for (unsigned int fe_degree_coarse = 1; fe_degree_coarse <= fe_degree_fine;
fe_degree_coarse++)
test<2, double>(fe_degree_fine, fe_degree_coarse);
// loop over levels
- for (unsigned int l = 0; l < std::numeric_limits<unsigned int>::max(); l++)
+ for (unsigned int l = 0; l < std::numeric_limits<unsigned int>::max(); ++l)
{
deallog.push("level" + std::to_string(l));
deallog.precision(8);
- for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; fe_degree_fine++)
+ for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; ++fe_degree_fine)
for (unsigned int fe_degree_coarse = 1; fe_degree_coarse <= fe_degree_fine;
fe_degree_coarse++)
test<2, double>(fe_degree_fine, fe_degree_coarse);
deallog.precision(8);
- for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; fe_degree_fine++)
+ for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; ++fe_degree_fine)
for (unsigned int fe_degree_coarse = 1; fe_degree_coarse <= fe_degree_fine;
fe_degree_coarse++)
test<2, double>(fe_degree_fine, fe_degree_coarse);
void
test()
{
- for (unsigned int i = 1; i < 25; i++)
+ for (unsigned int i = 1; i < 25; ++i)
{
- for (unsigned int j = 1; j < 25; j++)
+ for (unsigned int j = 1; j < 25; ++j)
if (MGTwoLevelTransfer<2, LinearAlgebra::distributed::Vector<double>>::
fast_polynomial_transfer_supported(i, j))
deallog << 1 << " ";
if (Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1 && false)
{
FullMatrix<Number> prolongation_matrix(dst.size(), src.size());
- for (unsigned int i = 0; i < src.size(); i++)
+ for (unsigned int i = 0; i < src.size(); ++i)
{
src = 0.0;
src[i] = 1.0;
transfer.prolongate_and_add(dst, src);
- for (unsigned int j = 0; j < dst.size(); j++)
+ for (unsigned int j = 0; j < dst.size(); ++j)
prolongation_matrix[j][i] = dst[j];
}
if (Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1 && false)
{
FullMatrix<Number> restriction_matrix(src.size(), dst.size());
- for (unsigned int i = 0; i < dst.size(); i++)
+ for (unsigned int i = 0; i < dst.size(); ++i)
{
dst = 0.0;
dst[i] = 1.0;
transfer.restrict_and_add(src, dst);
- for (unsigned int j = 0; j < src.size(); j++)
+ for (unsigned int j = 0; j < src.size(); ++j)
restriction_matrix[j][i] = src[j];
}
}
else if (mesh_type == 1)
{
- for (unsigned int i = 1; i < n_refinements; i++)
+ for (unsigned int i = 1; i < n_refinements; ++i)
{
for (auto cell : tria.active_cell_iterators())
if (cell->is_locally_owned())
{
bool flag = true;
- for (int d = 0; d < dim; d++)
+ for (int d = 0; d < dim; ++d)
if (cell->center()[d] > 0.5)
flag = false;
if (flag)
MGLevelObject<typename SmootherType::AdditionalData> smoother_data(min_level,
max_level);
- for (unsigned int level = min_level; level <= max_level; level++)
+ for (unsigned int level = min_level; level <= max_level; ++level)
{
smoother_data[level].preconditioner =
std::make_shared<SmootherPreconditionerType>();
dealii::DoFRenumbering::component_wise(dofhandler);
deallog << "Finished fine lvl renumbering" << std::endl;
- for (unsigned int lvl = 0; lvl < tria.n_global_levels(); lvl++)
+ for (unsigned int lvl = 0; lvl < tria.n_global_levels(); ++lvl)
{
dealii::DoFRenumbering::component_wise(dofhandler, lvl);
deallog << "Finished renumbering on lvl " << lvl << std::endl;
dealii::DoFRenumbering::block_wise(dofhandler);
deallog << "Finished fine lvl renumbering" << std::endl;
- for (unsigned int lvl = 0; lvl < tria.n_global_levels(); lvl++)
+ for (unsigned int lvl = 0; lvl < tria.n_global_levels(); ++lvl)
{
dealii::DoFRenumbering::block_wise(dofhandler, lvl);
deallog << "Finished renumbering on lvl " << lvl << std::endl;
dealii::DoFRenumbering::component_wise(dofhandler);
deallog << "Finished fine lvl renumbering" << std::endl;
- for (unsigned int lvl = 0; lvl < tria.n_global_levels(); lvl++)
+ for (unsigned int lvl = 0; lvl < tria.n_global_levels(); ++lvl)
{
dealii::DoFRenumbering::component_wise(dofhandler, lvl);
deallog << "Finished renumbering on lvl " << lvl << std::endl;
const Functions::LevelSet::Plane<dim> levelset(center, normal);
// Test all faces that are intersected by the plane.
- for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; f++)
+ for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
{
const int normal_direction =
GeometryInfo<dim>::unit_normal_direction[f];
std::vector<FunctionBounds<dim>> bounds(2);
// Set up so that the bounds correspond to indefinite functions.
- for (unsigned int i = 0; i < bounds.size(); i++)
+ for (unsigned int i = 0; i < bounds.size(); ++i)
{
bounds[i].value.first = -1;
bounds[i].value.second = 1;
for (unsigned int i = 0; i < quadrature.size(); ++i)
{
const Point<dim> &point = quadrature.point(i);
- for (int d = 0; d < dim; d++)
+ for (int d = 0; d < dim; ++d)
deallog << point[d] << ", ";
deallog << quadrature.weight(i) << std::endl;
for (unsigned int i = 0; i < quadrature.size(); ++i)
{
const Point<dim> &point = quadrature.point(i);
- for (int d = 0; d < dim; d++)
+ for (int d = 0; d < dim; ++d)
deallog << point[d] << ", ";
deallog << quadrature.weight(i);
const Tensor<1, spacedim> &normal = quadrature.normal_vector(i);
- for (int d = 0; d < spacedim; d++)
+ for (int d = 0; d < spacedim; ++d)
deallog << ", " << normal[d];
deallog << std::endl;
}
RootFinder root_finder;
root_finder.find_roots(functions, interval, roots);
- for (unsigned int i = 0; i < roots.size(); i++)
+ for (unsigned int i = 0; i < roots.size(); ++i)
{
deallog << roots[i];
if (i < roots.size() - 1)
values = 0.0;
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
p_degree.push_back(p1);
p_degree.push_back(p2);
- for (unsigned int i = 0; i < p_degree.size(); i++)
+ for (unsigned int i = 0; i < p_degree.size(); ++i)
{
const unsigned int &p = p_degree[i];
fe_collection.push_back(
repetitions[0] = 2;
dealii::Point<dim> p1;
dealii::Point<dim> p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = 0.0;
p2[d] = L;
typename dealii::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 1.0)
{
cell->set_active_fe_index(1);
dealii::VectorTools::interpolate(dof_handler, func, values);
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
h * A * std::pow(func.get_k(), 2) / 2.0 / std::max(p1, p2);
dealii::deallog << "expected:" << std::endl
<< " " << std::sqrt(expected_value_squared) << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
AssertThrow(std::fabs(std::sqrt(expected_value_squared) - error[i]) < 1e-6,
dealii::ExcInternalError());
p_degree.push_back(p2);
p_degree.push_back(p3);
- for (unsigned int i = 0; i < p_degree.size(); i++)
+ for (unsigned int i = 0; i < p_degree.size(); ++i)
{
const unsigned int &p = p_degree[i];
fe_collection.push_back(
repetitions[0] = 2;
dealii::Point<dim> p1;
dealii::Point<dim> p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = 0.0;
p2[d] = L;
typename dealii::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 1.0) // right
{
cell->set_active_fe_index(0);
dealii::VectorTools::interpolate(dof_handler, func, values);
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
}
dealii::deallog << "expected:" << std::endl;
- for (unsigned int i = 0; i < expected_error.size(); i++)
+ for (unsigned int i = 0; i < expected_error.size(); ++i)
deallog << " " << expected_error[i];
deallog << std::endl;
- for (unsigned int i = 0; i < expected_error.size(); i++)
+ for (unsigned int i = 0; i < expected_error.size(); ++i)
AssertThrow(std::fabs(expected_error[i] - error[i]) < 1e-6,
dealii::ExcInternalError());
dealii::hp::QCollection<dim> quadrature_formula;
dealii::hp::QCollection<dim - 1> face_quadrature_formula;
dealii::AffineConstraints<double> constraints;
- for (unsigned int p = 1; p <= 3; p++)
+ for (unsigned int p = 1; p <= 3; ++p)
{
fe_collection.push_back(
dealii::FE_Q<dim>(QIterated<1>(QTrapezoid<1>(), p)));
typename dealii::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
bool in_top_left = true;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
in_top_left = in_top_left && (cell->center()[d] < 0.5);
if (in_top_left)
cell = dof_handler.begin_active();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
if (cell->center()[0] < 0.25)
{
dealii::VectorTools::interpolate(dof_handler, func, values);
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
dealii::Vector<std::complex<double>> values(dof_handler.n_dofs());
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
p_degree.push_back(p1);
p_degree.push_back(p2);
- for (unsigned int i = 0; i < p_degree.size(); i++)
+ for (unsigned int i = 0; i < p_degree.size(); ++i)
{
const unsigned int &p = p_degree[i];
fe_collection.push_back(
repetitions[0] = 2;
dealii::Point<dim> p1;
dealii::Point<dim> p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = 0.0;
p2[d] = L;
typename dealii::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 1.0)
{
cell->set_active_fe_index(1);
dealii::VectorTools::interpolate(dof_handler, func, values);
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
h * A * std::pow(func.get_k(), 2) / 2.0 / std::max(p1, p2);
dealii::deallog << "expected:" << std::endl
<< " " << std::sqrt(expected_value_squared) << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
AssertThrow(std::fabs(std::sqrt(expected_value_squared) - error[i]) < 1e-6,
dealii::ExcInternalError());
p_degree.push_back(p2);
p_degree.push_back(p3);
- for (unsigned int i = 0; i < p_degree.size(); i++)
+ for (unsigned int i = 0; i < p_degree.size(); ++i)
{
const unsigned int &p = p_degree[i];
fe_collection.push_back(
repetitions[0] = 2;
dealii::Point<dim> p1;
dealii::Point<dim> p2;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
p1[d] = 0.0;
p2[d] = L;
typename dealii::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
if (cell->center()[0] > 1.0) // right
{
cell->set_active_fe_index(0);
dealii::VectorTools::interpolate(dof_handler, func, values);
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
}
dealii::deallog << "expected:" << std::endl;
- for (unsigned int i = 0; i < expected_error.size(); i++)
+ for (unsigned int i = 0; i < expected_error.size(); ++i)
deallog << " " << expected_error[i];
deallog << std::endl;
- for (unsigned int i = 0; i < expected_error.size(); i++)
+ for (unsigned int i = 0; i < expected_error.size(); ++i)
AssertThrow(std::fabs(expected_error[i] - error[i]) < 1e-6,
dealii::ExcInternalError());
dealii::hp::QCollection<dim> quadrature_formula;
dealii::hp::QCollection<dim - 1> face_quadrature_formula;
dealii::AffineConstraints<double> constraints;
- for (unsigned int p = 1; p <= 3; p++)
+ for (unsigned int p = 1; p <= 3; ++p)
{
fe_collection.push_back(
dealii::FE_Q<dim>(QIterated<1>(QTrapezoid<1>(), p)));
typename dealii::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
bool in_top_left = true;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
in_top_left = in_top_left && (cell->center()[d] < 0.5);
if (in_top_left)
cell = dof_handler.begin_active();
- for (; cell != endc; cell++)
+ for (; cell != endc; ++cell)
{
if (cell->center()[0] < 0.25)
{
dealii::VectorTools::interpolate(dof_handler, func, values);
dealii::deallog << "dof values:" << std::endl;
- for (unsigned int i = 0; i < values.size(); i++)
+ for (unsigned int i = 0; i < values.size(); ++i)
dealii::deallog << " " << values[i];
dealii::deallog << std::endl;
dealii::KellyErrorEstimator<dim>::face_diameter_over_twice_max_degree);
dealii::deallog << "error:" << std::endl;
- for (unsigned int i = 0; i < error.size(); i++)
+ for (unsigned int i = 0; i < error.size(); ++i)
dealii::deallog << " " << error[i];
dealii::deallog << std::endl;
deallog << "size: " << storage.size() << std::endl
<< "max_size: " << storage.max_size() << std::endl;
- for (unsigned int i = 0; i < 2; i++)
+ for (unsigned int i = 0; i < 2; ++i)
storage.add(0.1 * (i + 1));
// 2 elements
deallog << "initial:" << std::endl;
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 3 elements
deallog << "append:" << std::endl;
storage.add(0.555);
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 2 elements:
deallog << "remove second element:" << std::endl;
storage.remove(1);
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 2 elements:
deallog << "change 0th:" << std::endl;
storage[0] = 0.33;
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 3 elements:
deallog << "append:" << std::endl;
storage.add(0.666);
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 3 elements:
deallog << "change 0th:" << std::endl;
storage[0] = 0.22;
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 3 elements:
deallog << "append:" << std::endl;
storage.add(0.777);
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
// 2 elements:
deallog << "remove last:" << std::endl;
storage.remove(storage.size() - 1);
- for (unsigned int i = 0; i < storage.size(); i++)
+ for (unsigned int i = 0; i < storage.size(); ++i)
deallog << storage[i] << std::endl;
storage.clear();
cell->get_dof_indices(local_dof_indices);
dof_locations = fe_values.get_quadrature_points();
cell_pole = 0;
- for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++)
+ for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; ++dof)
{
unsigned int dof_component =
finite_element.system_to_component_index(dof).first;
ExcDimensionMismatch(computed_quantities.size(),
inputs.solution_values.size()));
- for (unsigned int i = 0; i < computed_quantities.size(); i++)
+ for (unsigned int i = 0; i < computed_quantities.size(); ++i)
{
Assert(computed_quantities[i].size() == 4,
ExcDimensionMismatch(computed_quantities[i].size(), 3));
cell->get_dof_indices(local_dof_indices);
dof_locations = fe_values.get_quadrature_points();
- for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++)
+ for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; ++dof)
{
unsigned int dof_component =
finite_element.system_to_component_index(dof).first;
ExcDimensionMismatch(computed_quantities.size(),
inputs.solution_values.size()));
- for (unsigned int i = 0; i < computed_quantities.size(); i++)
+ for (unsigned int i = 0; i < computed_quantities.size(); ++i)
{
Assert(computed_quantities[i].size() == 2,
ExcDimensionMismatch(computed_quantities[i].size(), 2));
cell->get_dof_indices(local_dof_indices);
dof_locations = fe_values.get_quadrature_points();
- for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++)
+ for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; ++dof)
{
unsigned int dof_component =
finite_element.system_to_component_index(dof).first;
bool ret = true;
for (unsigned int bc = 0; bc < 6; ++bc)
{
- for (unsigned int basis = 0; basis < dof_handler.n_dofs(); basis++)
+ for (unsigned int basis = 0; basis < dof_handler.n_dofs(); ++basis)
{
if (fabs(local_averages[bc](basis)) > 1.e-10)
{
bool equal = (test_vec.size() == test_vec2.size());
if (equal)
{
- for (unsigned int i = 0; i < test_vec.size(); i++)
+ for (unsigned int i = 0; i < test_vec.size(); ++i)
{
equal = equal && (test_vec(i) == test_vec2(i));
}
bool equal = (test_vec.size() == test_vec2.size());
if (equal)
{
- for (unsigned int i = 0; i < test_vec.size(); i++)
+ for (unsigned int i = 0; i < test_vec.size(); ++i)
{
equal = equal && (test_vec(i) == test_vec2(i));
}
Point<dim> p;
for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
{
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
p[d] = p_vec[d][v];
res[v] = value(p);
}
Point<dim> p;
for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
{
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
p[d] = p_vec[d][v];
res[v] = value(p);
}
Lh(const Point<dim> &x_q, const TableIndices<dim> &indices)
{
double res = 1.0;
- for (unsigned int d = 0; d < dim; d++)
+ for (unsigned int d = 0; d < dim; ++d)
{
const double x = 2.0 * (x_q[d] - 0.5);
Assert((x_q[d] <= 1.0) && (x_q[d] >= 0.),
{
double f = 0.0;
- for (unsigned int i = 0; i < coefficients.size(0); i++)
- for (unsigned int j = 0; j < coefficients.size(1); j++)
+ for (unsigned int i = 0; i < coefficients.size(0); ++i)
+ for (unsigned int j = 0; j < coefficients.size(1); ++j)
f += Lh(point, TableIndices<2>(i, j)) * coefficients(i, j);
return f;
{
double f = 0.0;
- for (unsigned int i = 0; i < coefficients.size(0); i++)
- for (unsigned int j = 0; j < coefficients.size(1); j++)
- for (unsigned int k = 0; k < coefficients.size(2); k++)
+ for (unsigned int i = 0; i < coefficients.size(0); ++i)
+ for (unsigned int j = 0; j < coefficients.size(1); ++j)
+ for (unsigned int k = 0; k < coefficients.size(2); ++k)
f += Lh(point, TableIndices<3>(i, j, k)) * coefficients(i, j, k);
return f;
compare(const Table<2, double> &coeff1, const Table<2, double> &coeff2)
{
double linf = 0.;
- for (unsigned int i = 0; i < coeff1.size(0); i++)
- for (unsigned int j = 0; j < coeff1.size(1); j++)
+ for (unsigned int i = 0; i < coeff1.size(0); ++i)
+ for (unsigned int j = 0; j < coeff1.size(1); ++j)
linf = std::max(linf, std::abs(coeff1(i, j) - coeff2(i, j)));
deallog << "Linf norm in exact and calculate Legendre coefficients:"
compare(const Table<3, double> &coeff1, const Table<3, double> &coeff2)
{
double linf = 0.;
- for (unsigned int i = 0; i < coeff1.size(0); i++)
- for (unsigned int j = 0; j < coeff1.size(1); j++)
- for (unsigned int k = 0; k < coeff1.size(2); k++)
+ for (unsigned int i = 0; i < coeff1.size(0); ++i)
+ for (unsigned int j = 0; j < coeff1.size(1); ++j)
+ for (unsigned int k = 0; k < coeff1.size(2); ++k)
linf = std::max(linf, std::abs(coeff1(i, j, k) - coeff2(i, j, k)));
deallog << "Linf norm in exact and calculate Legendre coefficients:"
resize(Table<3, double> &coeff, const unsigned int N)
{
TableIndices<3> size;
- for (unsigned int d = 0; d < 3; d++)
+ for (unsigned int d = 0; d < 3; ++d)
size[d] = N;
coeff.reinit(size);
}
// add some extra FEs in fe_collection
hp::FECollection<dim> fe_collection;
- for (unsigned int p = 1; p <= max_poly; p++)
+ for (unsigned int p = 1; p <= max_poly; ++p)
fe_collection.push_back(FE_Q<dim>(p));
FESeries::Legendre<dim> legendre =
const unsigned int p = 1;
Table<dim, double> coeff_in(coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
- for (unsigned int j = 0; j < coeff_1d; j++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
coeff_in(i, j) = 1.0 + ind++;
LegendreFunction<dim> function(coeff_in);
const unsigned int p = 2;
Table<dim, double> coeff_in(coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
coeff_in(i, 0) = exp(-k1 * i);
- for (unsigned int i = 0; i < coeff_1d; i++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
coeff_in(0, i) = exp(-k2 * i);
// make sure predicate skips 0-th:
const unsigned int p = 1;
Table<dim, double> coeff_in(coeff_1d, coeff_1d, coeff_1d);
unsigned int ind = 0;
- for (unsigned int i = 0; i < coeff_1d; i++)
- for (unsigned int j = 0; j < coeff_1d; j++)
- for (unsigned int k = 0; k < coeff_1d; k++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
+ for (unsigned int k = 0; k < coeff_1d; ++k)
coeff_in(i, j, k) = 1.0 + ind++;
LegendreFunction<dim> function(coeff_in);
const unsigned int coeff_1d = 4;
const unsigned int p = 3;
Table<dim, double> coeff_in(coeff_1d, coeff_1d, coeff_1d);
- for (unsigned int i = 0; i < coeff_1d; i++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
coeff_in(i, 0, 0) = exp(-k1 * i);
- for (unsigned int j = 0; j < coeff_1d; j++)
+ for (unsigned int j = 0; j < coeff_1d; ++j)
coeff_in(0, j, 0) = exp(-k2 * j);
- for (unsigned int k = 0; k < coeff_1d; k++)
+ for (unsigned int k = 0; k < coeff_1d; ++k)
coeff_in(0, 0, k) = exp(-k3 * k);
// make sure predicate skips 0-th:
const unsigned int p = 4;
Table<dim, double> coeff_in(coeff_1d, coeff_1d, coeff_1d);
// all non-zero:
- for (unsigned int i = 0; i < coeff_1d; i++)
+ for (unsigned int i = 0; i < coeff_1d; ++i)
coeff_in(i, 0, 0) = exp(-k2 * i);
// some non-zero (2nd and 4th), the slowest decay will be from this
Assert(coeff1.size(0) == coeff2.size(0), ExcInternalError());
typename CoefficientType::value_type linf = 0.;
- for (unsigned int i = 0; i < coeff1.size(0); i++)
+ for (unsigned int i = 0; i < coeff1.size(0); ++i)
linf = std::max(linf, std::abs(coeff1(i) - coeff2(i)));
return linf;
Assert(coeff1.size(d) == coeff2.size(d), ExcInternalError());
typename CoefficientType::value_type linf = 0.;
- for (unsigned int i = 0; i < coeff1.size(0); i++)
- for (unsigned int j = 0; j < coeff1.size(1); j++)
+ for (unsigned int i = 0; i < coeff1.size(0); ++i)
+ for (unsigned int j = 0; j < coeff1.size(1); ++j)
linf = std::max(linf, std::abs(coeff1(i, j) - coeff2(i, j)));
return linf;
Assert(coeff1.size(d) == coeff2.size(d), ExcInternalError());
typename CoefficientType::value_type linf = 0.;
- for (unsigned int i = 0; i < coeff1.size(0); i++)
- for (unsigned int j = 0; j < coeff1.size(1); j++)
- for (unsigned int k = 0; k < coeff1.size(2); k++)
+ for (unsigned int i = 0; i < coeff1.size(0); ++i)
+ for (unsigned int j = 0; j < coeff1.size(1); ++j)
+ for (unsigned int k = 0; k < coeff1.size(2); ++k)
linf = std::max(linf, std::abs(coeff1(i, j, k) - coeff2(i, j, k)));
return linf;
PetscFDMatrix::vmult_add(dealii::PETScWrappers::VectorBase & dst,
const dealii::PETScWrappers::VectorBase &src) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
// first build the sparsity pattern
SparsityPattern sparsity(N * N, N * N, 5);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
sparsity.add(global, global);
// next build the sparse matrix itself
SparseMatrix<double> matrix(sparsity);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
matrix.add(global, global, 4);
// build the sparse matrix
PETScWrappers::SparseMatrix matrix(N * N, N * N, 5);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
matrix.add(global, global, 4);
// An older version of this test relied on PETSc doing dynamic allocation, but
// we require sparsity patterns in constructors now so we need the sparsity
// pattern ahead of time - hence this is done twice
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
dsp.add(global, global);
PETScWrappers::MPI::SparseMatrix matrix;
matrix.reinit(all_dofs, all_dofs, sparsity_pattern, PETSC_COMM_WORLD);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
matrix.add(global, global, 4);
// An older version of this test relied on PETSc doing dynamic allocation, but
// we require sparsity patterns in constructors now so we need the sparsity
// pattern ahead of time - hence this is done twice
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
dsp.add(global, global);
std::vector<unsigned int> permutation(N);
{
std::vector<unsigned int> unused_indices(N);
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
unused_indices[i] = i;
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
{
// pick a random element among the
// unused indices
}
// build the sparse matrix
- for (unsigned int i_ = 0; i_ < N; i_++)
- for (unsigned int j_ = 0; j_ < N; j_++)
+ for (unsigned int i_ = 0; i_ < N; ++i_)
+ for (unsigned int j_ = 0; j_ < N; ++j_)
{
const unsigned int i = permutation[i_];
const unsigned int j = permutation[j_];
constraints.close();
// set vector:
unsigned int myid = Utilities::MPI::this_mpi_process(mpi_communicator);
- for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); i++)
+ for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i)
{
const PetscScalar val = 1.0 + myid + (myid + i % 2) * 2.0 * PETSC_i;
vector(locally_owned_dofs.nth_index_in_set(i)) = val;
mass_matrix.compress(VectorOperation::add);
}
- for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); i++)
+ for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i)
{
double re = 0, im = 0;
if (i % 2)
// Scale the gradients along the vectorization-index so that each grad_u[v] is
// unique.
- for (unsigned int v = 0; v < VectorizedArray<double>::size(); v++)
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = 0; j < dim; ++j)
grad_u[i][j][v] *= (v + 1);
Tensor<2, dim, VectorizedArray<double>> F_solution;
F_solution = grad_u;
- for (unsigned int i = 0; i < dim; i++)
+ for (unsigned int i = 0; i < dim; ++i)
F_solution[i][i] = F_solution[i][i] + 1.0;
Tensor<2, dim, VectorizedArray<double>> F_test = Kinematics::F(grad_u);
// You can't use .norm() on some difference-tensor of the two so we compare
// element-wise!
- for (unsigned int v = 0; v < VectorizedArray<double>::size(); v++)
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = 0; j < dim; ++j)
if (F_solution[i][j][v] - F_test[i][j][v] != 0.0)
deallog << "Not OK" << std::endl;
SymmetricTensor<2, dim, VectorizedArray<double>> E_test =
Kinematics::E(F_test);
- for (unsigned int v = 0; v < VectorizedArray<double>::size(); v++)
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = 0; j < dim; ++j)
if (E_test[i][j][v] - E_solution[i][j][v] != 0.0)
deallog << "Not OK" << std::endl;
Tensor<2, dim, VectorizedArray<double>> F_iso_test;
F_iso_test = Kinematics::F_iso(F_test);
- for (unsigned int v = 0; v < VectorizedArray<double>::size(); v++)
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = 0; j < dim; j++)
+ for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = 0; j < dim; ++j)
if (F_iso_test[i][j][v] - F_iso_solution[i][j][v] != 0.0)
deallog << "Not OK" << std::endl;
adouble *x = new adouble[n];
adouble y = 1.0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
xp[i] = (i + 1.0) / (2.0 + i);
trace_on(1);
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
{
x[i] <<= xp[i];
y *= x[i];
gradient(1, n, xp, g);
double err_grad = 0;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
err_grad += std::abs(g[i] - yp / xp[i]);
deallog << "Error (gradient): " << err_grad << std::endl;
hessian(1, n, xp, H);
double error_hess = 0;
- for (unsigned int i = 0; i < n; i++)
- for (unsigned int j = 0; j < n; j++)
+ for (unsigned int i = 0; i < n; ++i)
+ for (unsigned int j = 0; j < n; ++j)
if (i > j)
error_hess += std::abs(H[i][j] - g[i] / xp[j]);
delete[] g;
g = nullptr;
- for (unsigned int i = 0; i < n; i++)
+ for (unsigned int i = 0; i < n; ++i)
delete[] H[i];
delete[] H;
H = nullptr;
{
B.vmult(Bx, eigenvectors[i]);
- for (unsigned int j = 0; j < eigenvectors.size(); j++)
+ for (unsigned int j = 0; j < eigenvectors.size(); ++j)
Assert(std::abs(eigenvectors[j] * Bx - (i == j)) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
{
const unsigned int n_points = 10;
std::vector<double> x(n_points), y(n_points);
- for (unsigned int i = 0; i < n_points; i++)
+ for (unsigned int i = 0; i < n_points; ++i)
{
x[i] = i + 0.5 * std::sin(i);
y[i] = i + std::cos(i * i);
{
B.vmult(Bx, x[i]);
- for (unsigned int j = 0; j < x.size(); j++)
+ for (unsigned int j = 0; j < x.size(); ++j)
if (j != i)
Assert(std::abs(x[j] * Bx) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
if (n_refinements == 0)
return;
- for (int i = 0; i < static_cast<int>(n_refinements) - 3; i++)
+ for (int i = 0; i < static_cast<int>(n_refinements) - 3; ++i)
tria.refine_global();
if (n_refinements >= 1)
Testing::srand(1);
- for (auto iterator = a.begin(); iterator != a.end(); iterator++)
+ for (auto iterator = a.begin(); iterator != a.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
- for (auto iterator = b.begin(); iterator != b.end(); iterator++)
+ for (auto iterator = b.begin(); iterator != b.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
a.compress(VectorOperation::insert);
prepare_vector(b);
prepare_vector(c);
- for (auto iterator = a.begin(); iterator != a.end(); iterator++)
+ for (auto iterator = a.begin(); iterator != a.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
- for (auto iterator = b.begin(); iterator != b.end(); iterator++)
+ for (auto iterator = b.begin(); iterator != b.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
- for (auto iterator = c.begin(); iterator != c.end(); iterator++)
+ for (auto iterator = c.begin(); iterator != c.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
a.compress(VectorOperation::insert);
prepare_vector(b);
prepare_vector(c);
- for (auto iterator = a.begin(); iterator != a.end(); iterator++)
+ for (auto iterator = a.begin(); iterator != a.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
- for (auto iterator = b.begin(); iterator != b.end(); iterator++)
+ for (auto iterator = b.begin(); iterator != b.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
- for (auto iterator = c.begin(); iterator != c.end(); iterator++)
+ for (auto iterator = c.begin(); iterator != c.end(); ++iterator)
*iterator = static_cast<double>(Testing::rand()) / RAND_MAX;
a.compress(VectorOperation::insert);
unsigned int index3 = 2;
Table<1, int> t3(index3);
- for (unsigned int i = 0; i < index1; i++)
+ for (unsigned int i = 0; i < index1; ++i)
{
t1[i] = i + 1;
t2[i] = i + 1 + index1;
for (const auto &point : quad.get_points())
{
deallog << point << " : " << std::endl;
- for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
deallog << fe.shape_value(i, point) << " ";
- for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
deallog << fe.shape_grad(i, point) << " ";
- for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
deallog << fe.shape_grad_grad(i, point) << " ";
deallog << std::endl;
}
for (const auto &point : quad.get_points())
{
deallog << point << " : " << std::endl;
- for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
deallog << fe.shape_value(i, point) << " ";
- for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
deallog << fe.shape_grad(i, point) << " ";
- for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
deallog << fe.shape_grad_grad(i, point) << " ";
deallog << std::endl;
}
FEFaceIntegrator fe_eval(data, range, true);
FEFaceIntegrator fe_eval_neighbor(data, range, false);
- for (unsigned int face = range.first; face < range.second; face++)
+ for (unsigned int face = range.first; face < range.second; ++face)
{
fe_eval.reinit(face);
fe_eval_neighbor.reinit(face);
[&](const auto &data, auto &dst, const auto &src, const auto range) {
FEFaceIntegrator fe_eval(data, range, true);
- for (unsigned int face = range.first; face < range.second; face++)
+ for (unsigned int face = range.first; face < range.second; ++face)
{
fe_eval.reinit(face);
fe_eval.gather_evaluate(src,
cell->get_dof_indices(local_dof_indices);
- for (unsigned int q = 0; q < n_q_points; q++)
+ for (unsigned int q = 0; q < n_q_points; ++q)
{
const double u_exact =
dim == 2 ? -std::sin(M_PI * fe_values.quadrature_point(q)[0]) *
// Find the values of x and u_h (the finite element solution) at the
// quadrature points
- for (unsigned int i = 0; i < dofs_per_cell; i++)
+ for (unsigned int i = 0; i < dofs_per_cell; ++i)
{
u_sim +=
fe_values.shape_value(i, q) * solution[local_dof_indices[i]];
std::vector<Tensor<3, dim>> third_derivatives;
std::vector<Tensor<4, dim>> fourth_derivatives;
- for (unsigned int i = 0; i < quad.size(); i++)
+ for (unsigned int i = 0; i < quad.size(); ++i)
{
poly.evaluate(quad.point(i),
values,
solver.set_problem_type(EPS_GHEP);
// reset vectors and set them as initial space
// to avoid dependency on SLEPc random numbers:
- for (unsigned int i = 0; i < u.size(); i++)
+ for (unsigned int i = 0; i < u.size(); ++i)
for (unsigned int j = 0; j < u[i].size(); ++j)
u[i][j] = random_value<double>();
// << " iterations" << std::endl;
deallog << "Eigenvalues:";
- for (unsigned int i = 0; i < v.size(); i++)
+ for (unsigned int i = 0; i < v.size(); ++i)
{
deallog << " " << v[i];
if (i != (v.size() - 1))
solver.set_problem_type(EPS_HEP);
// reset vectors and set them as initial space
// to avoid dependency on random numbers:
- for (unsigned int i = 0; i < u.size(); i++)
+ for (unsigned int i = 0; i < u.size(); ++i)
for (unsigned int j = 0; j < u[i].size(); ++j)
u[i][j] = random_value<double>();
}
deallog << "Eigenvalues:";
- for (unsigned int i = 0; i < v.size(); i++)
+ for (unsigned int i = 0; i < v.size(); ++i)
{
deallog << " " << v[i];
if (i != (v.size() - 1))
/* keep constrained dofs */ true);
std::vector<dealii::types::global_dof_index> n_locally_owned_dofs(
n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
dealii::SparsityTools::distribute_sparsity_pattern(csp,
// dealii::deallog << "outer iterations: "<< solver_control.last_step
// ()<<std::endl; dealii::deallog << "last inner iterations:
// "<<linear_solver_control.last_step()<<std::endl;
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
dealii::deallog << eigenvalues[i] << std::endl;
delete preconditioner;
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
/* keep constrained dofs */ true);
std::vector<dealii::types::global_dof_index> n_locally_owned_dofs(
n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
dealii::SparsityTools::distribute_sparsity_pattern(csp,
// dealii::deallog << "outer iterations: "<< solver_control.last_step
// ()<<std::endl; dealii::deallog << "last inner iterations:
// "<<linear_solver_control.last_step()<<std::endl;
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
dealii::deallog << eigenvalues[i] << std::endl;
delete preconditioner;
{
mass_matrix.vmult(Bx, eigenfunctions[i]);
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
" and " + Utilities::int_to_string(j) +
/* keep constrained dofs */ true);
std::vector<dealii::types::global_dof_index> n_locally_owned_dofs(
n_mpi_processes);
- for (unsigned int i = 0; i < n_mpi_processes; i++)
+ for (unsigned int i = 0; i < n_mpi_processes; ++i)
n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements();
dealii::SparsityTools::distribute_sparsity_pattern(csp,
// dealii::deallog << "outer iterations: "<< solver_control.last_step
// ()<<std::endl; dealii::deallog << "last inner iterations:
// "<<linear_solver_control.last_step()<<std::endl;
- for (unsigned int i = 0; i < eigenvalues.size(); i++)
+ for (unsigned int i = 0; i < eigenvalues.size(); ++i)
dealii::deallog << eigenvalues[i] << std::endl;
delete preconditioner;
PETScWrappers::MPI::Vector Ax(eigenfunctions[0]);
for (unsigned int i = 0; i < eigenfunctions.size(); ++i)
{
- for (unsigned int j = 0; j < eigenfunctions.size(); j++)
+ for (unsigned int j = 0; j < eigenfunctions.size(); ++j)
Assert(std::abs(eigenfunctions[j] * eigenfunctions[i] - (i == j)) <
precision,
ExcMessage("Eigenvectors " + Utilities::int_to_string(i) +
inline void
FDDiagMatrix::diag_structure(SP &structure) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FDDiagMatrix::diag(MatrixType &A) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FDDiagMatrix::gnuplot_print(std::ostream &s, const Vector<number> &V) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FD1DLaplaceMatrix::three_point_structure(SP &structure) const
{
- for (unsigned int i = 0; i <= n - 2; i++)
+ for (unsigned int i = 0; i <= n - 2; ++i)
{
structure.add(i, i);
if (i > 0)
inline void
FD1DLaplaceMatrix::three_point(MatrixType &A) const
{
- for (unsigned int i = 0; i <= n - 2; i++)
+ for (unsigned int i = 0; i <= n - 2; ++i)
{
A.set(i, i, 2.0);
if (i > 0)
SE::map_basic_basic dict;
std::vector<double> vals(v.size());
- for (unsigned i = 0; i < v.size(); i++)
+ for (unsigned i = 0; i < v.size(); ++i)
{
dict[v[i]] = SE::real_double(i);
vals[i] = i;
// Standard substitution
auto t1 = std::chrono::high_resolution_clock::now();
- for (unsigned j = 0; j < n_runs; j++)
+ for (unsigned j = 0; j < n_runs; ++j)
{
res += SE::eval_double(*h->subs(dict));
}
<< " us" << std::endl;
t1 = std::chrono::high_resolution_clock::now();
- for (unsigned j = 0; j < n_runs; j++)
+ for (unsigned j = 0; j < n_runs; ++j)
{
res1 += l.call(vals);
}
<< " us" << std::endl;
t1 = std::chrono::high_resolution_clock::now();
- for (unsigned j = 0; j < n_runs; j++)
+ for (unsigned j = 0; j < n_runs; ++j)
{
res2 += l2.call(vals);
}
SE::map_basic_basic dict;
std::vector<double> vals(v.size());
- for (unsigned i = 0; i < v.size(); i++)
+ for (unsigned i = 0; i < v.size(); ++i)
{
dict[v[i]] = SE::real_double(i);
vals[i] = i;
// Standard substitution
auto t1 = std::chrono::high_resolution_clock::now();
- for (unsigned j = 0; j < n_runs; j++)
+ for (unsigned j = 0; j < n_runs; ++j)
{
- for (unsigned k = 0; k < diffs.size(); k++)
+ for (unsigned k = 0; k < diffs.size(); ++k)
{
res[k] = SE::eval_double(*diffs[k]->subs(dict));
r += res[k];
<< " us" << std::endl;
t1 = std::chrono::high_resolution_clock::now();
- for (unsigned j = 0; j < n_runs; j++)
+ for (unsigned j = 0; j < n_runs; ++j)
{
l.call(res1, vals.data());
- for (unsigned k = 0; k < diffs.size(); k++)
+ for (unsigned k = 0; k < diffs.size(); ++k)
{
r2 += res1[k];
}
<< " us" << std::endl;
t1 = std::chrono::high_resolution_clock::now();
- for (unsigned j = 0; j < 1000; j++)
+ for (unsigned j = 0; j < 1000; ++j)
{
l2.call(res2, vals.data());
- for (unsigned k = 0; k < diffs.size(); k++)
+ for (unsigned k = 0; k < diffs.size(); ++k)
{
r3 += res2[k];
}
SE::parse("(a+b+c)*c")};
deallog.push("Independents");
- for (unsigned int i = 0; i < independents.size(); i++)
+ for (unsigned int i = 0; i < independents.size(); ++i)
deallog << *(independents[i]) << std::endl;
deallog.pop();
deallog.push("Dependents");
- for (unsigned int i = 0; i < dependents.size(); i++)
+ for (unsigned int i = 0; i < dependents.size(); ++i)
deallog << *(dependents[i]) << std::endl;
deallog.pop();
SE::parse("asin((a+b)*c)")};
deallog.push("Independents");
- for (unsigned int i = 0; i < independents.size(); i++)
+ for (unsigned int i = 0; i < independents.size(); ++i)
deallog << *(independents[i]) << std::endl;
deallog.pop();
deallog.push("Dependents");
- for (unsigned int i = 0; i < dependents.size(); i++)
+ for (unsigned int i = 0; i < dependents.size(); ++i)
deallog << *(dependents[i]) << std::endl;
deallog.pop();
vec_basic dependents = {SE::parse("0.25*kappa*(-1.0 - C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00 - 2.0*log(sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))) + 0.5*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))"), SE::parse("2.0*(0.0 + 0.25*kappa*(C_22*C_11 - 1.0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - C_12**2) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*C_00*(C_22*C_11 - C_12**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_11*(C_22*C_11 - C_12**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_22*(C_22*C_11 - C_12**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) + (-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333)) - 6.28318530717959e-07*mu_r*(H_0*(-1.0*H_0*(C_22*C_11 - C_12**2)**2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 + 1.0*H_1*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 - 1.0*H_1*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2))*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - 3.14159265358979e-07*mu_r*(C_22*C_11 - C_12**2)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("2.0*(0.0 + 0.25*kappa*(C_22*C_00 - 1.0*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - C_02**2) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*C_00*(C_22*C_00 - C_02**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_11*(C_22*C_00 - C_02**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_22*(C_22*C_00 - C_02**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) + (-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333)) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 + 1.0*H_0*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_00 - C_02**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(-1.0*H_1*(C_22*C_00 - C_02**2)**2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 - 1.0*H_0*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*mu_r*(C_22*C_00 - C_02**2)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("2.0*(0.0 + 0.25*kappa*(C_11*C_00 - 1.0*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - C_01**2) + 0.5*mu_e*(-0.333333333333333*C_00*(C_11*C_00 - C_01**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_11*(C_11*C_00 - C_01**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_22*(C_11*C_00 - C_01**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) + (-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 + 1.0*H_0*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_11*C_00 - C_01**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 - 1.0*H_0*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_11*C_00 - C_01**2)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(-1.0*H_2*(C_11*C_00 - C_01**2)**2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*mu_r*(C_11*C_00 - C_01**2)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("1.0*(0.0 + 0.25*kappa*(2*C_12*C_02 - 2*C_22*C_01 - 1.0*(2*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*(2*C_12*C_02 - 2*C_22*C_01)*C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_12*C_02 - 2*C_22*C_01)*C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_12*C_02 - 2*C_22*C_01)*C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333)) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 - 1.0*H_1*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_11 - C_12**2)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 - 1.0*H_0*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 + 1.0*H_0*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 2.0*H_2*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*(2*C_12*C_02 - 2*C_22*C_01)*mu_r*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("1.0*(0.0 + 0.25*kappa*(-2*C_11*C_02 + 2*C_12*C_01 - 1.0*(-2*C_11*C_02 + 2*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*(-2*C_11*C_02 + 2*C_12*C_01)*C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(-2*C_11*C_02 + 2*C_12*C_01)*C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(-2*C_11*C_02 + 2*C_12*C_01)*C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333)) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 + 1.0*H_1*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_11 - C_12**2)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 + 1.0*H_0*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 2.0*H_1*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 - 1.0*H_0*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*(-2*C_11*C_02 + 2*C_12*C_01)*mu_r*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("1.0*(0.0 + 0.25*kappa*(2*C_01*C_02 - 2*C_12*C_00 - 1.0*(2*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*(2*C_01*C_02 - 2*C_12*C_00)*C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_01*C_02 - 2*C_12*C_00)*C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_01*C_02 - 2*C_12*C_00)*C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333)) - 6.28318530717959e-07*mu_r*(H_0*(0.0 - 2.0*H_0*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_11 - C_12**2)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 + 1.0*H_0*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 + 1.0*H_0*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2))*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - 3.14159265358979e-07*(2*C_01*C_02 - 2*C_12*C_00)*mu_r*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("-(-6.28318530717959e-07*mu_r*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00))*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) + 3.54490770181103*exp(-3.14159265358979*(H_0**2 + H_1**2 + H_2**2)**2/H_sat_0**4)*H_0*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*sf_sat_0/(sqrt(pi)*H_sat_0**2))"), SE::parse("-(-6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + 3.54490770181103*exp(-3.14159265358979*(H_0**2 + H_1**2 + H_2**2)**2/H_sat_0**4)*H_1*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*sf_sat_0/(sqrt(pi)*H_sat_0**2))"), SE::parse("-(-6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + 3.54490770181103*exp(-3.14159265358979*(H_0**2 + H_1**2 + H_2**2)**2/H_sat_0**4)*H_2*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*sf_sat_0/(sqrt(pi)*H_sat_0**2))")};
std::vector<double> vals(independents.size());
- for (unsigned int i = 0; i < independents.size(); i++)
+ for (unsigned int i = 0; i < independents.size(); ++i)
vals[i] = independents_vals[i];
auto eval_symengine =
Number counter = 0.0;
for (unsigned int i = 0; i < dim; ++i)
for (unsigned int j = 0; j < dim; ++j)
- for (unsigned int v = 0; v < dealii::VectorizedArray<Number>::size(); v++)
+ for (unsigned int v = 0; v < dealii::VectorizedArray<Number>::size(); ++v)
{
A[i][j][v] = counter;
counter += 1.0;
SymmetricTensor<2, dim, VectorizedArray<double>> B;
// I^sym = 0.5(d_ik*d_jl + d_il*d_jk) -> I^sym : A = A^sym
- for (unsigned int i = 0; i < dim; i++)
- for (unsigned int j = 0; j < dim; j++)
- for (unsigned int k = 0; k < dim; k++)
- for (unsigned int l = 0; l < dim; l++)
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = 0; j < dim; ++j)
+ for (unsigned int k = 0; k < dim; ++k)
+ for (unsigned int l = 0; l < dim; ++l)
I[i][j][k][l] = ((i == k && j == l && i == l && j == k) ?
make_vectorized_array(1.0) :
((i == k && j == l) || (i == l && j == k) ?
t.unroll(unrolled);
deallog << "unrolled:";
- for (unsigned i = 0; i < 9; i++)
+ for (unsigned i = 0; i < 9; ++i)
deallog << ' ' << unrolled(i);
deallog << std::endl;
// threshold and so on
t.unroll(unrolled);
deallog << "unrolled:";
- for (unsigned i = 0; i < 9; i++)
+ for (unsigned i = 0; i < 9; ++i)
deallog << ' ' << unrolled(i);
deallog << std::endl;
// threshold and so on
t.unroll(unrolled);
deallog << "unrolled:";
- for (unsigned i = 0; i < 9; i++)
+ for (unsigned i = 0; i < 9; ++i)
deallog << ' ' << static_cast<double>(unrolled(i));
deallog << std::endl;
inline void
FDMatrix::five_point_structure(SP &structure) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FDMatrix::nine_point_structure(SP &structure) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
void
FDMatrix::nine_point(MatrixType &A, bool) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FDMatrix::five_point(MatrixType &A, bool nonsymmetric) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FDMatrix::upwind(MatrixType &A, bool back) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
inline void
FDMatrix::gnuplot_print(std::ostream &s, const Vector<number> &V) const
{
- for (unsigned int i = 0; i <= ny - 2; i++)
+ for (unsigned int i = 0; i <= ny - 2; ++i)
{
- for (unsigned int j = 0; j <= nx - 2; j++)
+ for (unsigned int j = 0; j <= nx - 2; ++j)
{
// Number of the row to be entered
unsigned int row = j + (nx - 1) * i;
r[0] = (seed == 0) ? 1 : seed;
long int word = r[0];
- for (int i = 1; i < 31; i++)
+ for (int i = 1; i < 31; ++i)
{
// This does:
// r[i] = (16807 * r[i-1]) % 2147483647;
r[i] = word;
}
k = 31;
- for (int i = 31; i < 34; i++)
+ for (int i = 31; i < 34; ++i)
{
r[k % 32] = r[(k + 32 - 31) % 32];
k = (k + 1) % 32;
}
- for (int i = 34; i < 344; i++)
+ for (int i = 34; i < 344; ++i)
{
r[k % 32] =
nonoverflow_add(r[(k + 32 - 31) % 32], r[(k + 32 - 3) % 32]);
locally_owned_dofs = dof_handler.locally_owned_dofs();
std::vector<types::global_dof_index> new_number(dof_handler.n_dofs());
- for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); i++)
+ for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i)
new_number[i] = dof_handler.n_dofs() - i - 1;
std::vector<types::global_dof_index> local_new_number;
// first build the sparsity pattern
SparsityPattern sparsity(N * N, N * N, 5);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
sparsity.add(global, global);
// next build the sparse matrix itself
SparseMatrix<double> matrix(sparsity);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
matrix.add(global, global, 4);
// build the sparse matrix
TrilinosWrappers::SparseMatrix matrix(N * N, N * N, 5U);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
matrix.set(global, global, 4);
// build the sparse matrix
IndexSet indices = complete_index_set(N * N);
TrilinosWrappers::SparseMatrix matrix(indices, MPI_COMM_WORLD, 5);
- for (unsigned int i = 0; i < N; i++)
- for (unsigned int j = 0; j < N; j++)
+ for (unsigned int i = 0; i < N; ++i)
+ for (unsigned int j = 0; j < N; ++j)
{
const unsigned int global = i * N + j;
matrix.set(global, global, 4);
std::vector<unsigned int> permutation(N);
{
std::vector<unsigned int> unused_indices(N);
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
unused_indices[i] = i;
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; ++i)
{
// pick a random element among the
// unused indices
// build the sparse matrix
IndexSet indices = complete_index_set(N * N);
TrilinosWrappers::SparseMatrix matrix(indices, MPI_COMM_WORLD, 5);
- for (unsigned int i_ = 0; i_ < N; i_++)
- for (unsigned int j_ = 0; j_ < N; j_++)
+ for (unsigned int i_ = 0; i_ < N; ++i_)
+ for (unsigned int j_ = 0; j_ < N; ++j_)
{
const unsigned int i = permutation[i_];
const unsigned int j = permutation[j_];
// Make matrix
DynamicSparsityPattern csp(dim, dim);
- for (unsigned int row = 0; row < dim; row++)
+ for (unsigned int row = 0; row < dim; ++row)
csp.add(row, row);
TrilinosWrappers::SparseMatrix A;
A.reinit(csp);
- for (unsigned int row = 0; row < dim; row++)
+ for (unsigned int row = 0; row < dim; ++row)
A.set(row, row, 2.0 * (row + 1));
TrilinosWrappers::MPI::Vector f;
fill(Vector<Number> &v)
{
v = 0;
- for (unsigned int i = 0; i < v.size(); i++)
+ for (unsigned int i = 0; i < v.size(); ++i)
v(i) = counter + i * 2;
++counter;
// color
deallog << "Coloring" << std::endl;
deallog << "Number of colors used: " << num_colors << std::endl;
- for (unsigned int i = 0; i < num_indices; i++)
+ for (unsigned int i = 0; i < num_indices; ++i)
{
deallog << i << " " << color_indices[i] << std::endl;
}
// color
deallog << "Coloring" << std::endl;
deallog << "Number of colors used: " << num_colors << std::endl;
- for (unsigned int i = 0; i < num_indices; i++)
+ for (unsigned int i = 0; i < num_indices; ++i)
{
deallog << i << " " << color_indices[i] << std::endl;
}
// color
deallog << "Coloring" << std::endl;
deallog << "Number of colors used: " << num_colors << std::endl;
- for (unsigned int i = 0; i < num_indices; i++)
+ for (unsigned int i = 0; i < num_indices; ++i)
{
deallog << i << " " << color_indices[i] << std::endl;
}