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

Refactor vector invariant advection #2820

Closed
wants to merge 11 commits into from

Conversation

simone-silvestri
Copy link
Collaborator

@simone-silvestri simone-silvestri commented Nov 11, 2022

swap orders of WENO reconstruction and VectorInvariant advection so instead of

WENO(grid, vector_invariant = VelocityStencil(), order = 5)

we write

reconstruction_scheme = WENO(grid, order = 5)
VectorInvariant(scheme = reconstruction_scheme, stencil = VelocityStencil())

This means that now VectorInvariant works with any reconstruction scheme. I.e., it is possible to write also

reconstruction_scheme = UpwindFifthOrder()
VectorInvariant(scheme = reconstruction_scheme)

Closes #2271

@glwagner glwagner self-requested a review November 11, 2022 19:42
Copy link
Member

@glwagner glwagner left a comment

Choose a reason for hiding this comment

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

excellent

make sure to bump the version before merging

@glwagner
Copy link
Member

This makes progress towards

#2454

It will also allow us to more easily implement new reconstruction schemes to use with vector invariant advection... should we come up with any.

@glwagner
Copy link
Member

Should we have both scheme and reconstruction, or are the two identical?

@simone-silvestri
Copy link
Collaborator Author

simone-silvestri commented Nov 11, 2022

I guess they are identical. Maybe we can change the EnergyConserving and EnstrophyConserving to CenteredEnergyConserving and CenteredEnstrophyConserving


required_halo_size(scheme::WENOVectorInvariant{N}) where N = N + 1
required_halo_size(scheme::WENOVectorInvariant) = required_halo_size(scheme.advection) + 1
Copy link
Member

Choose a reason for hiding this comment

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

💪

Copy link
Member

Choose a reason for hiding this comment

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

isn't it scheme.scheme or something now

Copy link
Member

Choose a reason for hiding this comment

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

maybe should be scheme.vorticity_reconstruction or something

@navidcy
Copy link
Collaborator

navidcy commented Dec 12, 2022

Closing in favor of #2852

@navidcy navidcy closed this Dec 12, 2022
@navidcy navidcy deleted the ss/refactor-vector-invariant branch November 2, 2023 17:06
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.

Improvements to stretched WENO5 API and new method validate_advection
3 participants