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

remove geometric boundary mask #241

Merged
merged 3 commits into from
May 21, 2021
Merged

remove geometric boundary mask #241

merged 3 commits into from
May 21, 2021

Conversation

tkarna
Copy link
Contributor

@tkarna tkarna commented May 17, 2021

Firedrake boundary method 'geometric' has been removed in firedrakeproject/firedrake#2007

For most (all?) Thetis use cases there's actually no difference between geometric and topological boundary masks (e.g. P1DG).

The top/bottom facet mask indices have now been implemented manually.

@wence-
Copy link
Contributor

wence- commented May 17, 2021

(e.g. P1DG).

I'm guessing there isn't a difference because you use equispaced DG nodes?

@tkarna
Copy link
Contributor Author

tkarna commented May 17, 2021

Yes, we need equispaced for e.g. the slope limiters to work

As 'geometric' boundary mask has been removed, we cannot use
FunctionSpace.cell_boundary_masks anymore to identify top/bottom facet nodes.
The indices are computed manually instead.
Copy link
Contributor

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Just one minor suggestion.

Comment on lines +906 to +910
base_element_3d = get_extruded_base_element(self.fs_3d.ufl_element())
assert isinstance(base_element_3d, ufl.TensorProductElement)
family_3dh = base_element_3d.sub_elements()[0].family()
if family_2d != family_3dh:
raise Exception('2D and 3D spaces do not match: {0:s} {1:s}'.format(family_2d, family_3dh))
Copy link
Contributor

Choose a reason for hiding this comment

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

Could maybe write another utility function called something like check_element_consistency_2d-3d, since this is repeated a couple of times later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, sure. Will do in another PR.

@tkarna tkarna merged commit 7a51a2e into master May 21, 2021
@tkarna tkarna deleted the fix-facet-mask branch May 21, 2021 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants