const unsigned int direction[lines_per_cell] = {
1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2};
- return ((cell_refinement_case & cut_one[direction[line_no]]) ?
+ return ((cell_refinement_case & cut_one[direction[line_no]]) != 0u ?
RefinementCase<1>::cut_x :
RefinementCase<1>::no_refinement);
}
AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
if (face_refinement_case == RefinementCase<dim>::cut_x)
- return (face_no / 2) ? RefinementCase<dim>::cut_x :
- RefinementCase<dim>::cut_y;
+ return (face_no / 2) != 0u ? RefinementCase<dim>::cut_x :
+ RefinementCase<dim>::cut_y;
else
return RefinementCase<dim>::no_refinement;
}
(void)dim;
AssertIndexRange(line_no, GeometryInfo<dim>::lines_per_cell);
- return (line_no / 2) ? RefinementCase<2>::cut_x : RefinementCase<2>::cut_y;
+ return (line_no / 2) != 0u ? RefinementCase<2>::cut_x :
+ RefinementCase<2>::cut_y;
}
MPI_STATUSES_IGNORE);
AssertThrowMPI(ierr);
- return all_receive_requests_are_done;
+ return all_receive_requests_are_done != 0;
#else
return true;
#endif
&all_ranks_reached_barrier,
MPI_STATUSES_IGNORE);
AssertThrowMPI(ierr);
- return all_ranks_reached_barrier;
+ return all_ranks_reached_barrier != 0;
#else
return true;
#endif
&status);
AssertThrowMPI(ierr);
- if (request_is_pending)
+ if (request_is_pending != 0)
{
// Get the rank of the requesting process and add it to the
// list of requesting processes (which may contain duplicates).
const auto string_array = Convert<T>::to_string_internal_2(t, *p);
std::string str;
for (unsigned int i = 0; i < string_array.size(); ++i)
- str += (i ? " " + p->get_separator() + " " : "") + string_array[i];
+ str +=
+ (i != 0u ? " " + p->get_separator() + " " : "") + string_array[i];
AssertThrow(p->match(str), ExcNoMatch(str, p->description()));
return str;
}
// source:
// https://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit
// "Checking a bit"
- return (number >> n) & 1U;
+ return ((number >> n) & 1U) != 0u;
}
// polynomial to put the values and derivatives of shape functions
// to put there, depending on what the user requested
std::vector<double> values(
- update_flags & update_values ? this->n_dofs_per_cell() : 0);
+ (update_flags & update_values) != 0u ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<1, dim>> grads(
- update_flags & update_gradients ? this->n_dofs_per_cell() : 0);
+ (update_flags & update_gradients) != 0u ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<2, dim>> grad_grads(
- update_flags & update_hessians ? this->n_dofs_per_cell() : 0);
+ (update_flags & update_hessians) != 0u ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<3, dim>> third_derivatives(
- update_flags & update_3rd_derivatives ? this->n_dofs_per_cell() : 0);
+ (update_flags & update_3rd_derivatives) != 0u ? this->n_dofs_per_cell() :
+ 0);
std::vector<Tensor<4, dim>>
fourth_derivatives; // won't be needed, so leave empty
(output_data.shape_values.n_cols() == n_q_points)))
data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
data.shape_gradients.reinit(this->n_dofs_per_cell(), n_q_points);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
data.shape_hessians.reinit(this->n_dofs_per_cell(), n_q_points);
- if (update_flags & update_3rd_derivatives)
+ if ((update_flags & update_3rd_derivatives) != 0u)
data.shape_3rd_derivatives.reinit(this->n_dofs_per_cell(), n_q_points);
// next already fill those fields of which we have information by
// now. note that the shape gradients are only those on the unit
// cell, and need to be transformed when visiting an actual cell
- if (update_flags & (update_values | update_gradients | update_hessians |
- update_3rd_derivatives))
+ if ((update_flags & (update_values | update_gradients | update_hessians |
+ update_3rd_derivatives)) != 0u)
for (unsigned int i = 0; i < n_q_points; ++i)
{
poly_space->evaluate(quadrature.point(i),
// faces and subfaces, but we later on copy only a portion of it
// into the output object; in that case, copy the data from all
// faces into the scratch object
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
if (output_data.shape_values.n_rows() > 0)
{
if (output_data.shape_values.n_cols() == n_q_points)
// for everything else, derivatives need to be transformed,
// so we write them into our scratch space and only later
// copy stuff into where FEValues wants it
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_gradients[k][i] = grads[k];
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_hessians[k][i] = grad_grads[k];
- if (update_flags & update_3rd_derivatives)
+ if ((update_flags & update_3rd_derivatives) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_3rd_derivatives[k][i] = third_derivatives[k];
}
{
UpdateFlags out = update_default;
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_covariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_covariant_transformation |
update_gradients | update_jacobian_pushed_forward_grads;
- if (flags & update_3rd_derivatives)
+ if ((flags & update_3rd_derivatives) != 0u)
out |= update_3rd_derivatives | update_covariant_transformation |
update_hessians | update_gradients |
update_jacobian_pushed_forward_grads |
update_jacobian_pushed_forward_2nd_derivatives;
- if (flags & update_normal_vectors)
+ if ((flags & update_normal_vectors) != 0u)
out |= update_normal_vectors | update_JxW_values;
return out;
// transform gradients and higher derivatives. there is nothing to do
// for values since we already emplaced them into output_data when
// we were in get_data()
- if ((flags & update_gradients) &&
+ if (((flags & update_gradients) != 0u) &&
(cell_similarity != CellSimilarity::translation))
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_gradients, k),
mapping_internal,
make_array_view(output_data.shape_gradients, k));
- if ((flags & update_hessians) &&
+ if (((flags & update_hessians) != 0u) &&
(cell_similarity != CellSimilarity::translation))
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
correct_hessians(output_data, mapping_data, quadrature.size());
}
- if ((flags & update_3rd_derivatives) &&
+ if (((flags & update_3rd_derivatives) != 0u) &&
(cell_similarity != CellSimilarity::translation))
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
// transform gradients and higher derivatives. we also have to copy
// the values (unlike in the case of fill_fe_values()) since
// we need to take into account the offsets
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
for (unsigned int i = 0; i < n_q_points; ++i)
output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
make_array_view(fe_data.shape_gradients, k, offset, n_q_points),
mapping_internal,
make_array_view(output_data.shape_gradients, k));
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
correct_hessians(output_data, mapping_data, n_q_points);
}
- if (flags & update_3rd_derivatives)
+ if ((flags & update_3rd_derivatives) != 0u)
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
// transform gradients and higher derivatives. we also have to copy
// the values (unlike in the case of fill_fe_values()) since
// we need to take into account the offsets
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
for (unsigned int i = 0; i < quadrature.size(); ++i)
output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()),
mapping_internal,
make_array_view(output_data.shape_gradients, k));
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
correct_hessians(output_data, mapping_data, quadrature.size());
}
- if (flags & update_3rd_derivatives)
+ if ((flags & update_3rd_derivatives) != 0u)
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_3rd_derivatives,
const UpdateFlags flags) const
{
UpdateFlags out = flags & update_values;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_covariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_covariant_transformation;
- if (flags & update_normal_vectors)
+ if ((flags & update_normal_vectors) != 0u)
out |= update_normal_vectors | update_JxW_values;
return out;
std::vector<Tensor<4, dim>> third_derivatives(0);
std::vector<Tensor<5, dim>> fourth_derivatives(0);
- if (update_flags & (update_values | update_gradients | update_hessians))
+ if ((update_flags & (update_values | update_gradients | update_hessians)) !=
+ 0u)
data.dof_sign_change.resize(this->dofs_per_cell);
// initialize fields only if really
const bool update_transformed_shape_hessian_tensors =
update_transformed_shape_values;
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
{
values.resize(this->n_dofs_per_cell());
data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
data.transformed_shape_values.resize(n_q_points);
}
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
{
grads.resize(this->n_dofs_per_cell());
data.shape_grads.reinit(this->n_dofs_per_cell(), n_q_points);
data.untransformed_shape_grads.resize(n_q_points);
}
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
{
grad_grads.resize(this->n_dofs_per_cell());
data.shape_grad_grads.reinit(this->n_dofs_per_cell(), n_q_points);
// node values N_i holds
// N_i(v_j)=\delta_ij for all basis
// functions v_j
- if (update_flags & (update_values | update_gradients))
+ if ((update_flags & (update_values | update_gradients)) != 0u)
for (unsigned int k = 0; k < n_q_points; ++k)
{
poly_space->evaluate(quadrature.point(k),
third_derivatives,
fourth_derivatives);
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
{
if (inverse_node_matrix.n_cols() == 0)
for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
}
}
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
{
if (inverse_node_matrix.n_cols() == 0)
for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
}
}
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
{
if (inverse_node_matrix.n_cols() == 0)
for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
static const ndarray<unsigned int, 3, 2> table = {
{{{0, 1}}, {{1, 2}}, {{2, 0}}}};
- return table[face][face_orientation ? vertex : (1 - vertex)];
+ return table[face][face_orientation != 0u ? vertex : (1 - vertex)];
}
else if (*this == ReferenceCells::Quadrilateral)
{
else if (*this == ReferenceCells::Quadrilateral)
{
return GeometryInfo<2>::standard_to_real_line_vertex(vertex,
- face_orientation);
+ face_orientation !=
+ 0u);
}
else if (*this == ReferenceCells::Tetrahedron)
{
return accessor.reference_cell().standard_vs_true_line_orientation(
pair[1],
face_orientation_raw(accessor, quad_index),
- accessor.quad(quad_index)->line_orientation(line_within_face_index));
+ static_cast<unsigned char>(
+ accessor.quad(quad_index)
+ ->line_orientation(line_within_face_index)));
}
AffineConstraints<number>::calculate_line_index(const size_type line_n) const
{
// IndexSet is unused (serial case)
- if (!local_lines.size())
+ if (local_lines.size() == 0)
return line_n;
Assert(local_lines.is_element(line_n), ExcRowNotStoredHere(line_n));
inline bool
AffineConstraints<number>::can_store_line(size_type line_n) const
{
- return !local_lines.size() || local_lines.is_element(line_n);
+ return local_lines.size() == 0 || local_lines.is_element(line_n);
}
template <typename number>
if (scientific)
{
out.setf(std::ios::scientific, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 7;
}
else
{
out.setf(std::ios::fixed, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 2;
}
Assert(rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
const size_type local_row =
- rowset.size() ? rowset.index_within_set(row) : row;
+ rowset.size() != 0u ? rowset.index_within_set(row) : row;
AssertIndexRange(index, lines[local_row].entries.size());
return lines[local_row].entries[index];
}
if (scientific)
{
out.setf(std::ios::scientific, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 7;
}
else
{
out.setf(std::ios::fixed, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 2;
}
return -Utilities::MPI::max(
local_result, this->block(0).partitioner->get_mpi_communicator());
else
- return local_result;
+ return local_result != 0;
}
SparseMatrix<number>::clear();
- if (own_sparsity)
+ if (own_sparsity != nullptr)
{
delete own_sparsity;
own_sparsity = nullptr;
if (scientific)
{
out.setf(std::ios::scientific, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 7;
}
else
{
out.setf(std::ios::fixed, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 2;
}
if (scientific)
{
out.setf(std::ios::scientific, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 7;
}
else
{
out.setf(std::ios::fixed, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 2;
}
case 1:
for (unsigned int c = 0; c < n_components; ++c)
{
- if (evaluation_flag & EvaluationFlags::values)
+ if ((evaluation_flag & EvaluationFlags::values) != 0u)
eval0.template values<0, true, false>(values_dofs, values_quad);
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
eval0.template gradients<0, true, false>(values_dofs,
gradients_quad);
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
eval0.template hessians<0, true, false>(values_dofs,
hessians_quad);
for (unsigned int c = 0; c < n_components; ++c)
{
// grad x
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
{
eval0.template gradients<0, true, false>(values_dofs, temp1);
eval1.template values<1, true, false>(temp1, gradients_quad);
}
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
{
// grad xy
- if (!(evaluation_flag & EvaluationFlags::gradients))
+ if ((evaluation_flag & EvaluationFlags::gradients) == 0u)
eval0.template gradients<0, true, false>(values_dofs,
temp1);
eval1.template gradients<1, true, false>(temp1,
// grad y
eval0.template values<0, true, false>(values_dofs, temp1);
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
eval1.template gradients<1, true, false>(temp1,
gradients_quad +
n_q_points);
// grad yy
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
eval1.template hessians<1, true, false>(temp1,
hessians_quad +
n_q_points);
// val: can use values applied in x
- if (evaluation_flag & EvaluationFlags::values)
+ if ((evaluation_flag & EvaluationFlags::values) != 0u)
eval1.template values<1, true, false>(temp1, values_quad);
// advance to the next component in 1D array
case 3:
for (unsigned int c = 0; c < n_components; ++c)
{
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
{
// grad x
eval0.template gradients<0, true, false>(values_dofs, temp1);
eval2.template values<2, true, false>(temp2, gradients_quad);
}
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
{
// grad xz
- if (!(evaluation_flag & EvaluationFlags::gradients))
+ if ((evaluation_flag & EvaluationFlags::gradients) == 0u)
{
eval0.template gradients<0, true, false>(values_dofs,
temp1);
// grad y
eval0.template values<0, true, false>(values_dofs, temp1);
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
{
eval1.template gradients<1, true, false>(temp1, temp2);
eval2.template values<2, true, false>(temp2,
n_q_points);
}
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
{
// grad yz
- if (!(evaluation_flag & EvaluationFlags::gradients))
+ if ((evaluation_flag & EvaluationFlags::gradients) == 0u)
eval1.template gradients<1, true, false>(temp1, temp2);
eval2.template gradients<2, true, false>(temp2,
hessians_quad +
// grad z: can use the values applied in x direction stored in
// temp1
eval1.template values<1, true, false>(temp1, temp2);
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
eval2.template gradients<2, true, false>(temp2,
gradients_quad +
2 * n_q_points);
// grad zz: can use the values applied in x and y direction stored
// in temp2
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
eval2.template hessians<2, true, false>(temp2,
hessians_quad +
2 * n_q_points);
// val: can use the values applied in x & y direction stored in
// temp2
- if (evaluation_flag & EvaluationFlags::values)
+ if ((evaluation_flag & EvaluationFlags::values) != 0u)
eval2.template values<2, true, false>(temp2, values_quad);
// advance to the next component in 1D array
// case additional dof for FE_Q_DG0: add values; gradients and second
// derivatives evaluate to zero
if (type == MatrixFreeFunctions::tensor_symmetric_plus_dg0 &&
- (evaluation_flag & EvaluationFlags::values))
+ ((evaluation_flag & EvaluationFlags::values) != 0u))
{
values_quad -= n_components * n_q_points;
values_dofs -= n_components * dofs_per_comp;
case 1:
for (unsigned int c = 0; c < n_components; ++c)
{
- if (integration_flag & EvaluationFlags::values)
+ if ((integration_flag & EvaluationFlags::values) != 0u)
{
if (add_into_values_array == false)
eval0.template values<0, false, false>(values_quad,
eval0.template values<0, false, true>(values_quad,
values_dofs);
}
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
{
- if (integration_flag & EvaluationFlags::values ||
+ if (((integration_flag & EvaluationFlags::values) != 0u) ||
add_into_values_array == true)
eval0.template gradients<0, false, true>(gradients_quad,
values_dofs);
case 2:
for (unsigned int c = 0; c < n_components; ++c)
{
- if ((integration_flag & EvaluationFlags::values) &&
- !(integration_flag & EvaluationFlags::gradients))
+ if (((integration_flag & EvaluationFlags::values) != 0u) &&
+ ((integration_flag & EvaluationFlags::gradients) == 0u))
{
eval1.template values<1, false, false>(values_quad, temp1);
if (add_into_values_array == false)
else
eval0.template values<0, false, true>(temp1, values_dofs);
}
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
{
eval1.template gradients<1, false, false>(gradients_quad +
n_q_points,
temp1);
- if (integration_flag & EvaluationFlags::values)
+ if ((integration_flag & EvaluationFlags::values) != 0u)
eval1.template values<1, false, true>(values_quad, temp1);
if (add_into_values_array == false)
eval0.template values<0, false, false>(temp1, values_dofs);
case 3:
for (unsigned int c = 0; c < n_components; ++c)
{
- if ((integration_flag & EvaluationFlags::values) &&
- !(integration_flag & EvaluationFlags::gradients))
+ if (((integration_flag & EvaluationFlags::values) != 0u) &&
+ ((integration_flag & EvaluationFlags::gradients) == 0u))
{
eval2.template values<2, false, false>(values_quad, temp1);
eval1.template values<1, false, false>(temp1, temp2);
else
eval0.template values<0, false, true>(temp2, values_dofs);
}
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
{
eval2.template gradients<2, false, false>(gradients_quad +
2 * n_q_points,
temp1);
- if (integration_flag & EvaluationFlags::values)
+ if ((integration_flag & EvaluationFlags::values) != 0u)
eval2.template values<2, false, true>(values_quad, temp1);
eval1.template values<1, false, false>(temp1, temp2);
eval2.template values<2, false, false>(gradients_quad +
{
values_dofs -= n_components * dofs_per_comp - dofs_per_comp + 1;
values_quad -= n_components * n_q_points;
- if (integration_flag & EvaluationFlags::values)
+ if ((integration_flag & EvaluationFlags::values) != 0u)
for (unsigned int c = 0; c < n_components; ++c)
{
values_dofs[0] = values_quad[0];
using Eval =
EvaluatorTensorProduct<evaluate_general, 1, 0, 0, Number, Number>;
- if (evaluation_flag & EvaluationFlags::values)
+ if ((evaluation_flag & EvaluationFlags::values) != 0u)
{
const auto shape_values = shape_data.front().shape_values.data();
auto values_quad_ptr = fe_eval.begin_values();
}
}
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
{
const auto shape_gradients = shape_data.front().shape_gradients.data();
auto gradients_quad_ptr = fe_eval.begin_gradients();
}
}
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
Assert(false, ExcNotImplemented());
}
using Eval =
EvaluatorTensorProduct<evaluate_general, 1, 0, 0, Number, Number>;
- if (integration_flag & EvaluationFlags::values)
+ if ((integration_flag & EvaluationFlags::values) != 0u)
{
const auto shape_values = shape_data.front().shape_values.data();
auto values_quad_ptr = fe_eval.begin_values();
}
}
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
{
const auto shape_gradients = shape_data.front().shape_gradients.data();
auto gradients_quad_ptr = fe_eval.begin_gradients();
n_q_points);
if ((add_into_values_array == false &&
- (integration_flag & EvaluationFlags::values) == false) &&
+ (integration_flag & EvaluationFlags::values) == 0) &&
d == 0)
eval.template gradients<0, false, false>(
gradients_quad_ptr, values_dofs_actual_ptr);
gradients_quad +
2 * n_points);
}
- if (evaluation_flag & EvaluationFlags::hessians)
+ if ((evaluation_flag & EvaluationFlags::hessians) != 0u)
{
eval.template hessians<0, true, false>(values_dofs, hessians_quad);
if (dim > 1)
if (dim == 2)
{
// grad xy, queue into gradient
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
eval.template gradients<1, false, true>(hessians_quad +
2 * n_points,
gradients_quad);
if (dim == 3)
{
// grad xy, queue into gradient
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
eval.template gradients<1, false, true>(hessians_quad +
3 * n_points,
gradients_quad);
gradients_quad);
// grad yz
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
eval.template gradients<2, false, true>(
hessians_quad + 5 * n_points, gradients_quad + n_points);
else
fe_eval.begin_values() + c * n_q_points);
// apply derivatives in the collocation space
- if (evaluation_flag &
- (EvaluationFlags::gradients | EvaluationFlags::hessians))
+ if ((evaluation_flag &
+ (EvaluationFlags::gradients | EvaluationFlags::hessians)) != 0u)
FEEvaluationImplCollocation<dim, n_q_points_1d - 1, Number>::
do_evaluate(shape_data,
evaluation_flag & (EvaluationFlags::gradients |
for (unsigned int c = 0; c < n_components; ++c)
{
// apply derivatives in collocation space
- if (integration_flag &
- (EvaluationFlags::gradients | EvaluationFlags::hessians))
+ if ((integration_flag &
+ (EvaluationFlags::gradients | EvaluationFlags::hessians)) != 0u)
FEEvaluationImplCollocation<dim, n_q_points_1d - 1, Number>::
do_integrate(shape_data,
integration_flag & (EvaluationFlags::gradients |
}
# ifdef DEBUG
- if (evaluation_flag_actual & EvaluationFlags::values)
+ if ((evaluation_flag_actual & EvaluationFlags::values) != 0u)
this->values_quad_initialized = true;
- if (evaluation_flag_actual & EvaluationFlags::gradients)
+ if ((evaluation_flag_actual & EvaluationFlags::gradients) != 0u)
this->gradients_quad_initialized = true;
- if (evaluation_flag_actual & EvaluationFlags::hessians)
+ if ((evaluation_flag_actual & EvaluationFlags::hessians) != 0u)
this->hessians_quad_initialized = true;
# endif
}
const bool sum_into_values_array)
{
# ifdef DEBUG
- if (integration_flag & EvaluationFlags::values)
+ if ((integration_flag & EvaluationFlags::values) != 0u)
Assert(this->values_quad_submitted == true,
internal::ExcAccessToUninitializedField());
- if (integration_flag & EvaluationFlags::gradients)
+ if ((integration_flag & EvaluationFlags::gradients) != 0u)
Assert(this->gradients_quad_submitted == true,
internal::ExcAccessToUninitializedField());
if (integration_flag & EvaluationFlags::hessians)
n_components, evaluation_flag_actual, values_array, *this);
# ifdef DEBUG
- if (evaluation_flag_actual & EvaluationFlags::values)
+ if ((evaluation_flag_actual & EvaluationFlags::values) != 0u)
this->values_quad_initialized = true;
- if (evaluation_flag_actual & EvaluationFlags::gradients)
+ if ((evaluation_flag_actual & EvaluationFlags::gradients) != 0u)
this->gradients_quad_initialized = true;
if (evaluation_flag_actual & EvaluationFlags::hessians)
this->hessians_quad_initialized = true;
"and EvaluationFlags::hessians are supported."));
EvaluationFlags::EvaluationFlags integration_flag_actual = integration_flag;
- if (integration_flag & EvaluationFlags::hessians &&
+ if (((integration_flag & EvaluationFlags::hessians) != 0u) &&
(this->cell_type > internal::MatrixFreeFunctions::affine))
{
unsigned int size = n_components * dim * n_q_points;
}
// translate update flags
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
update_flags_mapping |= update_jacobians;
- if (update_flags & update_gradients ||
- update_flags & update_inverse_jacobians)
+ if (((update_flags & update_gradients) != 0u) ||
+ ((update_flags & update_inverse_jacobians) != 0u))
update_flags_mapping |= update_inverse_jacobians;
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
update_flags_mapping |= update_quadrature_points;
}
update_flags | update_flags_mapping);
fe_values->reinit(cell);
mapping_data.initialize(unit_points.size(), update_flags_mapping);
- if (update_flags_mapping & update_jacobians)
+ if ((update_flags_mapping & update_jacobians) != 0)
for (unsigned int q = 0; q < unit_points.size(); ++q)
mapping_data.jacobians[q] = fe_values->jacobian(q);
- if (update_flags_mapping & update_inverse_jacobians)
+ if ((update_flags_mapping & update_inverse_jacobians) != 0)
for (unsigned int q = 0; q < unit_points.size(); ++q)
mapping_data.inverse_jacobians[q] = fe_values->inverse_jacobian(q);
- if (update_flags_mapping & update_quadrature_points)
+ if ((update_flags_mapping & update_quadrature_points) != 0)
for (unsigned int q = 0; q < unit_points.size(); ++q)
mapping_data.quadrature_points[q] = fe_values->quadrature_point(q);
}
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0)
values.resize(unit_points.size(), numbers::signaling_nan<value_type>());
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0)
gradients.resize(unit_points.size(),
numbers::signaling_nan<gradient_type>());
}
return;
AssertDimension(solution_values.size(), fe->dofs_per_cell);
- if (((evaluation_flag & EvaluationFlags::values) ||
- (evaluation_flag & EvaluationFlags::gradients)) &&
+ if ((((evaluation_flag & EvaluationFlags::values) != 0u) ||
+ ((evaluation_flag & EvaluationFlags::gradients) != 0u)) &&
!poly.empty())
{
// fast path with tensor product evaluation
polynomials_are_hat_functions);
// convert back to standard format
- if (evaluation_flag & EvaluationFlags::values)
+ if ((evaluation_flag & EvaluationFlags::values) != 0u)
for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
internal::FEPointEvaluation::
EvaluatorTypeTraits<dim, n_components, Number>::set_value(
val_and_grad.first, j, values[i + j]);
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
{
Assert(update_flags & update_gradients ||
update_flags & update_inverse_jacobians,
}
}
}
- else if ((evaluation_flag & EvaluationFlags::values) ||
- (evaluation_flag & EvaluationFlags::gradients))
+ else if (((evaluation_flag & EvaluationFlags::values) != 0u) ||
+ ((evaluation_flag & EvaluationFlags::gradients) != 0u))
{
// slow path with FEValues
Assert(fe_values.get() != nullptr,
ExcMessage(
"Not initialized. Please call FEPointEvaluation::reinit()!"));
- if (evaluation_flag & EvaluationFlags::values)
+ if ((evaluation_flag & EvaluationFlags::values) != 0u)
{
values.resize(unit_points.size());
std::fill(values.begin(), values.end(), value_type());
}
}
- if (evaluation_flag & EvaluationFlags::gradients)
+ if ((evaluation_flag & EvaluationFlags::gradients) != 0u)
{
gradients.resize(unit_points.size());
std::fill(gradients.begin(), gradients.end(), gradient_type());
}
AssertDimension(solution_values.size(), fe->dofs_per_cell);
- if (((integration_flags & EvaluationFlags::values) ||
- (integration_flags & EvaluationFlags::gradients)) &&
+ if ((((integration_flags & EvaluationFlags::values) != 0u) ||
+ ((integration_flags & EvaluationFlags::gradients) != 0u)) &&
!poly.empty())
{
// fast path with tensor product integration
- if (integration_flags & EvaluationFlags::values)
+ if ((integration_flags & EvaluationFlags::values) != 0u)
AssertIndexRange(unit_points.size(), values.size() + 1);
- if (integration_flags & EvaluationFlags::gradients)
+ if ((integration_flags & EvaluationFlags::gradients) != 0u)
AssertIndexRange(unit_points.size(), gradients.size() + 1);
if (solution_renumbered_vectorized.size() != dofs_per_component)
VectorizedArray<Number>>::type>
gradient;
- if (integration_flags & EvaluationFlags::values)
+ if ((integration_flags & EvaluationFlags::values) != 0u)
for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
internal::FEPointEvaluation::
EvaluatorTypeTraits<dim, n_components, Number>::get_value(
value, j, values[i + j]);
- if (integration_flags & EvaluationFlags::gradients)
+ if ((integration_flags & EvaluationFlags::gradients) != 0u)
for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
{
Assert(update_flags_mapping & update_inverse_jacobians,
result[0];
}
}
- else if ((integration_flags & EvaluationFlags::values) ||
- (integration_flags & EvaluationFlags::gradients))
+ else if (((integration_flags & EvaluationFlags::values) != 0u) ||
+ ((integration_flags & EvaluationFlags::gradients) != 0u))
{
// slow path with FEValues
"Not initialized. Please call FEPointEvaluation::reinit()!"));
std::fill(solution_values.begin(), solution_values.end(), 0.0);
- if (integration_flags & EvaluationFlags::values)
+ if ((integration_flags & EvaluationFlags::values) != 0u)
{
AssertIndexRange(unit_points.size(), values.size() + 1);
for (unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
}
}
- if (integration_flags & EvaluationFlags::gradients)
+ if ((integration_flags & EvaluationFlags::gradients) != 0u)
{
AssertIndexRange(unit_points.size(), gradients.size() + 1);
for (unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
mapping_info_storage.data_index_offsets.resize(1);
mapping_info_storage.JxW_values.resize(fe_values.n_quadrature_points);
mapping_info_storage.jacobians[0].resize(fe_values.n_quadrature_points);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
{
mapping_info_storage.quadrature_point_offsets.resize(1, 0);
mapping_info_storage.quadrature_points.resize(
update_flags_cells, quad);
this->update_flags_boundary_faces =
- ((update_flags_inner_faces | update_flags_boundary_faces) &
- update_quadrature_points ?
+ (((update_flags_inner_faces | update_flags_boundary_faces) &
+ update_quadrature_points) != 0u ?
update_quadrature_points :
update_default) |
((update_flags_inner_faces | update_flags_boundary_faces) &
data_cells_local.back().first[my_q].JxW_values.size());
cell_data[my_q].jacobians[0].resize_fast(
cell_data[my_q].JxW_values.size());
- if (update_flags_cells & update_jacobian_grads)
+ if ((update_flags_cells & update_jacobian_grads) != 0)
cell_data[my_q].jacobian_gradients[0].resize_fast(
cell_data[my_q].JxW_values.size());
- if (update_flags_cells & update_quadrature_points)
+ if ((update_flags_cells & update_quadrature_points) != 0)
{
cell_data[my_q].quadrature_point_offsets.resize(cell_type.size());
cell_data[my_q].quadrature_points.resize_fast(
face_data[my_q].JxW_values.size());
face_data[my_q].jacobians[1].resize_fast(
face_data[my_q].JxW_values.size());
- if (update_flags_common & update_jacobian_grads)
+ if ((update_flags_common & update_jacobian_grads) != 0u)
{
face_data[my_q].jacobian_gradients[0].resize_fast(
face_data[my_q].JxW_values.size());
face_data[my_q].JxW_values.size());
face_data[my_q].normals_times_jacobians[1].resize_fast(
face_data[my_q].JxW_values.size());
- if (update_flags_common & update_quadrature_points)
+ if ((update_flags_common & update_quadrature_points) != 0u)
{
face_data[my_q].quadrature_point_offsets.resize(face_type.size());
face_data[my_q].quadrature_points.resize_fast(
my_data.JxW_values.resize_fast(max_size);
my_data.jacobians[0].resize_fast(max_size);
- if (update_flags_cells & update_jacobian_grads)
+ if ((update_flags_cells & update_jacobian_grads) != 0)
my_data.jacobian_gradients[0].resize_fast(max_size);
- if (update_flags_cells & update_quadrature_points)
+ if ((update_flags_cells & update_quadrature_points) != 0)
{
my_data.quadrature_point_offsets.resize(cell_type.size());
for (unsigned int cell = 1; cell < cell_type.size(); ++cell)
my_data.normal_vectors.resize_fast(max_size);
my_data.jacobians[0].resize_fast(max_size);
my_data.jacobians[1].resize_fast(max_size);
- if (update_flags_common & update_jacobian_grads)
+ if ((update_flags_common & update_jacobian_grads) != 0u)
{
my_data.jacobian_gradients[0].resize_fast(max_size);
my_data.jacobian_gradients[1].resize_fast(max_size);
my_data.normals_times_jacobians[0].resize_fast(max_size);
my_data.normals_times_jacobians[1].resize_fast(max_size);
- if (update_flags_common & update_quadrature_points)
+ if ((update_flags_common & update_quadrature_points) != 0u)
{
my_data.quadrature_point_offsets.resize(face_type.size());
my_data.quadrature_point_offsets[0] = 0;
const unsigned int n_quads = face_data_by_cells.size();
const unsigned int n_lanes = VectorizedArrayType::size();
UpdateFlags update_flags =
- (update_flags_faces_by_cells & update_quadrature_points ?
+ ((update_flags_faces_by_cells & update_quadrature_points) != 0 ?
update_quadrature_points :
update_default) |
update_normal_vectors | update_JxW_values | update_jacobians;
AssertDimension(cell_type.size(), cells.size() / n_lanes);
face_data_by_cells[my_q].data_index_offsets.resize(
cell_type.size() * GeometryInfo<dim>::faces_per_cell);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0)
face_data_by_cells[my_q].quadrature_point_offsets.resize(
cell_type.size() * GeometryInfo<dim>::faces_per_cell);
std::size_t storage_length = 0;
storage_length +=
face_data_by_cells[my_q].descriptor[0].n_q_points;
}
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
face_data_by_cells[my_q].quadrature_point_offsets
[i * GeometryInfo<dim>::faces_per_cell + face] =
(i * GeometryInfo<dim>::faces_per_cell + face) *
storage_length * GeometryInfo<dim>::faces_per_cell);
face_data_by_cells[my_q].jacobians[1].resize_fast(
storage_length * GeometryInfo<dim>::faces_per_cell);
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
face_data_by_cells[my_q].normal_vectors.resize_fast(
storage_length * GeometryInfo<dim>::faces_per_cell);
- if (update_flags & update_normal_vectors &&
- update_flags & update_jacobians)
+ if (((update_flags & update_normal_vectors) != 0u) &&
+ ((update_flags & update_jacobians) != 0u))
face_data_by_cells[my_q].normals_times_jacobians[0].resize_fast(
storage_length * GeometryInfo<dim>::faces_per_cell);
- if (update_flags & update_normal_vectors &&
- update_flags & update_jacobians)
+ if (((update_flags & update_normal_vectors) != 0u) &&
+ ((update_flags & update_jacobians) != 0u))
face_data_by_cells[my_q].normals_times_jacobians[1].resize_fast(
storage_length * GeometryInfo<dim>::faces_per_cell);
- if (update_flags & update_jacobian_grads)
+ if ((update_flags & update_jacobian_grads) != 0u)
face_data_by_cells[my_q].jacobian_gradients[0].resize_fast(
storage_length * GeometryInfo<dim>::faces_per_cell);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
face_data_by_cells[my_q].quadrature_points.resize_fast(
cell_type.size() * GeometryInfo<dim>::faces_per_cell *
face_data_by_cells[my_q].descriptor[0].n_q_points);
// copy data for affine data type
if (cell_type[cell] <= affine)
{
- if (update_flags & update_JxW_values)
+ if ((update_flags & update_JxW_values) != 0u)
face_data_by_cells[my_q].JxW_values[offset][v] =
fe_val.JxW(0) / fe_val.get_quadrature().weight(0);
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
{
DerivativeForm<1, dim, dim> inv_jac =
fe_val.jacobian(0).covariant_form();
inv_jac[d][ee];
}
}
- if (is_local && (update_flags & update_jacobians))
+ if (is_local && ((update_flags & update_jacobians) != 0u))
for (unsigned int q = 0; q < fe_val.n_quadrature_points;
++q)
{
inv_jac[d][ee];
}
}
- if (update_flags & update_jacobian_grads)
+ if ((update_flags & update_jacobian_grads) != 0u)
{
Assert(false, ExcNotImplemented());
}
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
for (unsigned int d = 0; d < dim; ++d)
face_data_by_cells[my_q]
.normal_vectors[offset][d][v] =
// copy data for general data type
else
{
- if (update_flags & update_JxW_values)
+ if ((update_flags & update_JxW_values) != 0u)
for (unsigned int q = 0; q < fe_val.n_quadrature_points;
++q)
face_data_by_cells[my_q].JxW_values[offset + q][v] =
fe_val.JxW(q);
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
for (unsigned int q = 0; q < fe_val.n_quadrature_points;
++q)
{
inv_jac[d][ee];
}
}
- if (update_flags & update_jacobian_grads)
+ if ((update_flags & update_jacobian_grads) != 0u)
{
Assert(false, ExcNotImplemented());
}
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
for (unsigned int q = 0; q < fe_val.n_quadrature_points;
++q)
for (unsigned int d = 0; d < dim; ++d)
.normal_vectors[offset + q][d][v] =
fe_val.normal_vector(q)[d];
}
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
for (unsigned int q = 0; q < fe_val.n_quadrature_points;
++q)
for (unsigned int d = 0; d < dim; ++d)
[cell * GeometryInfo<dim>::faces_per_cell + face] +
q][d][v] = fe_val.quadrature_point(q)[d];
}
- if (update_flags & update_normal_vectors &&
- update_flags & update_jacobians)
+ if (((update_flags & update_normal_vectors) != 0u) &&
+ ((update_flags & update_jacobians) != 0u))
for (unsigned int q = 0; q < (cell_type[cell] <= affine ?
1 :
fe_val.n_quadrature_points);
.normals_times_jacobians[0][offset + q] =
face_data_by_cells[my_q].normal_vectors[offset + q] *
face_data_by_cells[my_q].jacobians[0][offset + q];
- if (update_flags & update_normal_vectors &&
- update_flags & update_jacobians)
+ if (((update_flags & update_normal_vectors) != 0u) &&
+ ((update_flags & update_jacobians) != 0u))
for (unsigned int q = 0; q < (cell_type[cell] <= affine ?
1 :
fe_val.n_quadrature_points);
const BlockInfo *block_info)
{
initialize_update_flags();
- initialize_gauss_quadrature((cell_flags & update_values) ?
+ initialize_gauss_quadrature(((cell_flags & update_values) != 0) ?
(el.tensor_degree() + 1) :
el.tensor_degree(),
- (boundary_flags & update_values) ?
+ ((boundary_flags & update_values) != 0) ?
(el.tensor_degree() + 1) :
el.tensor_degree(),
- (face_flags & update_values) ?
+ ((face_flags & update_values) != 0) ?
(el.tensor_degree() + 1) :
el.tensor_degree(),
false);
face_flags |= boundary_flags;
neighbor_flags |= neighbor_geometry ? boundary_flags : update_default;
- if (cell_selector.has_values() != 0)
+ if (cell_selector.has_values())
cell_flags |= update_values;
- if (cell_selector.has_gradients() != 0)
+ if (cell_selector.has_gradients())
cell_flags |= update_gradients;
- if (cell_selector.has_hessians() != 0)
+ if (cell_selector.has_hessians())
cell_flags |= update_hessians;
- if (boundary_selector.has_values() != 0)
+ if (boundary_selector.has_values())
boundary_flags |= update_values;
- if (boundary_selector.has_gradients() != 0)
+ if (boundary_selector.has_gradients())
boundary_flags |= update_gradients;
- if (boundary_selector.has_hessians() != 0)
+ if (boundary_selector.has_hessians())
boundary_flags |= update_hessians;
- if (face_selector.has_values() != 0)
+ if (face_selector.has_values())
face_flags |= update_values;
- if (face_selector.has_gradients() != 0)
+ if (face_selector.has_gradients())
face_flags |= update_gradients;
- if (face_selector.has_hessians() != 0)
+ if (face_selector.has_hessians())
face_flags |= update_hessians;
- if (face_selector.has_values() != 0)
+ if (face_selector.has_values())
neighbor_flags |= update_values;
- if (face_selector.has_gradients() != 0)
+ if (face_selector.has_gradients())
neighbor_flags |= update_gradients;
- if (face_selector.has_hessians() != 0)
+ if (face_selector.has_hessians())
neighbor_flags |= update_hessians;
}
set_precision(rate_key, 2);
const std::string &superkey = data_column_key;
- if (!supercolumns.count(superkey))
+ if (supercolumns.count(superkey) == 0u)
{
add_column_to_supercolumn(data_column_key, superkey);
set_tex_supercaption(superkey, columns[data_column_key].tex_caption);
const std::string &superkey = data_column_key;
// and set the tex caption of the supercolumn to the tex caption of the
// data_column.
- if (!supercolumns.count(superkey))
+ if (supercolumns.count(superkey) == 0u)
{
add_column_to_supercolumn(data_column_key, superkey);
set_tex_supercaption(superkey, columns[data_column_key].tex_caption);
for (std::map<std::string, Column>::const_iterator col_iter = columns.begin();
col_iter != columns.end();
++col_iter)
- if (!col_iter->second.flag)
+ if (col_iter->second.flag == 0u)
evaluate_convergence_rates(col_iter->first,
reference_column_key,
rate_mode);
for (std::map<std::string, Column>::const_iterator col_iter = columns.begin();
col_iter != columns.end();
++col_iter)
- if (!col_iter->second.flag)
+ if (col_iter->second.flag == 0u)
evaluate_convergence_rates(col_iter->first, rate_mode);
}
if (nbdy == 2) // Vertex DOF
{ // ijk is a corner node. Return the proper index (somewhere in [0,3]):
- return (i ? (j ? 2 : 1) : (j ? 3 : 0));
+ return (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0));
}
int offset = 4;
{
if (!ibdy)
{ // On i axis
- return (i - 1) + (j ? order[0] - 1 + order[1] - 1 : 0) + offset;
+ return (i - 1) + (j != 0u ? order[0] - 1 + order[1] - 1 : 0) +
+ offset;
}
if (!jbdy)
{ // On j axis
return (j - 1) +
- (i ? order[0] - 1 : 2 * (order[0] - 1) + order[1] - 1) +
+ (i != 0u ? order[0] - 1 :
+ 2 * (order[0] - 1) + order[1] - 1) +
offset;
}
}
if (nbdy == 3) // Vertex DOF
{ // ijk is a corner node. Return the proper index (somewhere in [0,7]):
- return (i ? (j ? 2 : 1) : (j ? 3 : 0)) + (k ? 4 : 0);
+ return (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0)) +
+ (k != 0u ? 4 : 0);
}
int offset = 8;
{
if (!ibdy)
{ // On i axis
- return (i - 1) + (j ? order[0] - 1 + order[1] - 1 : 0) +
- (k ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
+ return (i - 1) + (j != 0u ? order[0] - 1 + order[1] - 1 : 0) +
+ (k != 0u ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
}
if (!jbdy)
{ // On j axis
return (j - 1) +
- (i ? order[0] - 1 : 2 * (order[0] - 1) + order[1] - 1) +
- (k ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
+ (i != 0u ? order[0] - 1 :
+ 2 * (order[0] - 1) + order[1] - 1) +
+ (k != 0u ? 2 * (order[0] - 1 + order[1] - 1) : 0) + offset;
}
// !kbdy, On k axis
offset += 4 * (order[0] - 1) + 4 * (order[1] - 1);
- return (k - 1) + (order[2] - 1) * (i ? (j ? 3 : 1) : (j ? 2 : 0)) +
+ return (k - 1) +
+ (order[2] - 1) *
+ (i != 0u ? (j != 0u ? 3 : 1) : (j != 0u ? 2 : 0)) +
offset;
}
if (ibdy) // On i-normal face
{
return (j - 1) + ((order[1] - 1) * (k - 1)) +
- (i ? (order[1] - 1) * (order[2] - 1) : 0) + offset;
+ (i != 0u ? (order[1] - 1) * (order[2] - 1) : 0) + offset;
}
offset += 2 * (order[1] - 1) * (order[2] - 1);
if (jbdy) // On j-normal face
{
return (i - 1) + ((order[0] - 1) * (k - 1)) +
- (j ? (order[2] - 1) * (order[0] - 1) : 0) + offset;
+ (j != 0u ? (order[2] - 1) * (order[0] - 1) : 0) + offset;
}
offset += 2 * (order[2] - 1) * (order[0] - 1);
// kbdy, On k-normal face
return (i - 1) + ((order[0] - 1) * (j - 1)) +
- (k ? (order[0] - 1) * (order[1] - 1) : 0) + offset;
+ (k != 0u ? (order[0] - 1) * (order[1] - 1) : 0) + offset;
}
// nbdy == 0: Body DOF
#ifdef DEAL_II_WITH_MPI
int is_initialized;
MPI_Initialized(&is_initialized);
- if (is_initialized)
+ if (is_initialized != 0)
{
// do the same as in Utilities::MPI::n_mpi_processes() here,
// but without error checking to not throw again.
ranges.clear();
set_size(size);
ranges.resize(n_ranges, Range(0, 0));
- if (n_ranges)
+ if (n_ranges != 0u)
in.read(reinterpret_cast<char *>(&*ranges.begin()),
ranges.size() * sizeof(Range));
// (note that we can't issue an assertion here either since Assert
// may want to write to 'deallog' itself, and AssertThrow will
// throw an exception that can't be caught)
- if ((this == &deallog) && file)
+ if ((this == &deallog) && (file != nullptr))
*std_out << ("You still have content that was written to 'deallog' "
"but not flushed to the screen or a file while the "
"program is being terminated. This would lead to a "
if (get_prefixes().size() <= std_depth)
*std_out << stream.str();
- if (file && (get_prefixes().size() <= file_depth))
+ if ((file != nullptr) && (get_prefixes().size() <= file_depth))
*file << stream.str() << std::flush;
// Start a new string:
*std_out << head << ':';
}
- if (file && (get_prefixes().size() <= file_depth))
+ if ((file != nullptr) && (get_prefixes().size() <= file_depth))
{
if (print_thread_id)
*file << '[' << thread << ']';
int ierr =
MPI_Op_create(reinterpret_cast<MPI_User_function *>(&max_reduce),
- true,
+ static_cast<int>(true),
&op);
AssertThrowMPI(ierr);
double
mu_if(double condition, double thenvalue, double elsevalue)
{
- if (mu_round(condition))
+ if (mu_round(condition) != 0)
return thenvalue;
else
return elsevalue;
double
mu_or(double left, double right)
{
- return (mu_round(left)) || (mu_round(right));
+ return static_cast<double>((mu_round(left) != 0) ||
+ (mu_round(right) != 0));
}
double
mu_and(double left, double right)
{
- return (mu_round(left)) && (mu_round(right));
+ return static_cast<double>((mu_round(left) != 0) &&
+ (mu_round(right) != 0));
}
double
boost::property_tree::ptree current_entries = *entries.get();
// Sort parameters alphabetically, if needed.
- if (!(style & KeepDeclarationOrder))
+ if ((style & KeepDeclarationOrder) == 0)
{
// Dive recursively into the subsections,
// starting from the top level.
// first
// explicitly compress the tree if requested
- if ((style & Short) && (style & (XML | JSON)))
+ if (((style & Short) != 0) && ((style & (XML | JSON)) != 0))
{
// modify the copy of the tree
recursively_compress_tree(current_entries);
}
- if (style & XML)
+ if ((style & XML) != 0)
{
// call the writer function and exit as there is nothing
// further to do down in this function
return out;
}
- if (style & JSON)
+ if ((style & JSON) != 0)
{
write_json(out, current_entries);
return out;
}
// for all of the other formats, print a preamble:
- if ((style & Short) && (style & Text))
+ if (((style & Short) != 0) && ((style & Text) != 0))
{
// nothing to do
}
- else if (style & Text)
+ else if ((style & Text) != 0)
{
out << "# Listing of Parameters" << std::endl
<< "# ---------------------" << std::endl;
}
- else if (style & LaTeX)
+ else if ((style & LaTeX) != 0)
{
out << "\\subsection{Global parameters}" << std::endl;
out << "\\label{parameters:global}" << std::endl;
out << std::endl << std::endl;
}
- else if (style & Description)
+ else if ((style & Description) != 0)
{
out << "Listing of Parameters:" << std::endl << std::endl;
}
unsigned int overall_indent_level = indent_level;
- const bool is_short = style & Short;
+ const bool is_short = (style & Short) != 0;
- if (style & Text)
+ if ((style & Text) != 0)
{
// first find out the longest entry name to be able to align the
// equal signs to do this loop over all nodes of the current
out << '\n';
}
}
- else if (style & LaTeX)
+ else if ((style & LaTeX) != 0)
{
auto escape = [](const std::string &input) {
return Patterns::internal::escape(input, Patterns::PatternBase::LaTeX);
out << "\\end{itemize}" << '\n';
}
}
- else if (style & Description)
+ else if ((style & Description) != 0)
{
// first find out the longest entry name to be able to align the
// equal signs
else if (is_alias_node(p.second) == false)
++n_sections;
- if (!(style & Description) && (!((style & Text) && is_short)) &&
- (n_parameters != 0) && (n_sections != 0))
+ if (((style & Description) == 0) &&
+ (!(((style & Text) != 0) && is_short)) && (n_parameters != 0) &&
+ (n_sections != 0))
out << "\n\n";
}
(is_alias_node(p.second) == false))
{
// first print the subsection header
- if ((style & Text) || (style & Description))
+ if (((style & Text) != 0) || ((style & Description) != 0))
{
out << std::setw(overall_indent_level * 2) << ""
<< "subsection " << demangle(p.first) << '\n';
}
- else if (style & LaTeX)
+ else if ((style & LaTeX) != 0)
{
auto escape = [](const std::string &input) {
return Patterns::internal::escape(input,
recursively_print_parameters(
tree, directory_path, style, overall_indent_level + 1, out);
- if (is_short && (style & Text))
+ if (is_short && ((style & Text) != 0))
{
// write end of subsection.
out << std::setw(overall_indent_level * 2) << ""
<< "end" << '\n';
}
- else if (style & Text)
+ else if ((style & Text) != 0)
{
// write end of subsection. one blank line after each
// subsection
if (overall_indent_level == 0)
out << '\n';
}
- else if (style & Description)
+ else if ((style & Description) != 0)
{
// nothing to do
}
- else if (style & LaTeX)
+ else if ((style & LaTeX) != 0)
{
// nothing to do
}
boost::property_tree::ptree *current_entries = entries.get();
// Sort parameters alphabetically, if needed.
- if (!(style & KeepDeclarationOrder))
+ if ((style & KeepDeclarationOrder) == 0)
{
sorted_entries = *entries;
current_entries = &sorted_entries;
Utilities::match_at_string_start(line, "end"))
{
line.erase(0, 3);
- while ((line.size() > 0) && (std::isspace(line[0])))
+ while ((line.size() > 0) && ((std::isspace(line[0])) != 0))
line.erase(0, 1);
AssertThrow(
multiple.erase(multiple.size() - 1, 1);
// erase leading and trailing spaces
// in multiple
- while (std::isspace(multiple[0]))
+ while (std::isspace(multiple[0]) != 0)
multiple.erase(0, 1);
- while (std::isspace(multiple[multiple.size() - 1]))
+ while (std::isspace(multiple[multiple.size() - 1]) != 0)
multiple.erase(multiple.size() - 1, 1);
// delete spaces around '|'
std::string tmp(sequence);
// remove whitespace at beginning
- while ((tmp.length() != 0) && (std::isspace(tmp[0])))
+ while ((tmp.length() != 0) && ((std::isspace(tmp[0])) != 0))
tmp.erase(0, 1);
// check the different possibilities
}
// remove whitespace at the end
- while ((tmp.length() != 0) && (std::isspace(*(tmp.end() - 1))))
+ while ((tmp.length() != 0) && ((std::isspace(*(tmp.end() - 1))) != 0))
tmp.erase(tmp.end() - 1);
// check last choice, not finished by |
else
tmp = "";
- while ((name.length() != 0) && (std::isspace(name[0])))
+ while ((name.length() != 0) && ((std::isspace(name[0])) != 0))
name.erase(0, 1);
- while (std::isspace(name[name.length() - 1]))
+ while (std::isspace(name[name.length() - 1]) != 0)
name.erase(name.length() - 1, 1);
split_names.push_back(name);
reference_cell == ReferenceCells::Tetrahedron)
{
if (dim == 2)
- return {(2 * face_no + face_orientation) * n_quadrature_points};
+ return {(2 * face_no + (face_orientation ? 1 : 0)) *
+ n_quadrature_points};
else if (dim == 3)
{
- const unsigned int orientation =
- (face_flip * 2 + face_rotation) * 2 + face_orientation;
+ const unsigned int orientation = (face_flip ? 4 : 0) +
+ (face_rotation ? 2 : 0) +
+ (face_orientation ? 1 : 0);
return {(6 * face_no + orientation) * n_quadrature_points};
}
}
quadrature[quadrature.size() == 1 ? 0 : face_no].size()};
else if (dim == 3)
{
- const unsigned int orientation =
- (face_flip * 2 + face_rotation) * 2 + face_orientation;
+ const unsigned int orientation = (face_flip ? 4 : 0) +
+ (face_rotation ? 2 : 0) +
+ (face_orientation ? 1 : 0);
return {offset +
orientation *
{
Assert(columns.count(key), ExcColumnNotExistent(key));
- if (!supercolumns.count(superkey))
+ if (supercolumns.count(superkey) == 0u)
{
std::pair<std::string, std::vector<std::string>> new_column(
superkey, std::vector<std::string>());
column_order.erase(order_iter);
}
- if (supercolumns.count(superkey))
+ if (supercolumns.count(superkey) != 0u)
{
supercolumns[superkey].push_back(key);
// By default set the
for (; left < input.size(); ++left)
{
- if (!std::isspace(input[left]))
+ if (std::isspace(input[left]) == 0)
{
break;
}
for (; right >= left; --right)
{
- if (!std::isspace(input[right]))
+ if (std::isspace(input[right]) == 0)
{
break;
}
settings = construction_data.settings;
// set the smoothing properties
- if (settings &
- TriangulationDescription::Settings::construct_multigrid_hierarchy)
+ if ((settings &
+ TriangulationDescription::Settings::construct_multigrid_hierarchy) !=
+ 0)
this->set_mesh_smoothing(
static_cast<
typename dealii::Triangulation<dim, spacedim>::MeshSmoothing>(
cell->set_subdomain_id(cell_info->subdomain_id);
// level subdomain id
- if (settings & TriangulationDescription::Settings::
- construct_multigrid_hierarchy)
+ if ((settings & TriangulationDescription::Settings::
+ construct_multigrid_hierarchy) != 0)
cell->set_level_subdomain_id(cell_info->level_subdomain_id);
}
}
bool
Triangulation<dim, spacedim>::is_multilevel_hierarchy_constructed() const
{
- return (
- settings &
- TriangulationDescription::Settings::construct_multigrid_hierarchy);
+ return (settings & TriangulationDescription::Settings::
+ construct_multigrid_hierarchy) != 0;
}
// if there are no more cells in our list the current cell can't be
// flagged for refinement
if (this_object->current_refine_pointer == this_object->refine_list.end())
- return false;
+ return 0;
Assert(coarse_cell_index <=
this_object->current_refine_pointer->p.which_tree,
// if p4est hasn't yet reached the tree of the next flagged cell the
// current cell can't be flagged for refinement
if (coarse_cell_index < this_object->current_refine_pointer->p.which_tree)
- return false;
+ return 0;
// now we're in the right tree in the forest
Assert(coarse_cell_index <=
quadrant, &*this_object->current_refine_pointer))
{
++this_object->current_refine_pointer;
- return true;
+ return 1;
}
// p4est cell is not in list
- return false;
+ return 0;
}
// if there are no more cells in our list the current cell can't be
// flagged for coarsening
if (this_object->current_coarsen_pointer == this_object->coarsen_list.end())
- return false;
+ return 0;
Assert(coarse_cell_index <=
this_object->current_coarsen_pointer->p.which_tree,
// if p4est hasn't yet reached the tree of the next flagged cell the
// current cell can't be flagged for coarsening
if (coarse_cell_index < this_object->current_coarsen_pointer->p.which_tree)
- return false;
+ return 0;
// now we're in the right tree in the forest
Assert(coarse_cell_index <=
++this_object->current_coarsen_pointer;
}
- return true;
+ return 1;
}
// p4est cell is not in list
- return false;
+ return 0;
}
// then get the number of this vertex on the cell and translate
// this to a DoF number on the cell
- return (this->reference_cell().face_to_cell_vertices(face,
- face_vertex,
- face_orientation +
- 2 * face_rotation +
- 4 * face_flip) *
+ return (this->reference_cell().face_to_cell_vertices(
+ face,
+ face_vertex,
+ (face_orientation ? 1 : 0) + (face_rotation ? 2 : 0) +
+ (face_flip ? 4 : 0)) *
this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
const unsigned int face_line = index / this->n_dofs_per_line();
const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
- return (this->get_first_line_index() +
- this->reference_cell().face_to_cell_lines(face,
- face_line,
- face_orientation +
- 2 * face_rotation +
- 4 * face_flip) *
- this->n_dofs_per_line() +
- dof_index_on_line);
+ return (
+ this->get_first_line_index() +
+ this->reference_cell().face_to_cell_lines(face,
+ face_line,
+ (face_orientation ? 1 : 0) +
+ (face_rotation ? 2 : 0) +
+ (face_flip ? 4 : 0)) *
+ this->n_dofs_per_line() +
+ dof_index_on_line);
}
else
// DoF is on a quad
ExcInternalError());
return index +
adjust_quad_dof_index_for_face_orientation_table
- [this->n_unique_quads() == 1 ? 0 : face](
- index, 4 * face_orientation + 2 * face_flip + face_rotation);
+ [this->n_unique_quads() == 1 ? 0 : face](index,
+ (face_orientation ? 4 : 0) +
+ (face_flip ? 2 : 0) +
+ (face_rotation ? 1 : 0));
}
{
UpdateFlags out = flags;
- if (flags & (update_values | update_gradients | update_hessians))
+ if ((flags & (update_values | update_gradients | update_hessians)) != 0u)
out |= update_quadrature_points;
return out;
if (is_enriched)
{
// if we ask for values or gradients, then we would need quadrature points
- if (flags & (update_values | update_gradients))
+ if ((flags & (update_values | update_gradients)) != 0u)
out |= update_quadrature_points;
// if need gradients, add update_values due to product rule
- if (out & update_gradients)
+ if ((out & update_gradients) != 0u)
out |= update_values;
}
FE_FaceQ<1, spacedim>::requires_update_flags(const UpdateFlags flags) const
{
UpdateFlags out = flags & update_values;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_covariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_covariant_transformation;
- if (flags & update_normal_vectors)
+ if ((flags & update_normal_vectors) != 0u)
out |= update_normal_vectors | update_JxW_values;
return out;
for (unsigned int k = 0; k < face_quadrature.size(); ++k)
{
const Point<dim - 1> p =
- numbers::invalid_unsigned_int ?
+ numbers::invalid_unsigned_int != 0u ?
face_quadrature.point(k) :
GeometryInfo<dim - 1>::child_to_cell_coordinates(
face_quadrature.point(k), subface);
vertices_per_cell, std::vector<double>(dim)));
// Resize shape function arrays according to update flags:
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
data.shape_values.resize(this->n_dofs_per_cell(),
std::vector<Tensor<1, dim>>(n_q_points));
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
data.shape_grads.resize(this->n_dofs_per_cell(),
std::vector<DerivativeForm<1, dim, dim>>(
n_q_points));
}
// Not implementing second derivatives yet:
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
{
Assert(false, ExcNotImplemented());
}
cell_type2_offset + degree * degree;
const unsigned int cell_type3_offset2 = cell_type3_offset1 + degree;
- if (flags & (update_values | update_gradients))
+ if ((flags & (update_values | update_gradients)) != 0u)
{
// compute all points we must evaluate the 1d polynomials at:
std::vector<Point<dim>> cell_points(n_q_points);
// Note that this will need to be updated if we're supporting
// update_hessians.
const unsigned int poly_length(
- (flags & update_gradients) ? 3 : 2);
+ (flags & update_gradients) != 0u ? 3 : 2);
std::vector<std::vector<double>> polyx(
degree, std::vector<double>(poly_length));
cell_points[q][1], polyy[i]);
}
// Now use these to compute the shape functions:
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
for (unsigned int j = 0; j < degree; ++j)
{
data.shape_values[dof_index3_2][q][1] = polyx[j][0];
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
for (unsigned int j = 0; j < degree; ++j)
{
// for cell-based shape functions:
// these don't depend on the cell, so can precompute all here:
- if (flags & (update_values | update_gradients))
+ if ((flags & (update_values | update_gradients)) != 0u)
{
// Cell-based shape functions:
//
// only need poly values and 1st derivative for update_values,
// but need 2nd derivative too for update_gradients.
const unsigned int poly_length(
- (flags & update_gradients) ? 3 : 2);
+ (flags & update_gradients) != 0u ? 3 : 2);
// Loop through quad points:
for (unsigned int q = 0; q < n_q_points; ++q)
{
cell_points[q][2], polyz[i]);
}
// Now use these to compute the shape functions:
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
for (unsigned int k = 0; k < degree; ++k)
{
}
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
for (unsigned int k = 0; k < degree; ++k)
{
{
case 2:
{
- if (flags & (update_values | update_gradients))
+ if ((flags & (update_values | update_gradients)) != 0u)
{
// Define an edge numbering so that each edge, E_{m} = [e^{m}_{1},
// e^{m}_{2}] e1 = higher global numbering of the two local
// If we want to generate shape gradients then we need second
// derivatives of the 1d polynomials, but only first derivatives
// for the shape values.
- const unsigned int poly_length((flags & update_gradients) ? 3 :
- 2);
+ const unsigned int poly_length(
+ (flags & update_gradients) != 0u ? 3 : 2);
for (unsigned int m = 0; m < lines_per_cell; ++m)
{
IntegratedLegendrePolynomials[i + 1].value(
edge_sigma_values[m][q], poly[i - 1]);
}
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
// Lowest order edge shape functions:
for (unsigned int d = 0; d < dim; ++d)
}
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
// Lowest order edge shape functions:
for (unsigned int d1 = 0; d1 < dim; ++d1)
}
case 3:
{
- if (flags & (update_values | update_gradients))
+ if ((flags & (update_values | update_gradients)) != 0u)
{
// Define an edge numbering so that each edge, E_{m} = [e^{m}_{1},
// e^{m}_{2}] e1 = higher global numbering of the two local
// If we want to generate shape gradients then we need second
// derivatives of the 1d polynomials, but only first derivatives
// for the shape values.
- const unsigned int poly_length((flags & update_gradients) ? 3 :
- 2);
+ const unsigned int poly_length(
+ (flags & update_gradients) != 0u ? 3 : 2);
std::vector<std::vector<double>> poly(
degree, std::vector<double>(poly_length));
for (unsigned int m = 0; m < lines_per_cell; ++m)
edge_sigma_values[m][q], poly[i]);
}
}
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
// Lowest order shape functions:
for (unsigned int d = 0; d < dim; ++d)
}
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
// Lowest order shape functions:
for (unsigned int d1 = 0; d1 < dim; ++d1)
{
const UpdateFlags flags(fe_data.update_each);
- if (flags & (update_values | update_gradients))
+ if ((flags & (update_values | update_gradients)) != 0u)
{
const unsigned int n_q_points = quadrature.size();
}
}
// Now can generate the basis
- const unsigned int poly_length((flags & update_gradients) ? 3 : 2);
+ const unsigned int poly_length((flags & update_gradients) != 0u ? 3 :
+ 2);
std::vector<std::vector<double>> polyxi(
degree, std::vector<double>(poly_length));
std::vector<std::vector<double>> polyeta(
face_eta_values[m][q], polyeta[i]);
}
// Now use these to compute the shape functions:
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
for (unsigned int j = 0; j < degree; ++j)
{
}
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
for (unsigned int j = 0; j < degree; ++j)
{
}
}
}
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
{
Assert(false, ExcNotImplemented());
}
fe_data.shape_values[0].size() == n_q_points,
ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
// Now have all shape_values stored on the reference cell.
// Must now transform to the physical cell.
}
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
// Now have all shape_grads stored on the reference cell.
// Must now transform to the physical cell.
cell->face_rotation(face_no),
n_q_points);
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
// Now have all shape_values stored on the reference cell.
// Must now transform to the physical cell.
}
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
// Now have all shape_grads stored on the reference cell.
// Must now transform to the physical cell.
{
UpdateFlags out = update_default;
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values | update_covariant_transformation;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_values |
update_jacobian_pushed_forward_grads |
update_covariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
// Assert (false, ExcNotImplemented());
out |= update_hessians | update_values | update_gradients |
update_jacobian_pushed_forward_grads |
{
UpdateFlags out = update_default;
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values | update_quadrature_points;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients;
- if (flags & update_normal_vectors)
+ if ((flags & update_normal_vectors) != 0u)
out |= update_normal_vectors | update_JxW_values;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians;
return out;
output_data.initialize(n_q_points, FE_P1NC(), data_ptr->update_each);
// this is a linear element, so its second derivatives are zero
- if (data_ptr->update_each & update_hessians)
+ if ((data_ptr->update_each & update_hessians) != 0u)
output_data.shape_hessians.fill(Tensor<2, 2>());
return data_ptr;
output_data.initialize(n_q_points, FE_P1NC(), data_ptr->update_each);
// this is a linear element, so its second derivatives are zero
- if (data_ptr->update_each & update_hessians)
+ if ((data_ptr->update_each & update_hessians) != 0u)
output_data.shape_hessians.fill(Tensor<2, 2>());
return data_ptr;
output_data.initialize(n_q_points, FE_P1NC(), data_ptr->update_each);
// this is a linear element, so its second derivatives are zero
- if (data_ptr->update_each & update_hessians)
+ if ((data_ptr->update_each & update_hessians) != 0u)
output_data.shape_hessians.fill(Tensor<2, 2>());
return data_ptr;
ndarray<double, 4, 3> coeffs = get_linear_shape_coefficients(cell);
// compute on the cell
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
for (unsigned int i = 0; i < n_q_points; ++i)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values[k][i] =
(coeffs[k][0] * mapping_data.quadrature_points[i](0) +
coeffs[k][1] * mapping_data.quadrature_points[i](1) + coeffs[k][2]);
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
for (unsigned int i = 0; i < n_q_points; ++i)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] =
quadrature[0],
face_no);
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
{
coeffs[k][1] * quadrature_point(1) + coeffs[k][2]);
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] =
const Quadrature<2> quadrature_on_subface = QProjector<2>::project_to_subface(
this->reference_cell(), quadrature, face_no, sub_no);
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
{
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
}
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] =
ExcInternalError());
return adjust_quad_dof_sign_for_face_orientation_table
- [this->n_unique_quads() == 1 ? 0 : face](index,
- 4 * face_orientation +
- 2 * face_flip + face_rotation);
+ [this->n_unique_quads() == 1 ? 0 : face](
+ index,
+ 4 * static_cast<int>(face_orientation) + 2 * static_cast<int>(face_flip) +
+ static_cast<int>(face_rotation));
}
{
case mapping_none:
{
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_values |
update_jacobian_pushed_forward_grads;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_values | update_gradients |
update_jacobian_pushed_forward_grads |
update_jacobian_pushed_forward_2nd_derivatives;
case mapping_raviart_thomas:
case mapping_piola:
{
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values | update_piola;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_values | update_piola |
update_jacobian_pushed_forward_grads |
update_covariant_transformation |
update_contravariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_piola | update_values |
update_gradients | update_jacobian_pushed_forward_grads |
update_jacobian_pushed_forward_2nd_derivatives |
case mapping_contravariant:
{
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values | update_piola;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_values |
update_jacobian_pushed_forward_grads |
update_covariant_transformation |
update_contravariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_piola | update_values |
update_gradients | update_jacobian_pushed_forward_grads |
update_jacobian_pushed_forward_2nd_derivatives |
case mapping_nedelec:
case mapping_covariant:
{
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
out |= update_values | update_covariant_transformation;
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
out |= update_gradients | update_values |
update_jacobian_pushed_forward_grads |
update_covariant_transformation;
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
out |= update_hessians | update_values | update_gradients |
update_jacobian_pushed_forward_grads |
update_jacobian_pushed_forward_2nd_derivatives |
factorial_ij *= j - i;
factorial_j *= j;
- if ((i + j) & 1)
+ if (((i + j) & 1) != 0u)
interpolation_matrix(i, j) =
-1.0 * std::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
factorial_kl *= k - j;
factorial_l *= k;
- if ((j + k) & 1)
+ if (((j + k) & 1) != 0u)
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
factorial_ij *= j - i;
factorial_j *= j;
- if ((i + j) & 1)
+ if (((i + j) & 1) != 0u)
{
tmp = -1.0 * std::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
factorial_kl *= l - k;
factorial_l *= l;
- if ((k + l) & 1)
+ if (((k + l) & 1) != 0u)
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
factorial_kl *= l - k;
factorial_l *= l;
- if ((k + l) & 1)
+ if (((k + l) & 1) != 0u)
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
factorial_kl *= l - k;
factorial_l *= l;
- if ((k + l) & 1)
+ if (((k + l) & 1) != 0u)
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
interpolation_matrix(i + 3 * source_fe.degree - 1,
j + 3 * this->degree - 1) = tmp;
- if ((i + j) & 1)
+ if (((i + j) & 1) != 0u)
tmp *= -1.0;
interpolation_matrix(i + 2, j + 2) = tmp;
factorial_kl *= k - j;
factorial_l *= k;
- if ((j + k) & 1)
+ if (((j + k) & 1) != 0u)
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
interpolation_matrix(i + source_fe.degree + 1,
j + this->degree + 1) = tmp;
- if ((i + j) & 1)
+ if (((i + j) & 1) != 0u)
tmp *= -1.0;
interpolation_matrix(i + 2 * source_fe.degree,
&fe2,
n2),
FETools::Compositing::compute_nonzero_components(&fe1, n1, &fe2, n2))
- , base_elements((n1 > 0) + (n2 > 0))
+ , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0))
{
std::vector<const FiniteElement<dim, spacedim> *> fes;
fes.push_back(&fe1);
n2,
&fe3,
n3))
- , base_elements((n1 > 0) + (n2 > 0) + (n3 > 0))
+ , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
+ static_cast<int>(n3 > 0))
{
std::vector<const FiniteElement<dim, spacedim> *> fes;
fes.push_back(&fe1);
n3,
&fe4,
n4))
- , base_elements((n1 > 0) + (n2 > 0) + (n3 > 0) + (n4 > 0))
+ , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
+ static_cast<int>(n3 > 0) + static_cast<int>(n4 > 0))
{
std::vector<const FiniteElement<dim, spacedim> *> fes;
fes.push_back(&fe1);
n4,
&fe5,
n5))
- , base_elements((n1 > 0) + (n2 > 0) + (n3 > 0) + (n4 > 0) + (n5 > 0))
+ , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
+ static_cast<int>(n3 > 0) + static_cast<int>(n4 > 0) +
+ static_cast<int>(n5 > 0))
{
std::vector<const FiniteElement<dim, spacedim> *> fes;
fes.push_back(&fe1);
const unsigned int n_quadrature_points,
const UpdateFlags flags)
{
- if (flags & update_quadrature_points)
+ if ((flags & update_quadrature_points) != 0u)
this->quadrature_points.resize(
n_quadrature_points,
Point<spacedim>(numbers::signaling_nan<Tensor<1, spacedim>>()));
- if (flags & update_JxW_values)
+ if ((flags & update_JxW_values) != 0u)
this->JxW_values.resize(n_quadrature_points,
numbers::signaling_nan<double>());
- if (flags & update_jacobians)
+ if ((flags & update_jacobians) != 0u)
this->jacobians.resize(
n_quadrature_points,
numbers::signaling_nan<DerivativeForm<1, dim, spacedim>>());
- if (flags & update_jacobian_grads)
+ if ((flags & update_jacobian_grads) != 0u)
this->jacobian_grads.resize(
n_quadrature_points,
numbers::signaling_nan<DerivativeForm<2, dim, spacedim>>());
- if (flags & update_jacobian_pushed_forward_grads)
+ if ((flags & update_jacobian_pushed_forward_grads) != 0u)
this->jacobian_pushed_forward_grads.resize(
n_quadrature_points, numbers::signaling_nan<Tensor<3, spacedim>>());
- if (flags & update_jacobian_2nd_derivatives)
+ if ((flags & update_jacobian_2nd_derivatives) != 0u)
this->jacobian_2nd_derivatives.resize(
n_quadrature_points,
numbers::signaling_nan<DerivativeForm<3, dim, spacedim>>());
- if (flags & update_jacobian_pushed_forward_2nd_derivatives)
+ if ((flags & update_jacobian_pushed_forward_2nd_derivatives) != 0u)
this->jacobian_pushed_forward_2nd_derivatives.resize(
n_quadrature_points, numbers::signaling_nan<Tensor<4, spacedim>>());
- if (flags & update_jacobian_3rd_derivatives)
+ if ((flags & update_jacobian_3rd_derivatives) != 0u)
this->jacobian_3rd_derivatives.resize(n_quadrature_points);
- if (flags & update_jacobian_pushed_forward_3rd_derivatives)
+ if ((flags & update_jacobian_pushed_forward_3rd_derivatives) != 0u)
this->jacobian_pushed_forward_3rd_derivatives.resize(
n_quadrature_points, numbers::signaling_nan<Tensor<5, spacedim>>());
- if (flags & update_inverse_jacobians)
+ if ((flags & update_inverse_jacobians) != 0u)
this->inverse_jacobians.resize(
n_quadrature_points,
numbers::signaling_nan<DerivativeForm<1, spacedim, dim>>());
- if (flags & update_boundary_forms)
+ if ((flags & update_boundary_forms) != 0u)
this->boundary_forms.resize(
n_quadrature_points, numbers::signaling_nan<Tensor<1, spacedim>>());
- if (flags & update_normal_vectors)
+ if ((flags & update_normal_vectors) != 0u)
this->normal_vectors.resize(
n_quadrature_points, numbers::signaling_nan<Tensor<1, spacedim>>());
}
// with the number of rows now known, initialize those fields
// that we will need to their correct size
- if (flags & update_values)
+ if ((flags & update_values) != 0u)
{
this->shape_values.reinit(n_nonzero_shape_components,
n_quadrature_points);
this->shape_values.fill(numbers::signaling_nan<double>());
}
- if (flags & update_gradients)
+ if ((flags & update_gradients) != 0u)
{
this->shape_gradients.reinit(n_nonzero_shape_components,
n_quadrature_points);
numbers::signaling_nan<Tensor<1, spacedim>>());
}
- if (flags & update_hessians)
+ if ((flags & update_hessians) != 0u)
{
this->shape_hessians.reinit(n_nonzero_shape_components,
n_quadrature_points);
numbers::signaling_nan<Tensor<2, spacedim>>());
}
- if (flags & update_3rd_derivatives)
+ if ((flags & update_3rd_derivatives) != 0u)
{
this->shape_3rd_derivatives.reinit(n_nonzero_shape_components,
n_quadrature_points);
const UpdateFlags flags = this->compute_update_flags(update_flags);
// initialize the base classes
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
this->mapping_output.initialize(this->max_n_quadrature_points, flags);
this->finite_element_output.initialize(this->max_n_quadrature_points,
*this->fe,
Threads::Task<
std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
mapping_get_data;
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
mapping_get_data = Threads::new_task(
[&]() { return this->mapping->get_data(flags, quadrature); });
// then collect answers from the two task above
this->fe_data = std::move(fe_get_data.return_value());
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
this->mapping_data = std::move(mapping_get_data.return_value());
else
this->mapping_data =
const UpdateFlags flags = this->compute_update_flags(update_flags);
// initialize the base classes
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
this->mapping_output.initialize(this->max_n_quadrature_points, flags);
this->finite_element_output.initialize(this->max_n_quadrature_points,
*this->fe,
Threads::Task<
std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
mapping_get_data;
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
mapping_get_data = Threads::new_task(mapping_get_face_data,
*this->mapping,
flags,
// then collect answers from the two task above
this->fe_data = std::move(fe_get_data.return_value());
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
this->mapping_data = std::move(mapping_get_data.return_value());
else
this->mapping_data =
const UpdateFlags flags = this->compute_update_flags(update_flags);
// initialize the base classes
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
this->mapping_output.initialize(this->max_n_quadrature_points, flags);
this->finite_element_output.initialize(this->max_n_quadrature_points,
*this->fe,
Threads::Task<
std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
mapping_get_data;
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
mapping_get_data =
Threads::new_task(&Mapping<dim, spacedim>::get_subface_data,
*this->mapping,
// then collect answers from the two task above
this->fe_data = std::move(fe_get_data.return_value());
- if (flags & update_mapping)
+ if ((flags & update_mapping) != 0u)
this->mapping_data = std::move(mapping_get_data.return_value());
else
this->mapping_data =
// since they can be computed from the normal vectors without much
// further ado
UpdateFlags out = in;
- if (out & update_boundary_forms)
+ if ((out & update_boundary_forms) != 0u)
out |= update_normal_vectors;
return out;
// update_boundary_forms is simply
// ignored for the interior of a
// cell.
- if (out & (update_JxW_values | update_normal_vectors))
+ if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
out |= update_boundary_forms;
- if (out & (update_covariant_transformation | update_JxW_values |
- update_jacobians | update_jacobian_grads |
- update_boundary_forms | update_normal_vectors))
+ if ((out & (update_covariant_transformation | update_JxW_values |
+ update_jacobians | update_jacobian_grads |
+ update_boundary_forms | update_normal_vectors)) != 0u)
out |= update_contravariant_transformation;
- if (out &
- (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
- update_jacobian_pushed_forward_2nd_derivatives |
- update_jacobian_pushed_forward_3rd_derivatives))
+ if ((out &
+ (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+ update_jacobian_pushed_forward_2nd_derivatives |
+ update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
out |= update_covariant_transformation;
// The contravariant transformation is used in the Piola
// knowing here whether the finite element wants to use the
// contravariant or the Piola transforms, we add the JxW values
// to the list of flags to be updated for each cell.
- if (out & update_contravariant_transformation)
+ if ((out & update_contravariant_transformation) != 0u)
out |= update_volume_elements;
// the same is true when computing normal vectors: they require
// the determinant of the Jacobian
- if (out & update_normal_vectors)
+ if ((out & update_normal_vectors) != 0u)
out |= update_volume_elements;
}
// Multiply quadrature weights by absolute value of Jacobian determinants or
// the area element g=sqrt(DX^t DX) in case of codim > 0
- if (update_flags & (update_normal_vectors | update_JxW_values))
+ if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
{
AssertDimension(output_data.JxW_values.size(), n_q_points);
CellSimilarity::inverted_translation)
{
// we only need to flip the normal
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
output_data.normal_vectors[point] *= -1.;
}
else
{
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
{
Assert(spacedim == dim + 1,
ExcMessage(
// copy values from InternalData to vector given by reference
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
{
AssertDimension(output_data.jacobians.size(), n_q_points);
if (computed_cell_similarity != CellSimilarity::translation)
}
// copy values from InternalData to vector given by reference
- if (update_flags & update_inverse_jacobians)
+ if ((update_flags & update_inverse_jacobians) != 0u)
{
AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
if (computed_cell_similarity != CellSimilarity::translation)
, uses_level_dofs(false)
, euler_vector({&euler_vector})
, euler_dof_handler(&euler_dof_handler)
- , fe_mask(mask.size() ?
+ , fe_mask(mask.size() != 0u ?
mask :
ComponentMask(
euler_dof_handler.get_fe().get_nonzero_components(0).size(),
: reference_cell(euler_dof_handler.get_fe().reference_cell())
, uses_level_dofs(true)
, euler_dof_handler(&euler_dof_handler)
- , fe_mask(mask.size() ?
+ , fe_mask(mask.size() != 0u ?
mask :
ComponentMask(
euler_dof_handler.get_fe().get_nonzero_components(0).size(),
: reference_cell(euler_dof_handler.get_fe().reference_cell())
, uses_level_dofs(true)
, euler_dof_handler(&euler_dof_handler)
- , fe_mask(mask.size() ?
+ , fe_mask(mask.size() != 0u ?
mask :
ComponentMask(
euler_dof_handler.get_fe().get_nonzero_components(0).size(),
// update_boundary_forms is simply
// ignored for the interior of a
// cell.
- if (out & (update_JxW_values | update_normal_vectors))
+ if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
out |= update_boundary_forms;
- if (out & (update_covariant_transformation | update_JxW_values |
- update_jacobians | update_jacobian_grads |
- update_boundary_forms | update_normal_vectors))
+ if ((out & (update_covariant_transformation | update_JxW_values |
+ update_jacobians | update_jacobian_grads |
+ update_boundary_forms | update_normal_vectors)) != 0u)
out |= update_contravariant_transformation;
- if (out &
- (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
- update_jacobian_pushed_forward_2nd_derivatives |
- update_jacobian_pushed_forward_3rd_derivatives))
+ if ((out &
+ (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+ update_jacobian_pushed_forward_2nd_derivatives |
+ update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
out |= update_covariant_transformation;
// The contravariant transformation
// Jacobi matrix of the transformation.
// Therefore these values have to be
// updated for each cell.
- if (out & update_contravariant_transformation)
+ if ((out & update_contravariant_transformation) != 0u)
out |= update_JxW_values;
- if (out & update_normal_vectors)
+ if ((out & update_normal_vectors) != 0u)
out |= update_JxW_values;
}
// Multiply quadrature weights by absolute value of Jacobian determinants or
// the area element g=sqrt(DX^t DX) in case of codim > 0
- if (update_flags & (update_normal_vectors | update_JxW_values))
+ if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
{
AssertDimension(output_data.JxW_values.size(), n_q_points);
output_data.JxW_values[point] =
std::sqrt(determinant(G)) * weights[point];
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
{
Assert(spacedim - dim == 1,
ExcMessage("There is no cell normal in codim 2."));
}
// copy values from InternalData to vector given by reference
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
{
AssertDimension(output_data.jacobians.size(), n_q_points);
for (unsigned int point = 0; point < n_q_points; ++point)
}
// copy values from InternalData to vector given by reference
- if (update_flags & update_inverse_jacobians)
+ if ((update_flags & update_inverse_jacobians) != 0u)
{
AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
for (unsigned int point = 0; point < n_q_points; ++point)
// update_boundary_forms is simply
// ignored for the interior of a
// cell.
- if (out & (update_JxW_values | update_normal_vectors))
+ if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
out |= update_boundary_forms;
- if (out & (update_covariant_transformation | update_JxW_values |
- update_jacobians | update_jacobian_grads |
- update_boundary_forms | update_normal_vectors))
+ if ((out & (update_covariant_transformation | update_JxW_values |
+ update_jacobians | update_jacobian_grads |
+ update_boundary_forms | update_normal_vectors)) != 0u)
out |= update_contravariant_transformation;
- if (out &
- (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
- update_jacobian_pushed_forward_2nd_derivatives |
- update_jacobian_pushed_forward_3rd_derivatives))
+ if ((out &
+ (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+ update_jacobian_pushed_forward_2nd_derivatives |
+ update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
out |= update_covariant_transformation;
// The contravariant transformation used in the Piola
// knowing here whether the finite elements wants to use the
// contravariant of the Piola transforms, we add the JxW values
// to the list of flags to be updated for each cell.
- if (out & update_contravariant_transformation)
+ if ((out & update_contravariant_transformation) != 0u)
out |= update_JxW_values;
- if (out & update_normal_vectors)
+ if ((out & update_normal_vectors) != 0u)
out |= update_JxW_values;
}
// Multiply quadrature weights by absolute value of Jacobian determinants or
// the area element g=sqrt(DX^t DX) in case of codim > 0
- if (update_flags & (update_normal_vectors | update_JxW_values))
+ if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
{
AssertDimension(output_data.JxW_values.size(), n_q_points);
output_data.JxW_values[point] =
std::sqrt(determinant(G)) * weights[point];
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
{
Assert(spacedim == dim + 1,
ExcMessage(
// copy values from InternalData to vector given by reference
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
{
AssertDimension(output_data.jacobians.size(), n_q_points);
for (unsigned int point = 0; point < n_q_points; ++point)
}
// copy values from InternalData to vector given by reference
- if (update_flags & update_inverse_jacobians)
+ if ((update_flags & update_inverse_jacobians) != 0u)
{
AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
for (unsigned int point = 0; point < n_q_points; ++point)
// update_boundary_forms is simply
// ignored for the interior of a
// cell.
- if (out & (update_JxW_values | update_normal_vectors))
+ if ((out & (update_JxW_values | update_normal_vectors)) != 0u)
out |= update_boundary_forms;
- if (out & (update_covariant_transformation | update_JxW_values |
- update_jacobians | update_jacobian_grads |
- update_boundary_forms | update_normal_vectors))
+ if ((out & (update_covariant_transformation | update_JxW_values |
+ update_jacobians | update_jacobian_grads |
+ update_boundary_forms | update_normal_vectors)) != 0u)
out |= update_contravariant_transformation;
- if (out &
- (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
- update_jacobian_pushed_forward_2nd_derivatives |
- update_jacobian_pushed_forward_3rd_derivatives))
+ if ((out &
+ (update_inverse_jacobians | update_jacobian_pushed_forward_grads |
+ update_jacobian_pushed_forward_2nd_derivatives |
+ update_jacobian_pushed_forward_3rd_derivatives)) != 0u)
out |= update_covariant_transformation;
// The contravariant transformation is used in the Piola
// knowing here whether the finite element wants to use the
// contravariant or the Piola transforms, we add the JxW values
// to the list of flags to be updated for each cell.
- if (out & update_contravariant_transformation)
+ if ((out & update_contravariant_transformation) != 0u)
out |= update_volume_elements;
// the same is true when computing normal vectors: they require
// the determinant of the Jacobian
- if (out & update_normal_vectors)
+ if ((out & update_normal_vectors) != 0u)
out |= update_volume_elements;
}
// Multiply quadrature weights by absolute value of Jacobian determinants or
// the area element g=sqrt(DX^t DX) in case of codim > 0
- if (update_flags & (update_normal_vectors | update_JxW_values))
+ if ((update_flags & (update_normal_vectors | update_JxW_values)) != 0u)
{
AssertDimension(output_data.JxW_values.size(), n_q_points);
CellSimilarity::inverted_translation)
{
// we only need to flip the normal
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
output_data.normal_vectors[point] *= -1.;
}
else
{
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
{
Assert(spacedim == dim + 1,
ExcMessage(
// copy values from InternalData to vector given by reference
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
{
AssertDimension(output_data.jacobians.size(), n_q_points);
if (computed_cell_similarity != CellSimilarity::translation)
}
// copy values from InternalData to vector given by reference
- if (update_flags & update_inverse_jacobians)
+ if ((update_flags & update_inverse_jacobians) != 0u)
{
AssertDimension(output_data.inverse_jacobians.size(), n_q_points);
if (computed_cell_similarity != CellSimilarity::translation)
polynomial_degree == 1,
renumber_lexicographic_to_hierarchic);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
for (unsigned int d = 0; d < spacedim; ++d)
output_data.quadrature_points[i + j][d] = result.first[d][j];
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
for (unsigned int d = 0; d < spacedim; ++d)
for (unsigned int e = 0; e < dim; ++e)
output_data.jacobians[i + j][d][e] = result.second[e][d][j];
- if (update_flags & update_inverse_jacobians)
+ if ((update_flags & update_inverse_jacobians) != 0u)
{
DerivativeForm<1, spacedim, dim, VectorizedArray<double>> jac(
result.second);
polynomial_degree == 1,
renumber_lexicographic_to_hierarchic);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
output_data.quadrature_points[i] = result.first;
- if (update_flags & update_jacobians)
+ if ((update_flags & update_jacobians) != 0u)
{
DerivativeForm<1, spacedim, dim> jac = result.second;
output_data.jacobians[i] = jac.transpose();
}
- if (update_flags & update_inverse_jacobians)
+ if ((update_flags & update_inverse_jacobians) != 0u)
{
DerivativeForm<1, spacedim, dim> jac(result.second);
DerivativeForm<1, spacedim, dim> inv_jac = jac.covariant_form();
{1, 8, 3, 9, 5, 10, 7, 11}}; // shifted cube
// binary to case number
- const unsigned int this_case =
- 4 * face_orientation + 2 * face_flip + face_rotation;
+ const unsigned int this_case = 4 * static_cast<int>(face_orientation) +
+ 2 * static_cast<int>(face_flip) +
+ static_cast<int>(face_rotation);
if (manipulate_left_cube)
{
std::string tmp;
for (const char c : s)
{
- if (isdigit(c))
+ if (isdigit(c) != 0)
{
tmp += c;
}
additional_width = static_cast<unsigned int>(
.5 + height * .4); // additional width for legend
}
- else if (svg_flags.draw_colorbar && svg_flags.coloring)
+ else if (svg_flags.draw_colorbar && (svg_flags.coloring != 0u))
{
additional_width = static_cast<unsigned int>(
.5 + height * .175); // additional width for colorbar
<< '\n';
// polygon styles with respect to the chosen cell coloring
- if (svg_flags.coloring)
+ if (svg_flags.coloring != 0u)
{
unsigned int labeling_index = 0;
auto materials_it = materials.begin();
// draw the current cell
out << " <path";
- if (svg_flags.coloring)
+ if (svg_flags.coloring != 0u)
{
out << " class=\"p";
// if the current cell lies at the boundary of the triangulation, draw
// the additional boundary line
- if (svg_flags.boundary_line_thickness)
+ if (svg_flags.boundary_line_thickness != 0u)
{
for (auto faceIndex : cell->face_indices())
{
// draw the colorbar
- if (svg_flags.draw_colorbar && svg_flags.coloring)
+ if (svg_flags.draw_colorbar && (svg_flags.coloring != 0u))
{
out << '\n' << " <!-- colorbar -->" << '\n';
std::set<typename Triangulation<dim, spacedim>::active_cell_iterator>> &
Cache<dim, spacedim>::get_vertex_to_cell_map() const
{
- if (update_flags & update_vertex_to_cell_map)
+ if ((update_flags & update_vertex_to_cell_map) != 0)
{
vertex_to_cells = GridTools::vertex_to_cell_map(*tria);
update_flags = update_flags & ~update_vertex_to_cell_map;
const std::vector<std::vector<Tensor<1, spacedim>>> &
Cache<dim, spacedim>::get_vertex_to_cell_centers_directions() const
{
- if (update_flags & update_vertex_to_cell_centers_directions)
+ if ((update_flags & update_vertex_to_cell_centers_directions) != 0)
{
vertex_to_cell_centers = GridTools::vertex_to_cell_centers_directions(
*tria, get_vertex_to_cell_map());
const std::map<unsigned int, Point<spacedim>> &
Cache<dim, spacedim>::get_used_vertices() const
{
- if (update_flags & update_used_vertices)
+ if ((update_flags & update_used_vertices) != 0)
{
used_vertices = GridTools::extract_used_vertices(*tria, *mapping);
update_flags = update_flags & ~update_used_vertices;
const RTree<std::pair<Point<spacedim>, unsigned int>> &
Cache<dim, spacedim>::get_used_vertices_rtree() const
{
- if (update_flags & update_used_vertices_rtree)
+ if ((update_flags & update_used_vertices_rtree) != 0)
{
const auto &used_vertices = get_used_vertices();
std::vector<std::pair<Point<spacedim>, unsigned int>> vertices(
typename Triangulation<dim, spacedim>::active_cell_iterator>> &
Cache<dim, spacedim>::get_cell_bounding_boxes_rtree() const
{
- if (update_flags & update_cell_bounding_boxes_rtree)
+ if ((update_flags & update_cell_bounding_boxes_rtree) != 0)
{
std::vector<std::pair<
BoundingBox<spacedim>,
typename Triangulation<dim, spacedim>::active_cell_iterator>> &
Cache<dim, spacedim>::get_locally_owned_cell_bounding_boxes_rtree() const
{
- if (update_flags & update_locally_owned_cell_bounding_boxes_rtree)
+ if ((update_flags & update_locally_owned_cell_bounding_boxes_rtree) != 0)
{
std::vector<std::pair<
BoundingBox<spacedim>,
const std::vector<std::set<unsigned int>> &
Cache<dim, spacedim>::get_vertex_to_neighbor_subdomain() const
{
- if (update_flags & update_vertex_to_neighbor_subdomain)
+ if ((update_flags & update_vertex_to_neighbor_subdomain) != 0)
{
vertex_to_neighbor_subdomain.clear();
vertex_to_neighbor_subdomain.resize(tria->n_vertices());
tria_faces.quads_line_orientations.end(),
new_size * GeometryInfo<2>::lines_per_cell -
tria_faces.quads_line_orientations.size(),
- true);
+ 1u);
tria_faces.quad_reference_cell.reserve(new_size);
tria_faces.quad_reference_cell.insert(
tria_level.face_orientations.end(),
total_cells * max_faces_per_cell -
tria_level.face_orientations.size(),
- true);
+ 1u);
tria_level.reference_cell.reserve(total_cells);
tria_level.reference_cell.insert(
level.subdomain_ids.assign(size, 0);
level.level_subdomain_ids.assign(size, 0);
- level.refine_flags.assign(size, false);
+ level.refine_flags.assign(size, 0u);
level.coarsen_flags.assign(size, false);
level.parents.assign((size + 1) / 2, -1);
nb->face_flip(nb_indices.first),
nb->face_rotation(nb_indices.first));
if ((nb_frc & RefinementCase<dim>::cut_x) &&
- !(refined_along_x ||
- to_be_refined_along_x))
+ !((refined_along_x != 0u) ||
+ (to_be_refined_along_x != 0u)))
changed |= cell->flag_for_face_refinement(
i,
RefinementCase<dim - 1>::cut_axis(0));
if ((nb_frc & RefinementCase<dim>::cut_y) &&
- !(refined_along_y ||
- to_be_refined_along_y))
+ !((refined_along_y != 0u) ||
+ (to_be_refined_along_y != 0u)))
changed |= cell->flag_for_face_refinement(
i,
RefinementCase<dim - 1>::cut_axis(1));
}
for (unsigned int position = 0; position != N; ++position)
- v[position] = (flags[position / 8] & (1 << (position % 8)));
+ v[position] = ((flags[position / 8] & (1 << (position % 8))) != 0);
in >> magic_number;
AssertThrow(magic_number == magic_number2, ExcGridReadError());
// which is 0 or 1 in an anisotropic case
// (case_x, case_y, casex2y or casey2x) or
// 0...3 in an isotropic case (case_xy)
- return subface_no + first_child_has_children;
+ return subface_no + static_cast<unsigned int>(first_child_has_children);
}
Assert(rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
const DynamicSparsityPattern::size_type local_row =
- rowset.size() ? rowset.index_within_set(row) : row;
+ rowset.size() != 0u ? rowset.index_within_set(row) : row;
// now we need to do a binary search. Note that col indices are assumed to
// be sorted.
if (scientific)
{
out.setf(std::ios::scientific, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 7;
}
else
{
out.setf(std::ios::fixed, std::ios::floatfield);
- if (!width)
+ if (width == 0u)
width = precision + 2;
}
const auto rlen = dsp.row_length(row);
// skip empty lines
- if (!rlen)
+ if (rlen == 0)
continue;
// save entries
BlockDynamicSparsityPattern::size_type rlen = dsp.row_length(row);
// skip empty lines
- if (!rlen)
+ if (rlen == 0)
continue;
// save entries
}
// complete all sends, so that we can safely destroy the buffers.
- if (requests.size())
+ if (requests.size() > 0)
{
const int ierr =
MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
TrilinosWrappers::global_index(domain_map, row) :
row;
distributed_constant_modes[d][row] =
- constant_modes[d][mode_index];
+ static_cast<double>(constant_modes[d][mode_index]);
}
}
(void)expected_mode_size;
constant_modes_are_global ?
TrilinosWrappers::global_index(domain_map, row) :
row;
- distributed_constant_modes[d][row] =
- additional_data.constant_modes[d][global_row_id];
+ distributed_constant_modes[d][row] = static_cast<double>(
+ additional_data.constant_modes[d][global_row_id]);
}
parameter_list.set("null space: type", "pre-computed");
// power of two, which allows it to replace integer divisions by shifts
unsigned int vectorization_length_bits = 0;
unsigned int my_length = vectorization_length;
- while (my_length >>= 1)
+ while ((my_length >>= 1) != 0u)
++vectorization_length_bits;
const unsigned int n_lanes = 1 << vectorization_length_bits;
for (unsigned int j = n_categories - 1; j > 0; --j)
{
unsigned int lower_index = j - 1;
- while (renumbering_category[j].size() % n_lanes)
+ while ((renumbering_category[j].size() % n_lanes) != 0u)
{
- while (renumbering_category[j].size() % n_lanes &&
+ while (((renumbering_category[j].size() % n_lanes) != 0u) &&
!renumbering_category[lower_index].empty())
{
renumbering_category[j].push_back(
cell_vectorization_categories[n_active_cells]);
renumbering[cell] = cell;
}
- if (n_ghost_cells % n_lanes)
+ if ((n_ghost_cells % n_lanes) != 0u)
incompletely_filled_vectorization.back() = n_ghost_cells % n_lanes;
cell_partition_data.push_back(n_cell_batches + n_ghost_batches);
partition_row_index.back() = cell_partition_data.size() - 1;
// we do not need to worry about getting any imaginary
// components to the postprocessor, and we can safely
// call the function that evaluates a scalar field
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
dataset->get_function_values(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
scratch_data.patch_values_scalar.solution_values);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
dataset->get_function_gradients(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
scratch_data.patch_values_scalar.solution_gradients);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
dataset->get_function_hessians(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
// Also fill some of the other fields postprocessors may
// want to access.
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
scratch_data.patch_values_scalar.evaluation_points =
this_fe_patch_values.get_quadrature_points();
{
scratch_data.resize_system_vectors(n_components);
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
dataset->get_function_values(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
scratch_data.patch_values_system.solution_values);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
dataset->get_function_gradients(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
scratch_data.patch_values_system.solution_gradients);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
dataset->get_function_hessians(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
// First get the real component of the scalar solution
// and copy the data into the
// scratch_data.patch_values_system output fields
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
{
dataset->get_function_values(
this_fe_patch_values,
}
}
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
{
dataset->get_function_gradients(
this_fe_patch_values,
}
}
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
{
dataset->get_function_hessians(
this_fe_patch_values,
// and copy the data into the
// scratch_data.patch_values_system output fields
// that follow the real one
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
{
dataset->get_function_values(
this_fe_patch_values,
}
}
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
{
dataset->get_function_gradients(
this_fe_patch_values,
}
}
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
{
dataset->get_function_hessians(
this_fe_patch_values,
// values, then the real and imaginary parts of the
// gradients, etc. This allows us to scope the
// temporary objects better
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
{
std::vector<Vector<double>> tmp(
scratch_data.patch_values_system.solution_values
}
// Now do the exact same thing for the gradients
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
{
std::vector<std::vector<Tensor<1, spacedim>>> tmp(
scratch_data.patch_values_system
}
// And finally the Hessians. Same scheme as above.
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
{
std::vector<std::vector<Tensor<2, spacedim>>> tmp(
scratch_data.patch_values_system
}
// Now set other fields we may need
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
scratch_data.patch_values_system.evaluation_points =
this_fe_patch_values.get_quadrature_points();
{
// at each point there is only one component of value,
// gradient etc.
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
this->dof_data[dataset]->get_function_values(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_scalar.solution_values);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
this->dof_data[dataset]->get_function_gradients(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_scalar.solution_gradients);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
this->dof_data[dataset]->get_function_hessians(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_scalar.solution_hessians);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
data.patch_values_scalar.evaluation_points =
this_fe_patch_values.get_quadrature_points();
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
data.patch_values_scalar.normals =
this_fe_patch_values.get_normal_vectors();
// at each point there is a vector valued function and its
// derivative...
data.resize_system_vectors(n_components);
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
this->dof_data[dataset]->get_function_values(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_system.solution_values);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
this->dof_data[dataset]->get_function_gradients(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_system.solution_gradients);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
this->dof_data[dataset]->get_function_hessians(
this_fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_system.solution_hessians);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
data.patch_values_system.evaluation_points =
this_fe_patch_values.get_quadrature_points();
- if (update_flags & update_normal_vectors)
+ if ((update_flags & update_normal_vectors) != 0u)
data.patch_values_system.normals =
this_fe_patch_values.get_normal_vectors();
// at each point there is
// only one component of
// value, gradient etc.
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
this->dof_data[dataset]->get_function_values(
fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_scalar.solution_values);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
this->dof_data[dataset]->get_function_gradients(
fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_scalar.solution_gradients);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
this->dof_data[dataset]->get_function_hessians(
fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_scalar.solution_hessians);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
data.patch_values_scalar.evaluation_points =
fe_patch_values.get_quadrature_points();
// at each point there is a vector valued function and
// its derivative...
- if (update_flags & update_values)
+ if ((update_flags & update_values) != 0u)
this->dof_data[dataset]->get_function_values(
fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_system.solution_values);
- if (update_flags & update_gradients)
+ if ((update_flags & update_gradients) != 0u)
this->dof_data[dataset]->get_function_gradients(
fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_system.solution_gradients);
- if (update_flags & update_hessians)
+ if ((update_flags & update_hessians) != 0u)
this->dof_data[dataset]->get_function_hessians(
fe_patch_values,
internal::DataOutImplementation::ComponentExtractor::
real_part,
data.patch_values_system.solution_hessians);
- if (update_flags & update_quadrature_points)
+ if ((update_flags & update_quadrature_points) != 0u)
data.patch_values_system.evaluation_points =
fe_patch_values.get_quadrature_points();
*const valuesptr = pointerstruct->second.dof_values_ptr;
// cell stayed as it was or was refined
- if (indexptr)
+ if (indexptr != nullptr)
{
Assert(valuesptr == nullptr, ExcInternalError());