WarpX
Functions
WarpXUtilAlgo Namespace Reference

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void getCellCoordinates (int i, int j, int k, amrex::GpuArray< int, 3 > const mf_type, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const domain_lo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const dx, amrex::Real &x, amrex::Real &y, amrex::Real &z)
 Compute physical coordinates (x,y,z) that correspond to a given (i,j,k) and the corresponding staggering, mf_type. More...
 

Function Documentation

◆ getCellCoordinates()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void WarpXUtilAlgo::getCellCoordinates ( int  i,
int  j,
int  k,
amrex::GpuArray< int, 3 > const  mf_type,
amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const  domain_lo,
amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const  dx,
amrex::Real &  x,
amrex::Real &  y,
amrex::Real &  z 
)

Compute physical coordinates (x,y,z) that correspond to a given (i,j,k) and the corresponding staggering, mf_type.

Parameters
[in]iindex along x
[in]jindex along y
[in]kindex along z
[in]mf_typeGpuArray containing the staggering type to convert (i,j,k) to (x,y,z)
[in]domain_loPhysical coordinates of the lowest corner of the simulation domain
[in]dxCell size of the simulation domain
[out]xphysical coordinate along x
[out]yphysical coordinate along y
[out]zphysical coordinate along z