Block-Structured AMR Software Framework
 
Loading...
Searching...
No Matches
amrex::ParticleInterpolator::Linear Struct Reference

A class the implements linear (CIC) particle/mesh interpolation. More...

#include <AMReX_ParticleInterpolators.H>

Inheritance diagram for amrex::ParticleInterpolator::Linear:
amrex::ParticleInterpolator::Base< Linear, amrex::Real >

Public Member Functions

template<typename P >
__device__ Linear (const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi)
 
- Public Member Functions inherited from amrex::ParticleInterpolator::Base< Linear, amrex::Real >
__device__ 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.
 
__device__ 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.
 

Public Attributes

amrex::Real weights [3 *stencil_width]
 
- Public Attributes inherited from amrex::ParticleInterpolator::Base< Linear, amrex::Real >
int index [3]
 
amrex::Real * w
 

Static Public Attributes

static constexpr int stencil_width = 2
 
static constexpr int nx = (3 >= 1) ? stencil_width - 1 : 0
 
static constexpr int ny = (3 >= 2) ? stencil_width - 1 : 0
 
static constexpr int nz = (3 >= 3) ? stencil_width - 1 : 0
 

Detailed Description

A class the implements linear (CIC) particle/mesh interpolation.

Usage:

ParticleInterpolator::Linear interp(p, plo, dxi);
interp.ParticleToMesh(p, rho, 0, 0, 1,
[=] AMREX_GPU_DEVICE (const MyPC::ParticleType& part, int comp)
{
return part.rdata(comp); // no weighting
});
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18
A class the implements linear (CIC) particle/mesh interpolation.
Definition AMReX_ParticleInterpolators.H:222

Constructor & Destructor Documentation

◆ Linear()

template<typename P >
__device__ amrex::ParticleInterpolator::Linear::Linear ( const P &  p,
amrex::GpuArray< amrex::Real, 3 > const &  plo,
amrex::GpuArray< amrex::Real, 3 > const &  dxi 
)
inline

Member Data Documentation

◆ nx

constexpr int amrex::ParticleInterpolator::Linear::nx = (3 >= 1) ? stencil_width - 1 : 0
staticconstexpr

◆ ny

constexpr int amrex::ParticleInterpolator::Linear::ny = (3 >= 2) ? stencil_width - 1 : 0
staticconstexpr

◆ nz

constexpr int amrex::ParticleInterpolator::Linear::nz = (3 >= 3) ? stencil_width - 1 : 0
staticconstexpr

◆ stencil_width

constexpr int amrex::ParticleInterpolator::Linear::stencil_width = 2
staticconstexpr

◆ weights

amrex::Real amrex::ParticleInterpolator::Linear::weights[3 *stencil_width]

The documentation for this struct was generated from the following file: