-
Notifications
You must be signed in to change notification settings - Fork 77
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
Better Problem Specific Function capability #743
Better Problem Specific Function capability #743
Conversation
77ef7a4
to
9e8b09e
Compare
This should be ready to go now. The first approach described above was chosen. |
amrex::RealVect x = pc_cmp_loc({AMREX_D_DECL(i, j, k)}, geomdata); | ||
pc_transcoeff( | ||
get_xi, get_mu, get_lam, get_Ddiag, get_chi, T, rho, Y, Ddiag, | ||
chi_mix, muloc, xiloc, lamloc, ltransparm, *lprobparm, x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I get the trickiness you had to figure out... I guess the only bummer is the extra stuff that needs to be initialized/used here. Duplicate stuff from pelephysics. But there's probably no other good way.
Great work! Well done. I had some minor comments. |
Consolidate problem-specific functions into a single class, which makes adding more problem-specific capability easier. This is a breaking change, only requires a one-line fix for case that don't use the existing problem-specific capability, and makes it so future additions of problem-specific capability aren't breaking.
Also adds some improvements for passive scalar advection.
Draft right now, will need to go through and make a change to all cases once the methodology is finalized.
@marchdf - There are two potential approaches that I'm considering. The first is to make all problem-specific functions (whether they run on CPU or GPU) into static functions of a single class. The second is to make all CPU problem-specific functions be members of that class, but have the problem-specific GPU kernels be stand alone functions that use templating based on that class. See
Source/ProblemSpecificFunctions.H
andMassCons/prob.H
for examples (set_problem_tags
is the former,set_isothermal_wall_temperature
is the latter). Let me know which approach you prefer.