Better Problem Specific Function capability#743
Merged
baperry2 merged 27 commits intoAMReX-Combustion:developmentfrom Mar 15, 2024
Merged
Better Problem Specific Function capability#743baperry2 merged 27 commits intoAMReX-Combustion:developmentfrom
baperry2 merged 27 commits intoAMReX-Combustion:developmentfrom
Conversation
77ef7a4 to
9e8b09e
Compare
Contributor
Author
|
This should be ready to go now. The first approach described above was chosen. |
marchdf
approved these changes
Mar 14, 2024
| 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); |
Contributor
There was a problem hiding this comment.
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.
Contributor
|
Great work! Well done. I had some minor comments. |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.HandMassCons/prob.Hfor examples (set_problem_tagsis the former,set_isothermal_wall_temperatureis the latter). Let me know which approach you prefer.