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

FEEvaluation: Select correct code path for cell neighbors #12966

Merged
merged 1 commit into from Nov 18, 2021

Conversation

bergbauer
Copy link
Contributor

@bergbauer bergbauer commented Nov 18, 2021

The flag is_interior_face is used to allow a user to read_dof_values() from the neighboring cell associated with a local face number in case of cells (!is_face) and set to is_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;).

Comment on lines 3535 to 3536
, is_interior_face(is_interior_face)
, is_cell_neighbor(false)
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

@peterrum peterrum left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* interior face or the neighboring cell corresponding to the exterior face
* interior face or the neighboring cell corresponding to the exterior face.

@bergbauer bergbauer changed the title Introduce is_cell_neighbor flag to select correct code path for cell neighbors FEEvaluation: Select correct code path for cell neighbors Nov 18, 2021
@peterrum peterrum merged commit 5081b0f into dealii:master Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants