}
else
{
- for (int i = 0; i < dim; ++i)
+ for (unsigned int i = 0; i < dim; ++i)
d[i] = A[i][i];
// For dim = 3:
g = c * r - b;
// Form the eigenvectors
- for (int k = 0; k < dim; ++k)
+ for (unsigned int k = 0; k < dim; ++k)
{
t = Q[k][i + 1];
Q[k][i + 1] = s * Q[k][i] + c * t;
// The diagonal elements of the tridiagonal matrix;
// this will ultimately store the eigenvalues
std::array<Number, dim> w;
- for (int i = 0; i < dim; ++i)
+ for (unsigned int i = 0; i < dim; ++i)
w[i] = A[i][i];
// Calculate (tr(A))^{2}
{
// Test for convergence
so = 0.0;
- for (int p = 0; p < dim; ++p)
+ for (unsigned int p = 0; p < dim; ++p)
for (int q = p + 1; q < dim; ++q)
so += std::abs(A[p][q]);
if (so == 0.0)
thresh = 0.0;
// Perform sweep
- for (int p = 0; p < dim; ++p)
- for (int q = p + 1; q < dim; ++q)
+ for (unsigned int p = 0; p < dim; ++p)
+ for (unsigned int q = p + 1; q < dim; ++q)
{
g = 100.0 * std::abs(A[p][q]);
w[p] -= z;
w[q] += z;
// ... by executing the various rotations in sequence
- for (int r = 0; r < p; ++r)
+ for (unsigned int r = 0; r < p; ++r)
{
t = A[r][p];
A[r][p] = c * t - s * A[r][q];
A[r][q] = s * t + c * A[r][q];
}
- for (int r = p + 1; r < q; ++r)
+ for (unsigned int r = p + 1; r < q; ++r)
{
t = A[p][r];
A[p][r] = c * t - s * A[r][q];
A[r][q] = s * t + c * A[r][q];
}
- for (int r = q + 1; r < dim; ++r)
+ for (unsigned int r = q + 1; r < dim; ++r)
{
t = A[p][r];
A[p][r] = c * t - s * A[q][r];
}
// Update the eigenvectors
- for (int r = 0; r < dim; ++r)
+ for (unsigned int r = 0; r < dim; ++r)
{
t = Q[r][p];
Q[r][p] = c * t - s * Q[r][q];
this->mass_matrix = mass_matrices;
this->derivative_matrix = derivative_matrices;
- for (int dir = 0; dir < dim; ++dir)
+ for (unsigned int dir = 0; dir < dim; ++dir)
{
Assert(n_rows_1d == -1 ||
(n_rows_1d > 0 && static_cast<unsigned int>(n_rows_1d) ==
eigenvectors_flat.resize(nm_flat_size_max);
std::array<unsigned int, macro_size> offsets_nm;
std::array<unsigned int, macro_size> offsets_n;
- for (int dir = 0; dir < dim; ++dir)
+ for (unsigned int dir = 0; dir < dim; ++dir)
{
Assert(n_rows_1d == -1 ||
(n_rows_1d > 0 && static_cast<unsigned int>(n_rows_1d) ==
const unsigned int q_point = internal::compute_index<dim, n_q_points_1d>();
const Number * inv_jacobian = &inv_jac[q_point];
gradient_type grad;
- for (int d_1 = 0; d_1 < dim; ++d_1)
+ for (unsigned int d_1 = 0; d_1 < dim; ++d_1)
{
Number tmp = 0.;
- for (int d_2 = 0; d_2 < dim; ++d_2)
+ for (unsigned int d_2 = 0; d_2 < dim; ++d_2)
tmp += inv_jacobian[padding_length * n_cells * (dim * d_2 + d_1)] *
gradients[d_2][q_point];
grad[d_1] = tmp;
// TODO optimize if the mesh is uniform
const unsigned int q_point = internal::compute_index<dim, n_q_points_1d>();
const Number * inv_jacobian = &inv_jac[q_point];
- for (int d_1 = 0; d_1 < dim; ++d_1)
+ for (unsigned int d_1 = 0; d_1 < dim; ++d_1)
{
Number tmp = 0.;
- for (int d_2 = 0; d_2 < dim; ++d_2)
+ for (unsigned int d_2 = 0; d_2 < dim; ++d_2)
tmp += inv_jacobian[n_cells * padding_length * (dim * d_1 + d_2)] *
grad_in[d_2];
gradients[d_1][q_point] = tmp * JxW[q_point];
SharedData(Number *vd, Number *gq[dim])
: values(vd)
{
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
gradients[d] = gq[d];
}
local_cell + cells_per_block * (blockIdx.x + gridDim.x * blockIdx.y);
Number *gq[dim];
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
gq[d] = &gradients[d][local_cell * Functor::n_q_points];
SharedData<dim, Number> shared_data(
for (unsigned int i = 0; i < n_q_points; ++i)
quadrature_weights[i] = quadrature.weight(i);
- for (int d = 0; d < structdim; ++d)
+ for (unsigned int d = 0; d < structdim; ++d)
{
tensor_quadrature_weights[d].resize(quadrature_1d.size());
for (unsigned int i = 0; i < quadrature_1d.size(); ++i)
std::size_t memory = sizeof(this) + quadrature.memory_consumption() +
quadrature_weights.memory_consumption() +
face_orientations.memory_consumption();
- for (int d = 0; d < structdim; ++d)
+ for (unsigned int d = 0; d < structdim; ++d)
memory += tensor_quadrature_weights[d].memory_consumption();
return memory;
}
const auto grad = fe.shape_grad(i, quad.point(q));
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
shape_gradients[d * n_dofs * n_q_points + i * n_q_points +
q] = grad[d];
}
const auto grad = fe.shape_grad(i, point);
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
shape_gradients_face(
f, o, d, i * n_q_points_face + q) = grad[d];
}
auto boundary_points = bb[i].get_boundary_points();
dealii::Point<dim, Number> min_corner = boundary_points.first;
dealii::Point<dim, Number> max_corner = boundary_points.second;
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
min_corner_arborx[d] = static_cast<float>(min_corner[d]);
max_corner_arborx[d] = static_cast<float>(max_corner[d]);
Point<dim + 1> output;
output(component_in_dim_plus_1) = coordinate_value;
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
const unsigned int component_to_write_to =
dealii::internal::coordinate_to_one_dim_higher<dim>(
// the derivatives with respect to this direction and copy the other
// values.
Tensor<1, dim> grad;
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
const unsigned int index_to_write_from =
internal::coordinate_to_one_dim_higher<dim>(restricted_direction, d);
// the derivatives with respect to this direction and copy the other
// values.
SymmetricTensor<2, dim> hess;
- for (int i = 0; i < dim; ++i)
+ for (unsigned int i = 0; i < dim; ++i)
{
const unsigned int i_to_write_from =
internal::coordinate_to_one_dim_higher<dim>(restricted_direction, i);
- for (int j = 0; j < dim; ++j)
+ for (unsigned int j = 0; j < dim; ++j)
{
const unsigned int j_to_write_from =
internal::coordinate_to_one_dim_higher<dim>(restricted_direction,
, tolerance(tolerance)
, max_iter(max_iter)
{
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
Assert(radii[d] > 0, ExcMessage("All radii must be positive."))
}
Ellipsoid<dim>::evaluate_ellipsoid(const Point<dim> &point) const
{
double val = 0.0;
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
val += std::pow((point[d] - center[d]) / radii[d], 2);
return val - 1.0;
}
* around a wrong diagnostic in gcc-10.3.0 that warns about that the
* comparison "d < dim" is always false in case of "dim == 0".
* MM 2021 */
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
r += quad.point(i)[d];
if (r <= 1 + 1e-10)
{
#endif
Point<spacedim> invalid_point;
- for (int d = 0; d < spacedim; ++d)
+ for (unsigned int d = 0; d < spacedim; ++d)
invalid_point[d] = std::numeric_limits<double>::quiet_NaN();
const auto pack = [&](const auto &cell) {
// ... and rotate all dofs belonging to vector valued components
// that are selected by first_vector_components:
- for (int i = 0; i < spacedim; ++i)
+ for (unsigned int i = 0; i < spacedim; ++i)
{
transformation[vector_dofs[i]][vector_dofs[i]] = 0.;
- for (int j = 0; j < spacedim; ++j)
+ for (unsigned int j = 0; j < spacedim; ++j)
transformation[vector_dofs[i]][vector_dofs[j]] =
matrix[i][j];
}
// Initiative...), and we have
// (rt_order+1)^(dim-1) DoFs per face
unsigned int dofs_per_face = 1;
- for (int d = 0; d < dim - 1; ++d)
+ for (unsigned int d = 0; d < dim - 1; ++d)
dofs_per_face *= rt_order + 1;
// and then there are interior dofs
increment_indices(unsigned int (&indices)[dim], const unsigned int dofs1d)
{
++indices[0];
- for (int d = 0; d < dim - 1; ++d)
+ for (unsigned int d = 0; d < dim - 1; ++d)
if (indices[d] == dofs1d)
{
indices[d] = 0;
tria,
[&](const auto &, const auto &point) {
Point<spacedim> new_point;
- for (int c = 0; c < spacedim; ++c)
+ for (unsigned int c = 0; c < spacedim; ++c)
new_point[c] = transformation_function.value(point, c);
return new_point;
},
auto p1 = p;
auto p2 = p;
- for (int d = 0; d < spacedim; ++d)
+ for (unsigned int d = 0; d < spacedim; ++d)
{
p1[d] = p1[d] - tolerance;
p2[d] = p2[d] + tolerance;
Point<spacedim> distance;
if (matrix.m() == spacedim)
- for (int i = 0; i < spacedim; ++i)
- for (int j = 0; j < spacedim; ++j)
+ for (unsigned int i = 0; i < spacedim; ++i)
+ for (unsigned int j = 0; j < spacedim; ++j)
distance(i) += matrix(i, j) * point1(j);
else
distance = point1;
if (!min_lower_abs_grad)
{
min_lower_abs_grad.emplace();
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
(*min_lower_abs_grad)[d] =
lower_bound_on_abs(bounds.gradient[d]);
}
else
{
- for (int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < dim; ++d)
{
(*min_lower_abs_grad)[d] =
std::min((*min_lower_abs_grad)[d],
{
// Get the side lengths for each direction and sort them.
std::array<std::pair<double, unsigned int>, dim> side_lengths;
- for (int i = 0; i < dim; ++i)
+ for (unsigned int i = 0; i < dim; ++i)
{
side_lengths[i].first = box.side_length(i);
side_lengths[i].second = i;