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 creating auxiliary, diagnostic, and derived fields #663

Open
baagaard-usgs opened this issue Nov 23, 2023 · 0 comments
Open

Refactor creating auxiliary, diagnostic, and derived fields #663

baagaard-usgs opened this issue Nov 23, 2023 · 0 comments
Assignees
Labels
clean up Clean up

Comments

@baagaard-usgs
Copy link
Contributor

baagaard-usgs commented Nov 23, 2023

Description

There is duplicate code for creating auxiliary, diagnostic, and derived fields. We can refactor the code to eliminate the duplication.

Desired Solution

  1. The various implementations of the Physics object call addXXX for each subfield.
  2. Move createXXXField() methods to the Physics abstract base class.
  3. The various implementation of the Physics object also hold just one discretizations map. When adding a subfield, the physics object passes the discretization to the factory.
  4. Factories would need to hold an array of (subfieldName, description, discretization).
  5. Might be able to use template methods to reduce code duplication across IntegratorDomain, IntegratorInterface, and IntegratorBoundary.
  6. Set default discretization via Pyre settings.
@baagaard-usgs baagaard-usgs added the clean up Clean up label Nov 23, 2023
@baagaard-usgs baagaard-usgs self-assigned this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean up Clean up
Projects
None yet
Development

No branches or pull requests

1 participant