AMReX-Combustion / PelePhysics

A collection of physics databases and implementation code for use with the Pele suite of of codes
https://amrex-combustion.github.io/PelePhysics/
Other
61 stars 52 forks source link

peleparams: common data container for PMF, transport (others in future) #507

Closed baperry2 closed 5 months ago

baperry2 commented 5 months ago

Takes a piece from #492 to make reviewing easier.

PeleParams is a class template that allows copying arbitrary data structures from host to device, taking advantage of The_Pinned_Arena (simple data structures of fixed size can be copied directly without dealing with that though). An InitParm class must be defined with a function that populates the data structure (and cleans it up, if needed). There's some funky stuff to be able to use PeleParams to create derived versions of a base data structure, but for most use cases that can be transparently ignored. Written as a generalization of the old PMFData structure.

Will require minor downstream changes in LMeX/C.

Also implements bugfix in PMF interpolation from https://github.com/AMReX-Combustion/PeleC/pull/808