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

FEEval: rename get_is_interior_face() to is_interior_face() #13311

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions include/deal.II/matrix_free/evaluation_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ namespace internal
std::array<const unsigned int *, n_face_orientations> orientation = {};

if (dim == 3 && n_face_orientations == n_lanes && !all_faces_are_same &&
fe_eval.get_is_interior_face() == 0)
fe_eval.is_interior_face() == 0)
for (unsigned int v = 0; v < n_lanes; ++v)
{
// the loop breaks once an invalid_unsigned_int is hit for
Expand Down Expand Up @@ -3749,7 +3749,7 @@ namespace internal

if (fe_eval.get_dof_access_index() ==
MatrixFreeFunctions::DoFInfo::dof_access_cell &&
fe_eval.get_is_interior_face() == false)
fe_eval.is_interior_face() == false)
fe_face_evaluation_process_and_io<VectorizedArrayType::size()>(
p, n_components, evaluation_flag, src_ptr, sm_ptr, fe_eval, temp);
else
Expand Down Expand Up @@ -3794,7 +3794,7 @@ namespace internal
{
if (fe_eval.get_dof_access_index() ==
MatrixFreeFunctions::DoFInfo::dof_access_cell &&
fe_eval.get_is_interior_face() == false)
fe_eval.is_interior_face() == false)
{
for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
{
Expand Down Expand Up @@ -3972,7 +3972,7 @@ namespace internal
{
if (fe_eval.get_dof_access_index() ==
MatrixFreeFunctions::DoFInfo::dof_access_cell &&
fe_eval.get_is_interior_face() == false)
fe_eval.is_interior_face() == false)
for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
{
// the loop breaks once an invalid_unsigned_int is hit for
Expand Down Expand Up @@ -4047,7 +4047,7 @@ namespace internal

if (fe_eval.get_dof_access_index() ==
MatrixFreeFunctions::DoFInfo::dof_access_cell &&
fe_eval.get_is_interior_face() == false)
fe_eval.is_interior_face() == false)
fe_face_evaluation_process_and_io<VectorizedArrayType::size()>(
p, n_components, integration_flag, dst_ptr, sm_ptr, fe_eval, temp);
else
Expand Down
28 changes: 14 additions & 14 deletions include/deal.II/matrix_free/fe_evaluation.h
Original file line number Diff line number Diff line change
Expand Up @@ -3874,8 +3874,8 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
!(is_face &&
this->dof_access_index ==
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
this->is_interior_face == false) &&
!(!is_face && !this->is_interior_face))
this->is_interior_face() == false) &&
!(!is_face && !this->is_interior_face()))
{
const unsigned int dof_index =
dof_indices_cont[this->cell * VectorizedArrayType::size()] +
Expand Down Expand Up @@ -3910,8 +3910,8 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
const bool is_ecl =
(this->dof_access_index ==
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
this->is_interior_face == false) ||
(!is_face && !this->is_interior_face);
this->is_interior_face() == false) ||
(!is_face && !this->is_interior_face());

