A base class for doing general particle/mesh interpolation operations. More...
#include <AMReX_ParticleInterpolators.H>
Public Member Functions | |
template<typename P , typename V , typename F > | |
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | ParticleToMesh (const P &p, amrex::Array4< V > const &arr, int src_comp, int dst_comp, int num_comps, F const &f) |
A general function for doing particle-to-mesh interpolation for one particle. More... | |
template<typename P , typename V , typename F , typename G > | |
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | MeshToParticle (P &p, amrex::Array4< const V > const &arr, int src_comp, int dst_comp, int num_comps, F const &f, G const &g) |
A general function for doing mesh-to-particle interpolation for one particle. More... | |
Public Attributes | |
int | index [3] |
WeightType * | w |
A base class for doing general particle/mesh interpolation operations.
Note that you don't call the base class version of this directly, you use one of the derived versions below that implement specific interpolations.
|
inline |
A general function for doing mesh-to-particle interpolation for one particle.
Note that you don't call the base class version of this, you call one of the derived versions below that implement specific interpolations.
P | the particle type |
V | the mesh data type (i.e. float, double, int) |
F | callable that generates the mesh quantity to interpolate |
G | callable that updates the particle given the mesh value |
p | the particle to interpolate |
arr | the Array4 to interpolate to |
src_comp | the particle component to start at |
dst_comp | the mesh component to start at |
num_comps | the number of components to interpolate |
f | function for computing the particle quantity to interpolate |
g | function that updates the particle given the mesh value |
Usage:
Interpolate mesh comps 0-2 to particle comps 4-6 with no weighting using addition:
Usage:
Interpolate mesh comp 0 to particle comp 0, simply setting the value for the result instead of adding:
|
inline |
A general function for doing particle-to-mesh interpolation for one particle.
Note that you don't call the base class version of this, you call one of the derived versions below that implement specific interpolations.
P | the particle type |
V | the mesh data type (i.e. float, double, int) |
F | callable that generates the particle quantity to interpolate |
p | the particle to interpolate |
arr | the Array4 to interpolate to |
src_comp | the particle component to start at |
dst_comp | the mesh component to start at |
num_comps | the number of components to interpolate |
f | function for computing the particle quantity to interpolate |
Usage:
Interpolate particle comp 0 to mesh comp 0 with no weighting:
Usage:
Interpolate 3 particle components 1-3 to mesh components 1-3, weighting by particle comp 0:
int amrex::ParticleInterpolator::Base< Derived, WeightType >::index[3] |
WeightType* amrex::ParticleInterpolator::Base< Derived, WeightType >::w |