WarpX
Namespaces | Functions
NodalFieldGather.H File Reference
#include "ablastr/utils/TextMsg.H"
#include <AMReX_Array.H>
#include <AMReX_Extension.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_IndexType.H>
#include <AMReX_Math.H>
#include <AMReX_REAL.H>

Go to the source code of this file.

Namespaces

 ablastr
 
 ablastr::particles
 

Functions

template<amrex::IndexType::CellIndex IdxType>
AMREX_GPU_HOST_DEVICE AMREX_INLINE void ablastr::particles::compute_weights (const amrex::ParticleReal xp, const amrex::ParticleReal yp, const amrex::ParticleReal zp, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &plo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi, int &i, int &j, int &k, amrex::Real W[AMREX_SPACEDIM][2]) noexcept
 Compute weight of each surrounding node (or cell-centered nodes) in interpolating a nodal ((or a cell-centered node) field to the given coordinates. If template parameter IdxType is amrex::IndexType::CellIndex::NODE, then the calculations will be done with respect to the nodes. If template parameter IdxType is amrex::IndexType::CellIndex::CELL, then the calculations will be done with respect to the cell-centered nodal. This currently only does linear order. More...
 
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::Real ablastr::particles::interp_field_nodal (int i, int j, int k, const amrex::Real W[AMREX_SPACEDIM][2], amrex::Array4< const amrex::Real > const &scalar_field) noexcept
 Interpolate nodal field value based on surrounding indices and weights. More...
 
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::Real ablastr::particles::doGatherScalarFieldNodal (const amrex::ParticleReal xp, const amrex::ParticleReal yp, const amrex::ParticleReal zp, amrex::Array4< const amrex::Real > const &scalar_field, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &lo) noexcept
 Scalar field gather for a single particle. The field has to be defined at the cell nodes (see https://amrex-codes.github.io/amrex/docs_html/Basics.html#id2) More...
 
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::GpuArray< amrex::Real, 3 > ablastr::particles::doGatherVectorFieldNodal (const amrex::ParticleReal xp, const amrex::ParticleReal yp, const amrex::ParticleReal zp, amrex::Array4< const amrex::Real > const &vector_field_x, amrex::Array4< const amrex::Real > const &vector_field_y, amrex::Array4< const amrex::Real > const &vector_field_z, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &lo) noexcept
 Vector field gather for a single particle. The field has to be defined at the cell nodes (see https://amrex-codes.github.io/amrex/docs_html/Basics.html#id2) More...