Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make code a bit more readable. #12868

Merged
merged 1 commit into from
Oct 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 11 additions & 10 deletions include/deal.II/numerics/data_out_dof_data.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ namespace internal
ReferenceCells::Pyramid);
}));

unsigned int n_q_points = 0;
if (use_face_values == false)
{
std::unique_ptr<dealii::Quadrature<dim>> quadrature_simplex;
Expand Down Expand Up @@ -326,12 +325,6 @@ namespace internal
.get_unit_support_points());
}

n_q_points =
std::max({needs_wedge_setup ? quadrature_wedge->size() : 0,
needs_simplex_setup ? quadrature_simplex->size() : 0,
needs_hypercube_setup ? quadrature_hypercube->size() : 0,
needs_pyramid_setup ? quadrature_pyramid->size() : 0});

x_fe_values.resize(finite_elements.size());
for (unsigned int i = 0; i < finite_elements.size(); ++i)
{
Expand Down Expand Up @@ -379,12 +372,19 @@ namespace internal
update_flags);
}
}

// Return maximal number of evaluation points:
return std::max(
{needs_wedge_setup ? quadrature_wedge->size() : 0,
needs_simplex_setup ? quadrature_simplex->size() : 0,
needs_hypercube_setup ? quadrature_hypercube->size() : 0,
needs_pyramid_setup ? quadrature_pyramid->size() : 0});
}
else // build FEFaceValues objects instead
{
dealii::hp::QCollection<dim - 1> quadrature(
QIterated<dim - 1>(QTrapezoid<1>(), n_subdivisions));
n_q_points = quadrature[0].size();

x_fe_face_values.resize(finite_elements.size());
for (unsigned int i = 0; i < finite_elements.size(); ++i)
{
Expand All @@ -404,9 +404,10 @@ namespace internal
quadrature,
update_flags);
}
}

return n_q_points;
// Return maximal number of evaluation points:
return quadrature[0].size();
}
}


Expand Down