if (vectors_sm[0] != nullptr)
{
Expand Down Expand Up @@ -7563,7 +7563,7 @@ FEFaceEvaluation<dim,

this->cell = face_index;
this->dof_access_index =
this->is_interior_face ?
this->is_interior_face() ?
internal::MatrixFreeFunctions::DoFInfo::dof_access_face_interior :
internal::MatrixFreeFunctions::DoFInfo::dof_access_face_exterior;
Assert(this->mapping_data != nullptr, ExcNotInitialized());
Expand All @@ -7572,7 +7572,7 @@ FEFaceEvaluation<dim,
this->matrix_free->get_task_info().face_partition_data.back() &&
face_index <
this->matrix_free->get_task_info().boundary_partition_data.back())
Assert(this->is_interior_face,
Assert(this->is_interior_face(),
ExcMessage(
"Boundary faces do not have a neighbor. When looping over "
"boundary faces use FEFaceEvaluation with the parameter "
Expand All @@ -7593,12 +7593,12 @@ FEFaceEvaluation<dim,
this->J_value = &this->mapping_data->JxW_values[offsets];
this->normal_vectors = &this->mapping_data->normal_vectors[offsets];
this->jacobian =
&this->mapping_data->jacobians[!this->is_interior_face][offsets];
&this->mapping_data->jacobians[!this->is_interior_face()][offsets];
this->normal_x_jacobian =
&this->mapping_data
->normals_times_jacobians[!this->is_interior_face][offsets];
->normals_times_jacobians[!this->is_interior_face()][offsets];
this->jacobian_gradients =
this->mapping_data->jacobian_gradients[!this->is_interior_face].data() +
this->mapping_data->jacobian_gradients[!this->is_interior_face()].data() +
offsets;

if (this->mapping_data->quadrature_point_offsets.empty() == false)
Expand Down Expand Up @@ -7659,7 +7659,7 @@ FEFaceEvaluation<dim,

constexpr unsigned int n_lanes = VectorizedArrayType::size();

if (this->is_interior_face == false)
if (this->is_interior_face() == false)
{
// for this case, we need to look into the FaceInfo field that collects
// information from both sides of a face once for the global mesh, and
Expand Down Expand Up @@ -7741,13 +7741,13 @@ FEFaceEvaluation<dim,
.normal_vectors[offsets];
this->jacobian = &this->matrix_free->get_mapping_info()
.face_data_by_cells[this->quad_no]
.jacobians[!this->is_interior_face][offsets];
.jacobians[!this->is_interior_face()][offsets];
this->normal_x_jacobian =
&this->matrix_free->get_mapping_info()
.face_data_by_cells[this->quad_no]
.normals_times_jacobians[!this->is_interior_face][offsets];
.normals_times_jacobians[!this->is_interior_face()][offsets];
this->jacobian_gradients =
this->mapping_data->jacobian_gradients[!this->is_interior_face].data() +
this->mapping_data->jacobian_gradients[!this->is_interior_face()].data() +
offsets;

if (this->matrix_free->get_mapping_info()
Expand Down Expand Up @@ -8198,7 +8198,7 @@ FEFaceEvaluation<dim,
{
Assert((this->dof_access_index ==
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
this->is_interior_face == false) == false,
this->is_interior_face() == false) == false,
ExcNotImplemented());

const auto shared_vector_data = internal::get_shared_vector_data(
Expand Down
30 changes: 15 additions & 15 deletions include/deal.II/matrix_free/fe_evaluation_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ class FEEvaluationData
* internal use.
*/
bool
get_is_interior_face() const;
is_interior_face() const;

/**
* Return the id of the cells this FEEvaluation or FEFaceEvaluation is
Expand Down Expand Up @@ -800,7 +800,7 @@ class FEEvaluationData
* the dof values should be read from the actual cell corresponding to the
* interior face or the neighboring cell corresponding to the exterior face.
*/
bool is_interior_face;
bool interior_face;

/**
* Stores the index an FEFaceEvaluation object is currently pointing into
Expand Down Expand Up @@ -940,7 +940,7 @@ inline FEEvaluationData<dim, Number, is_face>::FEEvaluationData(
, gradients_quad_submitted(false)
# endif
, cell(numbers::invalid_unsigned_int)
, is_interior_face(is_interior_face)
, interior_face(is_interior_face)
, dof_access_index(
is_face ?
(is_interior_face ?
Expand Down Expand Up @@ -980,7 +980,7 @@ inline FEEvaluationData<dim, Number, is_face>::FEEvaluationData(
, quadrature_weights(nullptr)
, cell(0)
, cell_type(internal::MatrixFreeFunctions::general)
, is_interior_face(true)
, interior_face(true)
, dof_access_index(internal::MatrixFreeFunctions::DoFInfo::dof_access_cell)
, mapped_geometry(mapped_geometry)
, is_reinitialized(false)
Expand Down Expand Up @@ -1029,11 +1029,11 @@ FEEvaluationData<dim, Number, is_face>::operator=(const FEEvaluationData &other)
gradients_quad_submitted = false;
# endif

cell = numbers::invalid_unsigned_int;
is_interior_face = other.is_interior_face;
cell = numbers::invalid_unsigned_int;
interior_face = other.is_interior_face();
dof_access_index =
is_face ?
(is_interior_face ?
(is_interior_face() ?
internal::MatrixFreeFunctions::DoFInfo::dof_access_face_interior :
internal::MatrixFreeFunctions::DoFInfo::dof_access_face_exterior) :
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell;
Expand Down Expand Up @@ -1097,8 +1097,8 @@ FEEvaluationData<dim, Number, is_face>::reinit_face(
ExcMessage("Faces can only be set if the is_face template parameter "
"is true"));
face_numbers[0] =
(is_interior_face ? face.interior_face_no : face.exterior_face_no);
subface_index = is_interior_face == true ?
(is_interior_face() ? face.interior_face_no : face.exterior_face_no);
subface_index = is_interior_face() == true ?
GeometryInfo<dim>::max_children_per_cell :
face.subface_index;

Expand All @@ -1107,11 +1107,11 @@ FEEvaluationData<dim, Number, is_face>::reinit_face(
// standard-orientation else copy the first three bits
// (which is equivalent to modulo 8). See also the documentation of
// internal::MatrixFreeFunctions::FaceToCellTopology::face_orientation.
face_orientations[0] = (is_interior_face == (face.face_orientation >= 8)) ?
face_orientations[0] = (is_interior_face() == (face.face_orientation >= 8)) ?
(face.face_orientation % 8) :
0;

if (is_interior_face)
if (is_interior_face())
cell_ids = face.cells_interior;
else
cell_ids = face.cells_exterior;
Expand Down Expand Up @@ -1431,7 +1431,7 @@ FEEvaluationData<dim, Number, is_face>::get_face_no(const unsigned int v) const
Assert(v == 0 || (cell != numbers::invalid_unsigned_int &&
dof_access_index ==
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
is_interior_face == false),
is_interior_face() == false),
ExcMessage("All face numbers can only be queried for ECL at exterior "
"faces. Use get_face_no() in other cases."));

Expand All @@ -1458,7 +1458,7 @@ FEEvaluationData<dim, Number, is_face>::get_face_orientation(
Assert(v == 0 || (cell != numbers::invalid_unsigned_int &&
dof_access_index ==
internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
is_interior_face == false),
is_interior_face() == false),
ExcMessage("All face numbers can only be queried for ECL at exterior "
"faces. Use get_face_no() in other cases."));

Expand All @@ -1478,9 +1478,9 @@ FEEvaluationData<dim, Number, is_face>::get_dof_access_index() const

template <int dim, typename Number, bool is_face>
inline bool
FEEvaluationData<dim, Number, is_face>::get_is_interior_face() const
FEEvaluationData<dim, Number, is_face>::is_interior_face() const
{
return is_interior_face;
return interior_face;
}


Expand Down