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
FEEvaluation: Select correct code path for cell neighbors #12966
Conversation
, is_interior_face(is_interior_face) | ||
, is_cell_neighbor(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since, they are next to each other: can not we misuse is_interior_face
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could since is_interior_face
is only used for faces but the logic would look confusing in the if statements IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simply rename it. We use common function/variables all over the base classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we could choose a more generic name here, if the logic works with a single variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think of something like is_interior_face_or_cell_neighbor
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no. I would revert the logic, since interior face
=this cell
and exterior face
=cell neighbor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT? @peterrum Would you prefer to inline the logic?
e2a3d34
to
1d5fb27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup :)
* according to the defined direction of the normal. Not used for cells. | ||
* according to the defined direction of the normal. For cells it defines if | ||
* the dof values should be read from the actual cell corresponding to the | ||
* interior face or the neighboring cell corresponding to the exterior face |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* interior face or the neighboring cell corresponding to the exterior face | |
* interior face or the neighboring cell corresponding to the exterior face. |
1d5fb27
to
047c2fb
Compare
The flag
is_interior_face
is used to allow a user toread_dof_values()
from the neighboring cell associated with a local face number in case of cells (!is_face
) and set tois_interior_face = false
(exterior face).In my use case I achieve this via a overload of
FEEvaluation
which sets this flag (this->is_interior_face = false;
) and the local face number (this->face_no = face_number;
).