Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Setup problem class with virtual function for derived, EB, ... #189

Open
esclapez opened this issue Aug 18, 2021 · 1 comment
Open

Setup problem class with virtual function for derived, EB, ... #189

esclapez opened this issue Aug 18, 2021 · 1 comment

Comments

@esclapez
Copy link
Contributor

Will need to be done in coordination with IAMR/PeleC

@marchdf
Copy link

marchdf commented Aug 18, 2021

Adding details from email discussion here just for documentation:

MarcHdF: "making Prob.* into a class which inherits from a base class with some pure virtual functions (e.g stuff that you need to do like initdata) and then some other virtual functions for things like problem specific tagging, problem specific derives, and problem specific geometries, with the right hooks that get called in the code. We can currently do all those in PeleC but it would be nice to have it unified. That way we don’t have to rely on user’s copying files locally and rather the base class exposes all the possible user defined capabilities."

MarcD: "t would be a simple class with virtual member functions that point to functions that live in PeleC/PeleLM/IAMR.
To make a new problem, the user would derive from that base class and override the functions required for that problem. Every function that is not overridden would call the default functions. In the member functions of the derived class, we could call the base class functions first, if it make sense (like PeleLM calls NavierstokesBase class member functions explicitly, then does more stuff."

MarcHdF: "Yup that’s exactly what it would be. Would also want the prob parm stuff in there as well (with host and device versions of those, like I do in transport)."

And btw, amr-wind does something similar...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants