WarpX
Loading...
Searching...
No Matches
WarpXComm_K.H File Reference
#include <AMReX.H>
#include <AMReX_FArrayBox.H>

Go to the source code of this file.

Functions

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp (int j, int k, int l, amrex::Array4< amrex::Real > const &arr_aux, amrex::Array4< amrex::Real const > const &arr_fine, amrex::Array4< amrex::Real const > const &arr_coarse, const amrex::IntVect &arr_stag, const amrex::IntVect &rr)
 Interpolation function called within WarpX::UpdateAuxilaryDataSameType with electromagnetic solver to interpolate data from the coarse and fine grids to the fine aux grid, assuming that all grids have the same staggering (either collocated or staggered).
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp (int j, int k, int l, amrex::Array4< amrex::Real > const &arr_aux, amrex::Array4< amrex::Real const > const &arr_fine, amrex::Array4< amrex::Real const > const &arr_coarse, amrex::Array4< amrex::Real const > const &arr_tmp, const amrex::IntVect &arr_fine_stag, const amrex::IntVect &arr_coarse_stag, const amrex::IntVect &rr)
 Interpolation function called within WarpX::UpdateAuxilaryDataStagToNodal to interpolate data from the coarse and fine grids to the fine aux grid, with momentum-conserving field gathering, hence between grids with different staggering, and assuming that the aux grid is collocated.
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp (int j, int k, int l, amrex::Array4< amrex::Real > const &arr_aux, amrex::Array4< amrex::Real const > const &arr_fine, const amrex::IntVect &arr_fine_stag)
 Interpolation function called within WarpX::UpdateAuxilaryDataStagToNodal to interpolate data from the coarse and fine grids to the fine aux grid, with momentum-conserving field gathering, hence between grids with different staggering, and assuming that the aux grid is collocated.
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp (const int j, const int k, const int l, amrex::Array4< amrex::Real > const &dst_arr, amrex::Array4< amrex::Real const > const &src_arr, const amrex::IntVect &dst_stag, const amrex::IntVect &src_stag, const int nox=2, const int noy=2, const int noz=2, amrex::Real const *stencil_coeffs_x=nullptr, amrex::Real const *stencil_coeffs_y=nullptr, amrex::Real const *stencil_coeffs_z=nullptr)
 Arbitrary-order interpolation function used to center a given MultiFab between two grids with different staggerings. The arbitrary-order interpolation is based on the Fornberg coefficients. The result is stored in the output array dst_arr.
 

Function Documentation

◆ warpx_interp() [1/4]

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp ( const int j,
const int k,
const int l,
amrex::Array4< amrex::Real > const & dst_arr,
amrex::Array4< amrex::Real const > const & src_arr,
const amrex::IntVect & dst_stag,
const amrex::IntVect & src_stag,
const int nox = 2,
const int noy = 2,
const int noz = 2,
amrex::Real const * stencil_coeffs_x = nullptr,
amrex::Real const * stencil_coeffs_y = nullptr,
amrex::Real const * stencil_coeffs_z = nullptr )

Arbitrary-order interpolation function used to center a given MultiFab between two grids with different staggerings. The arbitrary-order interpolation is based on the Fornberg coefficients. The result is stored in the output array dst_arr.

Parameters
[in]jindex along x of the output array
[in]kindex along y (in 3D) or z (in 2D) of the output array
[in]lindex along z (in 3D, l = 0 in 2D) of the output array
[in,out]dst_arroutput array where interpolated values are stored
[in]src_arrinput array storing the values used for interpolation
[in]dst_stagIndexType of the output array
[in]src_stagIndexType of the input array
[in]noxorder of finite-order centering along x
[in]noyorder of finite-order centering along y
[in]nozorder of finite-order centering along z
[in]stencil_coeffs_xarray of ordered Fornberg coefficients for finite-order centering stencil along x
[in]stencil_coeffs_yarray of ordered Fornberg coefficients for finite-order centering stencil along y
[in]stencil_coeffs_zarray of ordered Fornberg coefficients for finite-order centering stencil along z

◆ warpx_interp() [2/4]

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp ( int j,
int k,
int l,
amrex::Array4< amrex::Real > const & arr_aux,
amrex::Array4< amrex::Real const > const & arr_fine,
amrex::Array4< amrex::Real const > const & arr_coarse,
amrex::Array4< amrex::Real const > const & arr_tmp,
const amrex::IntVect & arr_fine_stag,
const amrex::IntVect & arr_coarse_stag,
const amrex::IntVect & rr )

Interpolation function called within WarpX::UpdateAuxilaryDataStagToNodal to interpolate data from the coarse and fine grids to the fine aux grid, with momentum-conserving field gathering, hence between grids with different staggering, and assuming that the aux grid is collocated.

Parameters
[in]jindex along x of the output array
[in]kindex along y (in 3D) or z (in 2D) of the output array
[in]lindex along z (in 3D, l=0 in 2D) of the output array
[in,out]arr_auxoutput array where interpolated values are stored
[in]arr_fineinput fine-patch array storing the values to interpolate
[in]arr_coarseinput coarse-patch array storing the values to interpolate
[in]arr_tmptemporary array to store a copy of the 'aux' MultiFab with given guard cells
[in]arr_fine_stagIndexType of the fine-patch arrays
[in]arr_coarse_stagIndexType of the coarse-patch arrays
[in]rrmesh refinement ratios along each direction

◆ warpx_interp() [3/4]

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp ( int j,
int k,
int l,
amrex::Array4< amrex::Real > const & arr_aux,
amrex::Array4< amrex::Real const > const & arr_fine,
amrex::Array4< amrex::Real const > const & arr_coarse,
const amrex::IntVect & arr_stag,
const amrex::IntVect & rr )

Interpolation function called within WarpX::UpdateAuxilaryDataSameType with electromagnetic solver to interpolate data from the coarse and fine grids to the fine aux grid, assuming that all grids have the same staggering (either collocated or staggered).

Parameters
[in]jindex along x of the output array
[in]kindex along y (in 3D) or z (in 2D) of the output array
[in]lindex along z (in 3D, l=0 in 2D) of the output array
[in,out]arr_auxoutput array where interpolated values are stored
[in]arr_fineinput fine-patch array storing the values to interpolate
[in]arr_coarseinput coarse-patch array storing the values to interpolate
[in]arr_stagIndexType of the arrays
[in]rrmesh refinement ratios along each direction

◆ warpx_interp() [4/4]

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void warpx_interp ( int j,
int k,
int l,
amrex::Array4< amrex::Real > const & arr_aux,
amrex::Array4< amrex::Real const > const & arr_fine,
const amrex::IntVect & arr_fine_stag )

Interpolation function called within WarpX::UpdateAuxilaryDataStagToNodal to interpolate data from the coarse and fine grids to the fine aux grid, with momentum-conserving field gathering, hence between grids with different staggering, and assuming that the aux grid is collocated.

Parameters
[in]jindex along x of the output array
[in]kindex along y (in 3D) or z (in 2D) of the output array
[in]lindex along z (in 3D, l=0 in 2D) of the output array
[in,out]arr_auxoutput array where interpolated values are stored
[in]arr_fineinput fine-patch array storing the values to interpolate
[in]arr_fine_stagIndexType of the fine-patch arrays