WarpX
Loading...
Searching...
No Matches
CylindricalYeeAlgorithm Struct Reference

#include <CylindricalYeeAlgorithm.H>

Static Public Member Functions

static void InitializeStencilCoefficients (std::array< amrex::Real, 3 > &cell_size, amrex::Vector< amrex::Real > &stencil_coefs_r, amrex::Vector< amrex::Real > &stencil_coefs_z)
 
static amrex::Real ComputeMaxDt (amrex::Real const *const dx, int const n_rz_azimuthal_modes)
 
static amrex::IntVect GetMaxGuardCell ()
 Returns maximum number of guard cells required by the field-solve.
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real UpwardDrr_over_r (amrex::Array4< amrex::Real const > const &F, amrex::Real const r, amrex::Real const dr, amrex::Real const *const coefs_r, int const n_coefs_r, int const i, int const j, int const k, int const comp)
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real DownwardDrr_over_r (amrex::Array4< amrex::Real const > const &F, amrex::Real const r, amrex::Real const dr, amrex::Real const *const coefs_r, int const n_coefs_r, int const i, int const j, int const k, int const comp)
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real UpwardDr (amrex::Array4< amrex::Real const > const &F, amrex::Real const *const coefs_r, int const n_coefs_r, int const i, int const j, int const k, int const comp)
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real DownwardDr (amrex::Array4< amrex::Real const > const &F, amrex::Real const *const coefs_r, int const n_coefs_r, int const i, int const j, int const k, int const comp)
 
template<typename T_Field>
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real Dr_rDr_over_r (T_Field const &F, amrex::Real const r, amrex::Real const dr, amrex::Real const *const coefs_r, int const, int const i, int const j, int const k, int const comp)
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real UpwardDz (amrex::Array4< amrex::Real const > const &F, amrex::Real const *const coefs_z, int const n_coefs_z, int const i, int const j, int const k, int const comp)
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real DownwardDz (amrex::Array4< amrex::Real const > const &F, amrex::Real const *const coefs_z, int const n_coefs_z, int const i, int const j, int const k, int const comp)
 
template<typename T_Field>
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real Dzz (T_Field const &F, amrex::Real const *const coefs_z, int const, int const i, int const j, int const k, int const ncomp=0)
 

Detailed Description

This struct contains only static functions to initialize the stencil coefficients and to compute finite-difference derivatives for the Cylindrical Yee algorithm.

Member Function Documentation

◆ ComputeMaxDt()

static amrex::Real CylindricalYeeAlgorithm::ComputeMaxDt ( amrex::Real const *const dx,
int const n_rz_azimuthal_modes )
inlinestatic

Compute the maximum, CFL-stable timestep

Compute the maximum timestep, for which the scheme remains stable under the Courant-Friedrichs-Levy limit.

◆ DownwardDr()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::DownwardDr ( amrex::Array4< amrex::Real const > const & F,
amrex::Real const *const coefs_r,
int const n_coefs_r,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Perform derivative along r on a nodal grid, from a cell-centered field F

◆ DownwardDrr_over_r()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::DownwardDrr_over_r ( amrex::Array4< amrex::Real const > const & F,
amrex::Real const r,
amrex::Real const dr,
amrex::Real const *const coefs_r,
int const n_coefs_r,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Applies the differential operator 1/r * d(rF)/dr, where F is on a cell-centered grid in r and the differential operator is evaluated on a nodal grid. The input parameter r is given at the cell-centered position

◆ DownwardDz()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::DownwardDz ( amrex::Array4< amrex::Real const > const & F,
amrex::Real const *const coefs_z,
int const n_coefs_z,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Perform derivative along z on a nodal grid, from a cell-centered field F

◆ Dr_rDr_over_r()

template<typename T_Field>
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::Dr_rDr_over_r ( T_Field const & F,
amrex::Real const r,
amrex::Real const dr,
amrex::Real const *const coefs_r,
int const ,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Applies the differential operator 1/r * d(r * dF/dr)/dr, where F is on a cell-centered or a nodal grid in r The input parameter r is given at the cell-centered position

◆ Dzz()

template<typename T_Field>
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::Dzz ( T_Field const & F,
amrex::Real const *const coefs_z,
int const ,
int const i,
int const j,
int const k,
int const ncomp = 0 )
inlinestatic

Perform second derivative along z on a cell-centered field F

◆ GetMaxGuardCell()

static amrex::IntVect CylindricalYeeAlgorithm::GetMaxGuardCell ( )
inlinestatic

Returns maximum number of guard cells required by the field-solve.

◆ InitializeStencilCoefficients()

static void CylindricalYeeAlgorithm::InitializeStencilCoefficients ( std::array< amrex::Real, 3 > & cell_size,
amrex::Vector< amrex::Real > & stencil_coefs_r,
amrex::Vector< amrex::Real > & stencil_coefs_z )
inlinestatic

◆ UpwardDr()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::UpwardDr ( amrex::Array4< amrex::Real const > const & F,
amrex::Real const *const coefs_r,
int const n_coefs_r,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Perform derivative along r on a cell-centered grid, from a nodal field F

◆ UpwardDrr_over_r()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::UpwardDrr_over_r ( amrex::Array4< amrex::Real const > const & F,
amrex::Real const r,
amrex::Real const dr,
amrex::Real const *const coefs_r,
int const n_coefs_r,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Applies the differential operator 1/r * d(rF)/dr, where F is on a nodal grid in r and the differential operator is evaluated on a cell-centered grid. The input parameter r is given at the cell-centered position

◆ UpwardDz()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real CylindricalYeeAlgorithm::UpwardDz ( amrex::Array4< amrex::Real const > const & F,
amrex::Real const *const coefs_z,
int const n_coefs_z,
int const i,
int const j,
int const k,
int const comp )
inlinestatic

Perform derivative along z on a cell-centered grid, from a nodal field F


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