WarpX
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
WarpX Class Reference

#include <WarpX.H>

Inheritance diagram for WarpX:
amrex::AmrCore amrex::AmrMesh amrex::AmrInfo

Public Member Functions

 WarpX ()
 
 ~WarpX ()
 
int Verbose () const
 
void InitData ()
 
void Evolve (int numsteps=-1)
 
MultiParticleContainerGetPartContainer ()
 
MacroscopicPropertiesGetMacroscopicProperties ()
 
ParticleBoundaryBufferGetParticleBoundaryBuffer ()
 
std::array< const amrex::MultiFab *const, 3 > get_array_Bfield_aux (const int lev) const
 
std::array< const amrex::MultiFab *const, 3 > get_array_Efield_aux (const int lev) const
 
amrex::MultiFabget_pointer_Efield_aux (int lev, int direction) const
 
amrex::MultiFabget_pointer_Bfield_aux (int lev, int direction) const
 
amrex::MultiFabget_pointer_Efield_fp (int lev, int direction) const
 
amrex::MultiFabget_pointer_Bfield_fp (int lev, int direction) const
 
amrex::MultiFabget_pointer_current_fp (int lev, int direction) const
 
amrex::MultiFabget_pointer_rho_fp (int lev) const
 
amrex::MultiFabget_pointer_F_fp (int lev) const
 
amrex::MultiFabget_pointer_G_fp (int lev) const
 
amrex::MultiFabget_pointer_phi_fp (int lev) const
 
amrex::MultiFabget_pointer_Efield_cp (int lev, int direction) const
 
amrex::MultiFabget_pointer_Bfield_cp (int lev, int direction) const
 
amrex::MultiFabget_pointer_current_cp (int lev, int direction) const
 
amrex::MultiFabget_pointer_rho_cp (int lev) const
 
amrex::MultiFabget_pointer_F_cp (int lev) const
 
amrex::MultiFabget_pointer_G_cp (int lev) const
 
amrex::MultiFabget_pointer_edge_lengths (int lev, int direction) const
 
amrex::MultiFabget_pointer_face_areas (int lev, int direction) const
 
const amrex::MultiFabgetEfield (int lev, int direction)
 
const amrex::MultiFabgetBfield (int lev, int direction)
 
const amrex::MultiFabgetcurrent_cp (int lev, int direction)
 
const amrex::MultiFabgetEfield_cp (int lev, int direction)
 
const amrex::MultiFabgetBfield_cp (int lev, int direction)
 
const amrex::MultiFabgetrho_cp (int lev)
 
const amrex::MultiFabgetF_cp (int lev)
 
const amrex::MultiFabgetG_cp (int lev)
 
const amrex::MultiFabgetcurrent_fp (int lev, int direction)
 
const amrex::MultiFabgetEfield_fp (int lev, int direction)
 
const amrex::MultiFabgetBfield_fp (int lev, int direction)
 
const amrex::MultiFabgetrho_fp (int lev)
 
const amrex::MultiFabgetphi_fp (int lev)
 
const amrex::MultiFabgetF_fp (int lev)
 
const amrex::MultiFabgetG_fp (int lev)
 
const amrex::MultiFabgetEfield_avg_fp (int lev, int direction)
 
const amrex::MultiFabgetBfield_avg_fp (int lev, int direction)
 
const amrex::MultiFabgetEfield_avg_cp (int lev, int direction)
 
const amrex::MultiFabgetBfield_avg_cp (int lev, int direction)
 
bool DoPML () const
 
const PML_RZgetPMLRZ ()
 
std::vector< bool > getPMLdirections () const
 
void setLoadBalanceEfficiency (const int lev, const amrex::Real efficiency)
 
amrex::Real getLoadBalanceEfficiency (const int lev)
 
void applyMirrors (amrex::Real time)
 
void ComputeDt ()
 
void PrintMainPICparameters ()
 
void WriteUsedInputsFile () const
 
void PrintDtDxDyDz ()
 
void ComputeMaxStep ()
 Compute the last timestep of the simulation and make max_step and stop_time self-consistent. Calls computeMaxStepBoostAccelerator() if required. More...
 
void computeMaxStepBoostAccelerator (const amrex::Geometry &geom)
 
int MoveWindow (const int step, bool move_j)
 Move the moving window. More...
 
void ShiftGalileanBoundary ()
 This function shifts the boundary of the grid by 'm_v_galilean*dt'. In doding so, only positions attributes are changed while fields remain unchanged. More...
 
void UpdatePlasmaInjectionPosition (amrex::Real dt)
 
void ResetProbDomain (const amrex::RealBox &rb)
 
void EvolveE (amrex::Real dt)
 
void EvolveE (int lev, amrex::Real dt)
 
void EvolveB (amrex::Real dt, DtType dt_type)
 
void EvolveB (int lev, amrex::Real dt, DtType dt_type)
 
void EvolveF (amrex::Real dt, DtType dt_type)
 
void EvolveF (int lev, amrex::Real dt, DtType dt_type)
 
void EvolveG (amrex::Real dt, DtType dt_type)
 
void EvolveG (int lev, amrex::Real dt, DtType dt_type)
 
void EvolveB (int lev, PatchType patch_type, amrex::Real dt, DtType dt_type)
 
void EvolveE (int lev, PatchType patch_type, amrex::Real dt)
 
void EvolveF (int lev, PatchType patch_type, amrex::Real dt, DtType dt_type)
 
void EvolveG (int lev, PatchType patch_type, amrex::Real dt, DtType dt_type)
 
void MacroscopicEvolveE (amrex::Real dt)
 
void MacroscopicEvolveE (int lev, amrex::Real dt)
 
void MacroscopicEvolveE (int lev, PatchType patch_type, amrex::Real dt)
 
void Hybrid_QED_Push (amrex::Vector< amrex::Real > dt)
 
void Hybrid_QED_Push (int lev, amrex::Real dt)
 
void Hybrid_QED_Push (int lev, PatchType patch_type, amrex::Real dt)
 
void LoadBalance ()
 perform load balance; compute and communicate new amrex::DistributionMapping More...
 
void ResetCosts ()
 resets costs to zero More...
 
utils::parser::IntervalsParser get_load_balance_intervals () const
 returns the load balance interval More...
 
void DampFieldsInGuards (const int lev, const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &Efield, const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &Bfield)
 Private function for spectral solver Applies a damping factor in the guards cells that extend beyond the extent of the domain, reducing fluctuations that can appear in parallel simulations. This will be called when FieldBoundaryType is set to damped. Vector version. More...
 
void DampFieldsInGuards (const int lev, std::unique_ptr< amrex::MultiFab > &mf)
 Private function for spectral solver Applies a damping factor in the guards cells that extend beyond the extent of the domain, reducing fluctuations that can appear in parallel simulations. This will be called when FieldBoundaryType is set to damped. Scalar version. More...
 
void ApplyInverseVolumeScalingToCurrentDensity (amrex::MultiFab *Jx, amrex::MultiFab *Jy, amrex::MultiFab *Jz, int lev)
 
void ApplyInverseVolumeScalingToChargeDensity (amrex::MultiFab *Rho, int lev)
 
void ApplyEfieldBoundary (const int lev, PatchType patch_type)
 
void ApplyBfieldBoundary (const int lev, PatchType patch_type, DtType dt_type)
 
void DampPML ()
 
void DampPML (const int lev)
 
void DampPML (const int lev, PatchType patch_type)
 
void DampPML_Cartesian (const int lev, PatchType patch_type)
 
void DampJPML ()
 
void DampJPML (int lev)
 
void DampJPML (int lev, PatchType patch_type)
 
void CopyJPML ()
 Copy the current J from the regular grid to the PML. More...
 
bool isAnyBoundaryPML ()
 
void NodalSyncPML ()
 Synchronize the nodal points of the PML MultiFabs. More...
 
void NodalSyncPML (int lev)
 Synchronize the nodal points of the PML MultiFabs for given MR level. More...
 
void NodalSyncPML (int lev, PatchType patch_type)
 Synchronize the nodal points of the PML MultiFabs for given MR level and patch. More...
 
PMLGetPML (int lev)
 
PML_RZGetPML_RZ (int lev)
 
void doFieldIonization ()
 
void doFieldIonization (int lev)
 
void doQEDEvents ()
 
void doQEDEvents (int lev)
 
void PushParticlesandDepose (int lev, amrex::Real cur_time, DtType a_dt_type=DtType::Full, bool skip_current=false)
 
void PushParticlesandDepose (amrex::Real cur_time, bool skip_current=false)
 
void UpdateAuxilaryData ()
 
void UpdateAuxilaryDataStagToNodal ()
 
void UpdateAuxilaryDataSameType ()
 
void UpdateCurrentNodalToStag (amrex::MultiFab &dst, amrex::MultiFab const &src)
 This function is called if warpx.do_current_centering = 1 and it centers the currents from a nodal grid to a staggered grid (Yee) using finite-order interpolation based on the Fornberg coefficients. More...
 
void FillBoundaryB (amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryE (amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryB_avg (amrex::IntVect ng)
 
void FillBoundaryE_avg (amrex::IntVect ng)
 
void FillBoundaryF (amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryG (amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryAux (amrex::IntVect ng)
 
void FillBoundaryE (int lev, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryB (int lev, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryE_avg (int lev, amrex::IntVect ng)
 
void FillBoundaryB_avg (int lev, amrex::IntVect ng)
 
void FillBoundaryF (int lev, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryG (int lev, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryAux (int lev, amrex::IntVect ng)
 
void SyncCurrentAndRho ()
 Synchronize J and rho: filter (if used), exchange guard cells, interpolate across MR levels. Contains separate calls to WarpX::SyncCurrent and WarpX::SyncRho. More...
 
void SyncCurrent (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_cp)
 Apply filter and sum guard cells across MR levels. If current centering is used, center the current from a nodal grid to a staggered grid. For each MR level beyond level 0, interpolate the fine-patch current onto the coarse-patch current at the same level. Then, for each MR level, including level 0, apply filter and sum guard cells across levels. More...
 
void SyncRho ()
 
amrex::Vector< intgetnsubsteps () const
 
int getnsubsteps (int lev) const
 
amrex::Vector< intgetistep () const
 
int getistep (int lev) const
 
void setistep (int lev, int ii)
 
amrex::Vector< amrex::Real > gett_old () const
 
amrex::Real gett_old (int lev) const
 
amrex::Vector< amrex::Real > gett_new () const
 
amrex::Real gett_new (int lev) const
 
void sett_new (int lev, amrex::Real time)
 
amrex::Vector< amrex::Real > getdt () const
 
amrex::Real getdt (int lev) const
 
int getdo_moving_window () const
 
amrex::Real getmoving_window_x () const
 
amrex::Real getcurrent_injection_position () const
 
bool getis_synchronized () const
 
int maxStep () const
 
amrex::Real stopTime () const
 
void AverageAndPackFields (amrex::Vector< std::string > &varnames, amrex::Vector< amrex::MultiFab > &mf_avg, const amrex::IntVect ngrow) const
 
void prepareFields (int const step, amrex::Vector< std::string > &varnames, amrex::Vector< amrex::MultiFab > &mf_avg, amrex::Vector< const amrex::MultiFab *> &output_mf, amrex::Vector< amrex::Geometry > &output_geom) const
 
amrex::RealBox getSliceRealBox () const
 
void ComputeDivE (amrex::MultiFab &divE, const int lev)
 
const amrex::IntVect getngEB () const
 
const amrex::IntVect getngF () const
 
const amrex::IntVect getngUpdateAux () const
 
const amrex::IntVect get_ng_depos_J () const
 
const amrex::IntVect get_ng_depos_rho () const
 
const amrex::IntVect get_ng_fieldgather () const
 
const amrex::IntVect get_numprocs () const
 
void ComputeSpaceChargeField (bool const reset_fields)
 
void AddBoundaryField ()
 
void AddSpaceChargeField (WarpXParticleContainer &pc)
 
void AddSpaceChargeFieldLabFrame ()
 
void computePhi (const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &rho, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &phi, std::array< amrex::Real, 3 > const beta={{0, 0, 0}}, amrex::Real const required_precision=amrex::Real(1.e-11), amrex::Real absolute_tolerance=amrex::Real(0.0), const int max_iters=200, const int verbosity=2) const
 
void setPhiBC (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &phi) const
 
void computeE (amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &E, const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &phi, std::array< amrex::Real, 3 > const beta={{0, 0, 0}}) const
 
void computeB (amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &B, const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &phi, std::array< amrex::Real, 3 > const beta={{0, 0, 0}}) const
 
void computePhiTriDiagonal (const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &rho, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &phi) const
 
void InitializeExternalFieldsOnGridUsingParser (amrex::MultiFab *mfx, amrex::MultiFab *mfy, amrex::MultiFab *mfz, amrex::ParserExecutor< 3 > const &xfield_parser, amrex::ParserExecutor< 3 > const &yfield_parser, amrex::ParserExecutor< 3 > const &zfield_parser, std::array< std::unique_ptr< amrex::MultiFab >, 3 > const &edge_lengths, std::array< std::unique_ptr< amrex::MultiFab >, 3 > const &face_areas, const char field, const int lev)
 This function initializes the E and B fields on each level using the parser and the user-defined function for the external fields. The subroutine will parse the x_/y_z_external_grid_function and then, the field multifab is initialized based on the (x,y,z) position on the staggered yee-grid or cell-centered grid, in the interior cells and guard cells. More...
 
void InitializeEBGridData (int lev)
 This function initializes and calculates grid quantities used along with EBs such as edge lengths, face areas, distance to EB, etc. It also appropriately communicates EB data to guard cells. More...
 
void ComputeCostsHeuristic (amrex::Vector< std::unique_ptr< amrex::LayoutData< amrex::Real > > > &costs)
 adds particle and cell contributions in cells to compute heuristic cost in each box on each level, and records in costs More...
 
void ApplyFilterandSumBoundaryRho (int lev, int glev, amrex::MultiFab &rho, int icomp, int ncomp)
 
virtual void ErrorEst (int lev, amrex::TagBoxArray &tags, amrex::Real time, int) final
 Tagging cells for refinement. More...
 
void InitEB ()
 
void ComputeDistanceToEB ()
 Compute the length of the mesh edges. Here the length is a value in [0, 1]. An edge of length 0 is fully covered. More...
 
amrex::Array1D< int, 0, 2 > CountExtFaces ()
 Auxiliary function to count the amount of faces which still need to be extended. More...
 
void ComputeFaceExtensions ()
 Main function computing the cell extension. Where possible it computes one-way extensions and, when this is not possible, it does eight-ways extensions. More...
 
void InitBorrowing ()
 Initialize the memory for the FaceInfoBoxes. More...
 
void ShrinkBorrowing ()
 Shrink the vectors in the FaceInfoBoxes. More...
 
void ComputeOneWayExtensions ()
 Do the one-way extension. More...
 
void ComputeEightWaysExtensions ()
 Do the eight-ways extension. More...
 
void ApplyBCKCorrection (const int idim)
 Whenever an unstable cell cannot be extended we increase its area to be the minimal for stability. This is the method Benkler-Chavannes-Kuster method and it is less accurate than the regular ECT but it still works better than staircasing. (see https://ieeexplore.ieee.org/document/1638381) More...
 
void PSATDSubtractCurrentPartialSumsAvg ()
 Subtract the average of the cumulative sums of the preliminary current D from the current J (computed from D according to the Vay deposition scheme) More...
 
SpectralSolverRZget_spectral_solver_fp (int lev)
 
- Public Member Functions inherited from amrex::AmrCore
 AmrCore ()
 
 AmrCore (const RealBox *rb, int max_level_in, const Vector< int > &n_cell_in, int coord=-1, Vector< IntVect > ref_ratios=Vector< IntVect >(), const int *is_per=nullptr)
 
 AmrCore (const RealBox &rb, int max_level_in, const Vector< int > &n_cell_in, int coord, Vector< IntVect > const &ref_ratios, Array< int, AMREX_SPACEDIM > const &is_per)
 
 AmrCore (Geometry const &level_0_geom, AmrInfo const &amr_info)
 
 AmrCore (AmrCore &&rhs)
 
AmrCoreoperator= (AmrCore &&rhs)
 
 AmrCore (const AmrCore &rhs)=delete
 
AmrCoreoperator= (const AmrCore &rhs)=delete
 
virtual ~AmrCore ()
 
void InitFromScratch (Real time)
 
virtual void regrid (int lbase, Real time, bool initial=false)
 
void printGridSummary (std::ostream &os, int min_lev, int max_lev) const noexcept
 
- Public Member Functions inherited from amrex::AmrMesh
 AmrMesh ()
 
 AmrMesh (const RealBox *rb, int max_level_in, const Vector< int > &n_cell_in, int coord=-1, Vector< IntVect > refrat=Vector< IntVect >(), const int *is_per=nullptr)
 
 AmrMesh (const RealBox &rb, int max_level_in, const Vector< int > &n_cell_in, int coord, Vector< IntVect > const &ref_ratios, Array< int, AMREX_SPACEDIM > const &is_per)
 
 AmrMesh (Geometry const &level_0_geom, AmrInfo const &amr_info)
 
 AmrMesh (const AmrMesh &rhs)=delete
 
AmrMeshoperator= (const AmrMesh &rhs)=delete
 
 AmrMesh (AmrMesh &&rhs)=default
 
AmrMeshoperator= (AmrMesh &&rhs)=default
 
virtual ~AmrMesh ()=default
 
int Verbose () const noexcept
 
int maxLevel () const noexcept
 
int finestLevel () const noexcept
 
IntVect refRatio (int lev) const noexcept
 
int MaxRefRatio (int lev) const noexcept
 
const Vector< IntVect > & refRatio () const noexcept
 
const Vector< Geometry > & Geom () const noexcept
 
const Vector< DistributionMapping > & DistributionMap () const noexcept
 
const Vector< BoxArray > & boxArray () const noexcept
 
const GeometryGeom (int lev) const noexcept
 
const DistributionMappingDistributionMap (int lev) const noexcept
 
const BoxArrayboxArray (int lev) const noexcept
 
Vector< GeometryGeom (int a_coarsest_lev, int a_finest_lev) const noexcept
 
Vector< BoxArrayboxArray (int a_coarsest_lev, int a_finest_lev) const noexcept
 
Vector< DistributionMappingDistributionMap (int a_coarsest_lev, int a_finest_lev) const noexcept
 
Vector< Geometry > & Geom () noexcept
 
GeometryGeom (int lev) noexcept
 
void SetMaxGridSize (int new_mgs) noexcept
 
void SetMaxGridSize (const IntVect &new_mgs) noexcept
 
void SetMaxGridSize (const Vector< int > &new_mgs) noexcept
 
void SetMaxGridSize (const Vector< IntVect > &new_mgs) noexcept
 
void SetBlockingFactor (int new_bf) noexcept
 
void SetBlockingFactor (const IntVect &new_bf) noexcept
 
void SetBlockingFactor (const Vector< int > &new_bf) noexcept
 
void SetBlockingFactor (const Vector< IntVect > &new_bf) noexcept
 
void SetGridEff (Real eff) noexcept
 
void SetNProper (int n) noexcept
 
void SetFinestLevel (int new_finest_level) noexcept
 
void SetDistributionMap (int lev, const DistributionMapping &dmap_in) noexcept
 
void SetBoxArray (int lev, const BoxArray &ba_in) noexcept
 
void SetGeometry (int lev, const Geometry &geom_in) noexcept
 
int GetLevel (Box const &domain) noexcept
 
void ClearDistributionMap (int lev) noexcept
 
void ClearBoxArray (int lev) noexcept
 
int nErrorBuf (int lev, int direction=0) const noexcept
 
const IntVectnErrorBufVect (int lev) const noexcept
 
Real gridEff () const noexcept
 
int nProper () const noexcept
 
const IntVectblockingFactor (int lev) const noexcept
 
const IntVectmaxGridSize (int lev) const noexcept
 
bool LevelDefined (int lev) noexcept
 
bool useFixedCoarseGrids () const noexcept
 
int useFixedUpToLevel () const noexcept
 
void ChopGrids (int lev, BoxArray &ba, int target_size) const
 
BoxArray MakeBaseGrids () const
 
void MakeNewGrids (int lbase, Real time, int &new_finest, Vector< BoxArray > &new_grids)
 
void MakeNewGrids (Real time=0.0)
 
virtual void ManualTagsPlacement (int, TagBoxArray &, const Vector< IntVect > &)
 
virtual BoxArray GetAreaNotToTag (int)
 
long CountCells (int lev) noexcept
 

Static Public Member Functions

static WarpXGetInstance ()
 
static void ResetInstance ()
 
static std::string Version ()
 Version of WarpX executable. More...
 
static std::string PicsarVersion ()
 Version of PICSAR dependency. More...
 
static void shiftMF (amrex::MultiFab &mf, const amrex::Geometry &geom, int num_shift, int dir, const int lev, bool update_cost_flag, amrex::Real external_field=0.0, bool useparser=false, amrex::ParserExecutor< 3 > const &field_parser={})
 
static void GotoNextLine (std::istream &is)
 
static amrex::LayoutData< amrex::Real > * getCosts (int lev)
 
static std::array< amrex::Real, 3 > CellSize (int lev)
 
static amrex::RealBox getRealBox (const amrex::Box &bx, int lev)
 
static std::array< amrex::Real, 3 > LowerCorner (const amrex::Box &bx, const int lev, const amrex::Real time_shift_delta)
 Return the lower corner of the box in real units. More...
 
static std::array< amrex::Real, 3 > UpperCorner (const amrex::Box &bx, const int lev, const amrex::Real time_shift_delta)
 Return the upper corner of the box in real units. More...
 
static amrex::IntVect RefRatio (int lev)
 
static const amrex::iMultiFabCurrentBufferMasks (int lev)
 
static const amrex::iMultiFabGatherBufferMasks (int lev)
 
static int moving_window_active (int const step)
 
static void ComputeDivB (amrex::MultiFab &divB, int const dcomp, const std::array< const amrex::MultiFab *const, 3 > &B, const std::array< amrex::Real, 3 > &dx)
 
static void ComputeDivB (amrex::MultiFab &divB, int const dcomp, const std::array< const amrex::MultiFab *const, 3 > &B, const std::array< amrex::Real, 3 > &dx, amrex::IntVect const ngrow)
 
static amrex::Vector< amrex::Real > getFornbergStencilCoefficients (const int n_order, const bool nodal)
 Returns an array of coefficients (Fornberg coefficients), corresponding to the weight of each point in a finite-difference approximation of a derivative (up to order n_order). More...
 

Public Attributes

std::unique_ptr< amrex::ParserBxfield_parser
 User-defined parser to initialize x-component of the magnetic field on the grid. More...
 
std::unique_ptr< amrex::ParserByfield_parser
 User-defined parser to initialize y-component of the magnetic field on the grid. More...
 
std::unique_ptr< amrex::ParserBzfield_parser
 User-defined parser to initialize z-component of the magnetic field on the grid. More...
 
std::unique_ptr< amrex::ParserExfield_parser
 User-defined parser to initialize x-component of the electric field on the grid. More...
 
std::unique_ptr< amrex::ParserEyfield_parser
 User-defined parser to initialize y-component of the electric field on the grid. More...
 
std::unique_ptr< amrex::ParserEzfield_parser
 User-defined parser to initialize z-component of the electric field on the grid. More...
 
bool current_correction
 If true, a correction is applied to the current in Fourier space,. More...
 
bool update_with_rho = false
 
amrex::IntVect m_rho_nodal_flag
 
BilinearFilter bilinear_filter
 
amrex::Vector< std::unique_ptr< NCIGodfreyFilter > > nci_godfrey_filter_exeybz
 
amrex::Vector< std::unique_ptr< NCIGodfreyFilter > > nci_godfrey_filter_bxbyez
 
amrex::Real time_of_last_gal_shift = 0
 
amrex::Vector< amrex::Real > m_v_galilean = amrex::Vector<amrex::Real>(3, amrex::Real(0.))
 
amrex::Array< amrex::Real, 3 > m_galilean_shift = {{0}}
 
amrex::Vector< amrex::Real > m_v_comoving = amrex::Vector<amrex::Real>(3, amrex::Real(0.))
 
amrex::Vector< amrex::Real > mirror_z
 
amrex::Vector< amrex::Real > mirror_z_width
 
amrex::Vector< intmirror_z_npoints
 
std::unique_ptr< MultiReducedDiagsreduced_diags
 object with all reduced diagnotics, similar to MultiParticleContainer for species. More...
 
ElectrostaticSolver::PoissonBoundaryHandler m_poisson_boundary_handler
 
amrex::Gpu::DeviceVector< amrex::Real > device_field_centering_stencil_coeffs_x
 
amrex::Gpu::DeviceVector< amrex::Real > device_field_centering_stencil_coeffs_y
 
amrex::Gpu::DeviceVector< amrex::Real > device_field_centering_stencil_coeffs_z
 
amrex::Gpu::DeviceVector< amrex::Real > device_current_centering_stencil_coeffs_x
 
amrex::Gpu::DeviceVector< amrex::Real > device_current_centering_stencil_coeffs_y
 
amrex::Gpu::DeviceVector< amrex::Real > device_current_centering_stencil_coeffs_z
 

Static Public Attributes

static std::string authors = ""
 Author of an input file / simulation setup. More...
 
static amrex::Vector< amrex::Real > E_external_grid
 Initial electric field on the grid. More...
 
static amrex::Vector< amrex::Real > B_external_grid
 Initial magnetic field on the grid. More...
 
static std::string B_ext_grid_s = "default"
 Initialization type for external magnetic field on the grid. More...
 
static std::string E_ext_grid_s = "default"
 Initialization type for external electric field on the grid. More...
 
static std::string str_Bx_ext_grid_function
 String storing parser function to initialize x-component of the magnetic field on the grid. More...
 
static std::string str_By_ext_grid_function
 String storing parser function to initialize y-component of the magnetic field on the grid. More...
 
static std::string str_Bz_ext_grid_function
 String storing parser function to initialize z-component of the magnetic field on the grid. More...
 
static std::string str_Ex_ext_grid_function
 String storing parser function to initialize x-component of the electric field on the grid. More...
 
static std::string str_Ey_ext_grid_function
 String storing parser function to initialize y-component of the electric field on the grid. More...
 
static std::string str_Ez_ext_grid_function
 String storing parser function to initialize z-component of the electric field on the grid. More...
 
static short current_deposition_algo
 Integer that corresponds to the current deposition algorithm (Esirkepov, direct, Vay) More...
 
static short charge_deposition_algo
 Integer that corresponds to the charge deposition algorithm (only standard deposition) More...
 
static short field_gathering_algo
 Integer that corresponds to the field gathering algorithm (energy-conserving, momentum-conserving) More...
 
static short particle_pusher_algo
 Integer that corresponds to the particle push algorithm (Boris, Vay, Higuera-Cary) More...
 
static short maxwell_solver_id
 Integer that corresponds to the type of Maxwell solver (Yee, CKC, PSATD, ECT) More...
 
static short load_balance_costs_update_algo
 
static int em_solver_medium
 Integer that corresponds to electromagnetic Maxwell solver (vaccum - 0, macroscopic - 1) More...
 
static int macroscopic_solver_algo
 
static amrex::Vector< intfield_boundary_lo
 
static amrex::Vector< intfield_boundary_hi
 
static amrex::Vector< ParticleBoundaryTypeparticle_boundary_lo
 
static amrex::Vector< ParticleBoundaryTypeparticle_boundary_hi
 
static short J_in_time
 
static short rho_in_time
 
static bool do_current_centering = false
 
static bool do_single_precision_comms = false
 perform field communications in single precision More...
 
static amrex::IntVect m_fill_guards_fields = amrex::IntVect(0)
 Whether to fill guard cells when computing inverse FFTs of fields. More...
 
static amrex::IntVect m_fill_guards_current = amrex::IntVect(0)
 Whether to fill guard cells when computing inverse FFTs of currents. More...
 
static bool do_dive_cleaning = false
 
static bool do_divb_cleaning = false
 Solve additional Maxwell equation for G in order to control errors in magnetic Gauss' law. More...
 
static int nox = 0
 Order of the particle shape factors (splines) along x. More...
 
static int noy = 0
 Order of the particle shape factors (splines) along y. More...
 
static int noz = 0
 Order of the particle shape factors (splines) along z. More...
 
static int field_centering_nox = 2
 Order of finite centering of fields (from staggered grid to nodal grid), along x. More...
 
static int field_centering_noy = 2
 Order of finite centering of fields (from staggered grid to nodal grid), along y. More...
 
static int field_centering_noz = 2
 Order of finite centering of fields (from staggered grid to nodal grid), along z. More...
 
static int current_centering_nox = 2
 Order of finite centering of currents (from nodal grid to staggered grid), along x. More...
 
static int current_centering_noy = 2
 Order of finite centering of currents (from nodal grid to staggered grid), along y. More...
 
static int current_centering_noz = 2
 Order of finite centering of currents (from nodal grid to staggered grid), along z. More...
 
static int n_rz_azimuthal_modes = 1
 Number of modes for the RZ multi-mode version. More...
 
static int ncomps = 1
 
static bool use_fdtd_nci_corr = false
 
static bool galerkin_interpolation = true
 
static bool use_filter = true
 If true, a bilinear filter is used to smooth charge and currents. More...
 
static bool use_kspace_filter = true
 If true, the bilinear filtering of charge and currents is done in Fourier space. More...
 
static bool use_filter_compensation = false
 If true, a compensation step is added to the bilinear filtering of charge and currents. More...
 
static bool serialize_initial_conditions = false
 If true, the initial conditions from random number generators are serialized (useful for reproducible testing with OpenMP) More...
 
static bool do_back_transformed_diagnostics = false
 
static std::string lab_data_directory = "lab_frame_data"
 Name of the back-transformed diagnostics output directory. More...
 
static int num_snapshots_lab = std::numeric_limits<int>::lowest()
 Number of back-tranformed snapshots in the lab-frame. More...
 
static amrex::Real dt_snapshots_lab = std::numeric_limits<Real>::lowest()
 Time interval in lab-frame between the back-transformed snapshots. More...
 
static bool do_back_transformed_fields = true
 
static bool do_back_transformed_particles = true
 
static amrex::Real gamma_boost = 1._rt
 Lorentz factor of the boosted frame in which a boosted-frame simulation is run. More...
 
static amrex::Real beta_boost = 0._rt
 Beta value corresponding to the Lorentz factor of the boosted frame of the simulation. More...
 
static amrex::Vector< intboost_direction = {0,0,0}
 Direction of the Lorentz transform that defines the boosted frame of the simulation. More...
 
static amrex::Real zmax_plasma_to_compute_max_step = 0._rt
 
static bool do_compute_max_step_from_zmax = false
 
static bool do_dynamic_scheduling = true
 
static bool refine_plasma = false
 
static utils::parser::IntervalsParser sort_intervals
 
static amrex::IntVect sort_bin_size
 
static bool do_subcycling = false
 
static bool do_multi_J = false
 
static int do_multi_J_n_depositions
 
static bool do_device_synchronize = false
 
static bool safe_guard_cells = 0
 
static int n_field_gather_buffer = -1
 
static int n_current_deposition_buffer = -1
 
static bool do_nodal = false
 If true, all fields are evaluated on a nodal grid and all MultiFabs have a nodal index type. More...
 
static amrex::IntVect filter_npass_each_dir
 
static int num_mirrors = 0
 
static amrex::Real quantum_xi_c2 = PhysConst::xi_c2
 
static int do_electrostatic
 
static amrex::Real self_fields_required_precision = 1.e-11_rt
 
static amrex::Real self_fields_absolute_tolerance = 0.0_rt
 
static int self_fields_max_iters = 200
 
static int self_fields_verbosity = 2
 
static int do_moving_window = 0
 
static int start_moving_window_step = 0
 
static int end_moving_window_step = -1
 
static int moving_window_dir = -1
 
static amrex::Real moving_window_v = std::numeric_limits<amrex::Real>::max()
 
static bool fft_do_time_averaging = false
 
static int num_slice_snapshots_lab = 0
 
static amrex::Real dt_slice_snapshots_lab
 
static amrex::Real particle_slice_width_lab = 0.0_rt
 

Protected Member Functions

void InitLevelData (int lev, amrex::Real time)
 This function initializes E, B, rho, and F, at all the levels of the multifab. rho and F are initialized with 0. The E and B fields are initialized using user-defined inputs. The initialization type is set using "B_ext_grid_init_style" and "E_ext_grid_init_style". The initialization style is set to "default" if not explicitly defined by the user, and the E and B fields are initialized with E_external_grid and B_external_grid, respectively, each with a default value of 0. If the initialization type for the E and B field is "constant", then, the E and B fields at all the levels are initialized with user-defined values for E_external_grid and B_external_grid. If the initialization type for B-field is set to "parse_B_ext_grid_function", then, the parser is used to read Bx_external_grid_function(x,y,z), By_external_grid_function(x,y,z), and Bz_external_grid_function(x,y,z). Similarly, if the E-field initialization type is set to "parse_E_ext_grid_function", then, the parser is used to read Ex_external_grid_function(x,y,z), Ey_external_grid_function(x,y,z), and Ex_external_grid_function(x,y,z). The parser for the E and B initialization assumes that the function has three independent variables, at max, namely, x, y, z. However, any number of constants can be used in the function used to define the E and B fields on the grid. More...
 
virtual void PostProcessBaseGrids (amrex::BoxArray &ba0) const final
 
virtual void MakeNewLevelFromScratch (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) final
 
virtual void MakeNewLevelFromCoarse (int, amrex::Real, const amrex::BoxArray &, const amrex::DistributionMapping &) final
 
virtual void RemakeLevel (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) final
 
virtual void ClearLevel (int lev) final
 Delete level data. Called by AmrCore::regrid. More...
 
- Protected Member Functions inherited from amrex::AmrCore
virtual void ErrorEst (int lev, TagBoxArray &tags, Real time, int ngrow) override=0
 
virtual void MakeNewLevelFromScratch (int lev, Real time, const BoxArray &ba, const DistributionMapping &dm) override=0
 
virtual void MakeNewLevelFromCoarse (int lev, Real time, const BoxArray &ba, const DistributionMapping &dm)=0
 
virtual void RemakeLevel (int lev, Real time, const BoxArray &ba, const DistributionMapping &dm)=0
 
- Protected Member Functions inherited from amrex::AmrMesh
void checkInput ()
 
void SetIterateToFalse () noexcept
 
void SetUseNewChop () noexcept
 

Private Member Functions

void HandleSignals ()
 Complete the asynchronous broadcast of signal flags, and initiate a checkpoint if requested. More...
 
void EvolveEM (int numsteps)
 
void FillBoundaryB (const int lev, const PatchType patch_type, const amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryE (const int lev, const PatchType patch_type, const amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryF (int lev, PatchType patch_type, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryG (int lev, PatchType patch_type, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryB_avg (int lev, PatchType patch_type, amrex::IntVect ng)
 
void FillBoundaryE_avg (int lev, PatchType patch_type, amrex::IntVect ng)
 
void OneStep_nosub (amrex::Real t)
 
void OneStep_sub1 (amrex::Real t)
 
void OneStep_multiJ (const amrex::Real t)
 Perform one PIC iteration, with the multiple J deposition per time step. More...
 
void RestrictCurrentFromFineToCoarsePatch (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_cp, const int lev)
 Fills the values of the current on the coarse patch by averaging the values of the current of the fine patch (on the same level). More...
 
void AddCurrentFromFineLevelandSumBoundary (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_cp, const int lev)
 
void StoreCurrent (const int lev)
 
void RestoreCurrent (const int lev)
 
void ApplyFilterJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &current, const int lev, const int idim)
 
void ApplyFilterJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &current, const int lev)
 
void SumBoundaryJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &current, const int lev, const int idim, const amrex::Periodicity &period)
 
void SumBoundaryJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &current, const int lev, const amrex::Periodicity &period)
 
void NodalSyncJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_cp, const int lev, PatchType patch_type)
 
void RestrictRhoFromFineToCoarsePatch (const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_fp, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_cp, const int lev)
 
void ApplyFilterandSumBoundaryRho (const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_fp, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_cp, const int lev, PatchType patch_type, const int icomp, const int ncomp)
 
void AddRhoFromFineLevelandSumBoundary (const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_fp, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_cp, const int lev, const int icomp, const int ncomp)
 
void NodalSyncRho (const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_fp, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_cp, const int lev, PatchType patch_type, const int icomp, const int ncomp)
 
void ReadParameters ()
 
void BackwardCompatibility ()
 
void InitFromScratch ()
 
void AllocLevelData (int lev, const amrex::BoxArray &new_grids, const amrex::DistributionMapping &new_dmap)
 
amrex::DistributionMapping GetRestartDMap (const std::string &chkfile, const amrex::BoxArray &ba, int lev) const
 
void InitFromCheckpoint ()
 
void PostRestart ()
 
void InitPML ()
 
void ComputePMLFactors ()
 
void InitFilter ()
 
void InitDiagnostics ()
 
void InitNCICorrector ()
 
void CheckGuardCells ()
 Check that the number of guard cells is smaller than the number of valid cells, for all available MultiFabs, and abort otherwise. More...
 
void CheckGuardCells (amrex::MultiFab const &mf)
 Check that the number of guard cells is smaller than the number of valid cells, for a given MultiFab, and abort otherwise. More...
 
void CheckKnownIssues ()
 Checks for known numerical issues involving different WarpX modules. More...
 
void PerformanceHints ()
 
std::unique_ptr< amrex::MultiFabGetCellCenteredData ()
 
void BuildBufferMasks ()
 
void BuildBufferMasksInBox (const amrex::Box tbx, amrex::IArrayBox &buffer_mask, const amrex::IArrayBox &guard_mask, const int ng)
 Build buffer mask within given FArrayBox. More...
 
const amrex::iMultiFabgetCurrentBufferMasks (int lev) const
 
const amrex::iMultiFabgetGatherBufferMasks (int lev) const
 
void ReorderFornbergCoefficients (amrex::Vector< amrex::Real > &ordered_coeffs, amrex::Vector< amrex::Real > &unordered_coeffs, const int order)
 Re-orders the Fornberg coefficients so that they can be used more conveniently for finite-order centering operations. For example, for finite-order centering of order 6, the Fornberg coefficients (c_0,c_1,c_2) are re-ordered as (c_2,c_1,c_0,c_0,c_1,c_2). More...
 
void AllocateCenteringCoefficients (amrex::Gpu::DeviceVector< amrex::Real > &device_centering_stencil_coeffs_x, amrex::Gpu::DeviceVector< amrex::Real > &device_centering_stencil_coeffs_y, amrex::Gpu::DeviceVector< amrex::Real > &device_centering_stencil_coeffs_z, const int centering_nox, const int centering_noy, const int centering_noz)
 Allocates and initializes the stencil coefficients used for the finite-order centering of fields and currents, and stores them in the given device vectors. More...
 
void AllocLevelMFs (int lev, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, const amrex::IntVect &ngEB, amrex::IntVect &ngJ, const amrex::IntVect &ngRho, const amrex::IntVect &ngF, const amrex::IntVect &ngG, const bool aux_is_nodal)
 
void AllocLevelSpectralSolverRZ (amrex::Vector< std::unique_ptr< SpectralSolverRZ >> &spectral_solver, const int lev, const amrex::BoxArray &realspace_ba, const amrex::DistributionMapping &dm, const std::array< amrex::Real, 3 > &dx)
 
amrex::FabFactory< amrex::FArrayBox > const & fieldFactory (int lev) const noexcept
 
void ScrapeParticles ()
 
void PushPSATD ()
 
void PSATDForwardTransformEB (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &E_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &B_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &E_cp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &B_cp)
 Forward FFT of E,B on all mesh refinement levels. More...
 
void PSATDBackwardTransformEB (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &E_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &B_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &E_cp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &B_cp)
 Backward FFT of E,B on all mesh refinement levels, with field damping in the guard cells (if needed) More...
 
void PSATDBackwardTransformEBavg (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &E_avg_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &B_avg_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &E_avg_cp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &B_avg_cp)
 Backward FFT of averaged E,B on all mesh refinement levels. More...
 
void PSATDForwardTransformJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_cp, const bool apply_kspace_filter=true)
 Forward FFT of J on all mesh refinement levels, with k-space filtering (if needed) More...
 
void PSATDBackwardTransformJ (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_fp, const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &J_cp)
 Backward FFT of J on all mesh refinement levels. More...
 
void PSATDForwardTransformRho (const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_fp, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &charge_cp, const int icomp, const int dcomp, const bool apply_kspace_filter=true)
 Forward FFT of rho on all mesh refinement levels, with k-space filtering (if needed) More...
 
void PSATDMoveRhoNewToRhoOld ()
 Copy rho_new to rho_old in spectral space. More...
 
void PSATDMoveJNewToJOld ()
 Copy J_new to J_old in spectral space (when J is linear in time) More...
 
void PSATDForwardTransformF ()
 Forward FFT of F on all mesh refinement levels. More...
 
void PSATDBackwardTransformF ()
 Backward FFT of F on all mesh refinement levels. More...
 
void PSATDForwardTransformG ()
 Forward FFT of G on all mesh refinement levels. More...
 
void PSATDBackwardTransformG ()
 Backward FFT of G on all mesh refinement levels. More...
 
void PSATDCurrentCorrection ()
 Correct current in Fourier space so that the continuity equation is satisfied. More...
 
void PSATDVayDeposition ()
 Vay deposition in Fourier space (https://doi.org/10.1016/j.jcp.2013.03.010) More...
 
void PSATDPushSpectralFields ()
 Update all necessary fields in spectral space. More...
 
void PSATDScaleAverageFields (const amrex::Real scale_factor)
 Scale averaged E,B fields to account for time integration. More...
 
void PSATDEraseAverageFields ()
 Set averaged E,B fields to zero before new iteration. More...
 

Static Private Member Functions

static void CheckSignals ()
 Check and clear signal flags and asynchronously broadcast them from process 0. More...
 

Private Attributes

amrex::Vector< intistep
 
amrex::Vector< intnsubsteps
 
amrex::Vector< amrex::Real > t_new
 
amrex::Vector< amrex::Real > t_old
 
amrex::Vector< amrex::Real > dt
 
std::unique_ptr< MultiParticleContainermypc
 
std::unique_ptr< MultiDiagnosticsmulti_diags
 
std::unique_ptr< BackTransformedDiagnosticmyBFD
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_aux
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_aux
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > F_fp
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > G_fp
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > rho_fp
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > phi_fp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_fp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_fp_vay
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_fp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_fp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_avg_fp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_avg_fp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > m_edge_lengths
 EB: Lengths of the mesh edges. More...
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > m_face_areas
 EB: Areas of the mesh faces. More...
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > m_flag_info_face
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > m_flag_ext_face
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > m_area_mod
 
amrex::Vector< std::array< std::unique_ptr< amrex::LayoutData< FaceInfoBox > >, 3 > > m_borrowing
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > ECTRhofield
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Venl
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_distance_to_eb
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_store
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_fp_nodal
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > F_cp
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > G_cp
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > rho_cp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_cp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_cp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_cp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_avg_cp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_avg_cp
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_cax
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_cax
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > current_buffer_masks
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > gather_buffer_masks
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_buf
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > charge_buf
 
int do_pml = 0
 
int do_silver_mueller = 0
 
int pml_ncell = 10
 
int pml_delta = 10
 
int pml_has_particles = 0
 
int do_pml_j_damping = 0
 
int do_pml_in_domain = 0
 
bool do_pml_dive_cleaning
 
bool do_pml_divb_cleaning
 
amrex::Vector< amrex::IntVectdo_pml_Lo
 
amrex::Vector< amrex::IntVectdo_pml_Hi
 
amrex::Vector< std::unique_ptr< PML > > pml
 
amrex::Vector< std::unique_ptr< PML_RZ > > pml_rz
 
amrex::Real v_particle_pml
 
amrex::Real moving_window_x = std::numeric_limits<amrex::Real>::max()
 
amrex::Real current_injection_position = 0
 
int warpx_do_continuous_injection = 0
 
int num_injected_species = -1
 
amrex::Vector< intinjected_plasma_species
 
amrex::Real const_dt = amrex::Real(0.5e-11)
 
std::unique_ptr< MacroscopicPropertiesm_macroscopic_properties
 
utils::parser::IntervalsParser load_balance_intervals
 
amrex::Vector< std::unique_ptr< amrex::LayoutData< amrex::Real > > > costs
 
int load_balance_with_sfc = 0
 
amrex::Real load_balance_knapsack_factor = amrex::Real(1.24)
 
amrex::Real load_balance_efficiency_ratio_threshold = amrex::Real(1.1)
 
amrex::Vector< amrex::Real > load_balance_efficiency
 
amrex::Real costs_heuristic_cells_wt = amrex::Real(0)
 
amrex::Real costs_heuristic_particles_wt = amrex::Real(0)
 
utils::parser::IntervalsParser override_sync_intervals
 
int verbose = 1
 
bool use_hybrid_QED = 0
 
int max_step = std::numeric_limits<int>::max()
 
amrex::Real stop_time = std::numeric_limits<amrex::Real>::max()
 
int regrid_int = -1
 
amrex::Real cfl = amrex::Real(0.999)
 
std::string restart_chkfile
 
amrex::VisMF::Header::Version plotfile_headerversion = amrex::VisMF::Header::Version_v1
 
amrex::VisMF::Header::Version slice_plotfile_headerversion = amrex::VisMF::Header::Version_v1
 
bool use_single_read = true
 
bool use_single_write = true
 
int mffile_nstreams = 4
 
int field_io_nfiles = 1024
 
int particle_io_nfiles = 1024
 
amrex::RealVect fine_tag_lo
 
amrex::RealVect fine_tag_hi
 
bool is_synchronized = true
 
const bool sync_nodal_points = true
 
guardCellManager guard_cells
 
int slice_max_grid_size
 
int slice_plot_int = -1
 
amrex::RealBox slice_realbox
 
amrex::IntVect slice_cr_ratio
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > F_slice
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > G_slice
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > rho_slice
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > current_slice
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Efield_slice
 
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > Bfield_slice
 
bool fft_periodic_single_box = false
 
int nox_fft = 16
 
int noy_fft = 16
 
int noz_fft = 16
 
amrex::IntVect numprocs {0}
 Domain decomposition on Level 0. More...
 
std::unique_ptr< ParticleBoundaryBufferm_particle_boundary_buffer
 particle buffer for scraped particles on the boundaries More...
 
amrex::Vector< std::unique_ptr< amrex::FabFactory< amrex::FArrayBox > > > m_field_factory
 
amrex::Vector< std::unique_ptr< SpectralSolverRZ > > spectral_solver_fp
 
amrex::Vector< std::unique_ptr< SpectralSolverRZ > > spectral_solver_cp
 
amrex::Vector< std::unique_ptr< FiniteDifferenceSolver > > m_fdtd_solver_fp
 
amrex::Vector< std::unique_ptr< FiniteDifferenceSolver > > m_fdtd_solver_cp
 

Static Private Attributes

static WarpXm_instance = nullptr
 
static int do_similar_dm_pml = 1
 

Friends

class PML
 

Additional Inherited Members

- Protected Attributes inherited from amrex::AmrMesh
int finest_level
 
Vector< Geometrygeom
 
Vector< DistributionMappingdmap
 
Vector< BoxArraygrids
 
unsigned int num_setdm
 
unsigned int num_setba
 
- Protected Attributes inherited from amrex::AmrInfo
int verbose
 
int max_level
 
Vector< IntVectref_ratio
 
Vector< IntVectblocking_factor
 
Vector< IntVectmax_grid_size
 
Vector< IntVectn_error_buf
 
Real grid_eff
 
int n_proper
 
int use_fixed_upto_level
 
bool use_fixed_coarse_grids
 
bool refine_grid_layout
 
IntVect refine_grid_layout_dims
 
bool check_input
 
bool use_new_chop
 
bool iterate_on_new_grids
 

Constructor & Destructor Documentation

◆ WarpX()

WarpX::WarpX ( )

create object for reduced diagnostics

◆ ~WarpX()

WarpX::~WarpX ( )

Member Function Documentation

◆ AddBoundaryField()

void WarpX::AddBoundaryField ( )

◆ AddCurrentFromFineLevelandSumBoundary()

void WarpX::AddCurrentFromFineLevelandSumBoundary ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_cp,
const int  lev 
)
private

◆ AddRhoFromFineLevelandSumBoundary()

void WarpX::AddRhoFromFineLevelandSumBoundary ( const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_fp,
const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_cp,
const int  lev,
const int  icomp,
const int  ncomp 
)
private

◆ AddSpaceChargeField()

void WarpX::AddSpaceChargeField ( WarpXParticleContainer pc)

◆ AddSpaceChargeFieldLabFrame()

void WarpX::AddSpaceChargeFieldLabFrame ( )

◆ AllocateCenteringCoefficients()

void WarpX::AllocateCenteringCoefficients ( amrex::Gpu::DeviceVector< amrex::Real > &  device_centering_stencil_coeffs_x,
amrex::Gpu::DeviceVector< amrex::Real > &  device_centering_stencil_coeffs_y,
amrex::Gpu::DeviceVector< amrex::Real > &  device_centering_stencil_coeffs_z,
const int  centering_nox,
const int  centering_noy,
const int  centering_noz 
)
private

Allocates and initializes the stencil coefficients used for the finite-order centering of fields and currents, and stores them in the given device vectors.

Parameters
[in,out]device_centering_stencil_coeffs_xdevice vector where the stencil coefficients along x will be stored
[in,out]device_centering_stencil_coeffs_ydevice vector where the stencil coefficients along y will be stored
[in,out]device_centering_stencil_coeffs_zdevice vector where the stencil coefficients along z will be stored
[in]centering_noxorder of the finite-order centering along x
[in]centering_noyorder of the finite-order centering along y
[in]centering_nozorder of the finite-order centering along z

◆ AllocLevelData()

void WarpX::AllocLevelData ( int  lev,
const amrex::BoxArray new_grids,
const amrex::DistributionMapping new_dmap 
)
private

◆ AllocLevelMFs()

void WarpX::AllocLevelMFs ( int  lev,
const amrex::BoxArray ba,
const amrex::DistributionMapping dm,
const amrex::IntVect ngEB,
amrex::IntVect ngJ,
const amrex::IntVect ngRho,
const amrex::IntVect ngF,
const amrex::IntVect ngG,
const bool  aux_is_nodal 
)
private

◆ AllocLevelSpectralSolverRZ()

void WarpX::AllocLevelSpectralSolverRZ ( amrex::Vector< std::unique_ptr< SpectralSolverRZ >> &  spectral_solver,
const int  lev,
const amrex::BoxArray realspace_ba,
const amrex::DistributionMapping dm,
const std::array< amrex::Real, 3 > &  dx 
)
private

◆ ApplyBCKCorrection()

void WarpX::ApplyBCKCorrection ( const int  idim)

Whenever an unstable cell cannot be extended we increase its area to be the minimal for stability. This is the method Benkler-Chavannes-Kuster method and it is less accurate than the regular ECT but it still works better than staircasing. (see https://ieeexplore.ieee.org/document/1638381)

Parameters
idimInteger indicating the dimension (x->0, y->1, z->2) for which the BCK correction is done

◆ ApplyBfieldBoundary()

void WarpX::ApplyBfieldBoundary ( const int  lev,
PatchType  patch_type,
DtType  dt_type 
)

◆ ApplyEfieldBoundary()

void WarpX::ApplyEfieldBoundary ( const int  lev,
PatchType  patch_type 
)

◆ ApplyFilterandSumBoundaryRho() [1/2]

void WarpX::ApplyFilterandSumBoundaryRho ( int  lev,
int  glev,
amrex::MultiFab rho,
int  icomp,
int  ncomp 
)

◆ ApplyFilterandSumBoundaryRho() [2/2]

void WarpX::ApplyFilterandSumBoundaryRho ( const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_fp,
const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_cp,
const int  lev,
PatchType  patch_type,
const int  icomp,
const int  ncomp 
)
private

◆ ApplyFilterJ() [1/2]

void WarpX::ApplyFilterJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  current,
const int  lev,
const int  idim 
)
private

◆ ApplyFilterJ() [2/2]

void WarpX::ApplyFilterJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  current,
const int  lev 
)
private

◆ ApplyInverseVolumeScalingToChargeDensity()

void WarpX::ApplyInverseVolumeScalingToChargeDensity ( amrex::MultiFab Rho,
int  lev 
)

◆ ApplyInverseVolumeScalingToCurrentDensity()

void WarpX::ApplyInverseVolumeScalingToCurrentDensity ( amrex::MultiFab Jx,
amrex::MultiFab Jy,
amrex::MultiFab Jz,
int  lev 
)

◆ applyMirrors()

void WarpX::applyMirrors ( amrex::Real  time)

◆ AverageAndPackFields()

void WarpX::AverageAndPackFields ( amrex::Vector< std::string > &  varnames,
amrex::Vector< amrex::MultiFab > &  mf_avg,
const amrex::IntVect  ngrow 
) const

◆ BackwardCompatibility()

void WarpX::BackwardCompatibility ( )
private

This function queries deprecated input parameters and abort the run if one of them is specified.

◆ BuildBufferMasks()

void WarpX::BuildBufferMasks ( )
private

◆ BuildBufferMasksInBox()

void WarpX::BuildBufferMasksInBox ( const amrex::Box  tbx,
amrex::IArrayBox buffer_mask,
const amrex::IArrayBox guard_mask,
const int  ng 
)
private

Build buffer mask within given FArrayBox.

Parameters
tbxCurrent FArrayBox
buffer_maskBuffer mask to be set
guard_maskGuard mask used to set buffer_mask
ngNumber of guard cells

◆ CellSize()

std::array< Real, 3 > WarpX::CellSize ( int  lev)
static

◆ CheckGuardCells() [1/2]

void WarpX::CheckGuardCells ( )
private

Check that the number of guard cells is smaller than the number of valid cells, for all available MultiFabs, and abort otherwise.

◆ CheckGuardCells() [2/2]

void WarpX::CheckGuardCells ( amrex::MultiFab const &  mf)
private

Check that the number of guard cells is smaller than the number of valid cells, for a given MultiFab, and abort otherwise.

◆ CheckKnownIssues()

void WarpX::CheckKnownIssues ( )
private

Checks for known numerical issues involving different WarpX modules.

◆ CheckSignals()

void WarpX::CheckSignals ( )
staticprivate

Check and clear signal flags and asynchronously broadcast them from process 0.

◆ ClearLevel()

void WarpX::ClearLevel ( int  lev)
finalprotectedvirtual

Delete level data. Called by AmrCore::regrid.

Implements amrex::AmrCore.

◆ computeB()

void WarpX::computeB ( amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &  B,
const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  phi,
std::array< amrex::Real, 3 > const  beta = {{0,0,0}} 
) const

◆ ComputeCostsHeuristic()

void WarpX::ComputeCostsHeuristic ( amrex::Vector< std::unique_ptr< amrex::LayoutData< amrex::Real > > > &  costs)

adds particle and cell contributions in cells to compute heuristic cost in each box on each level, and records in costs

Parameters
[in]costsvector of (unique_ptr to) vectors; expected to be initialized to correct number of boxes and boxes per level

◆ ComputeDistanceToEB()

void WarpX::ComputeDistanceToEB ( )

Compute the length of the mesh edges. Here the length is a value in [0, 1]. An edge of length 0 is fully covered.

◆ ComputeDivB() [1/2]

void WarpX::ComputeDivB ( amrex::MultiFab divB,
int const  dcomp,
const std::array< const amrex::MultiFab *const, 3 > &  B,
const std::array< amrex::Real, 3 > &  dx 
)
static

◆ ComputeDivB() [2/2]

void WarpX::ComputeDivB ( amrex::MultiFab divB,
int const  dcomp,
const std::array< const amrex::MultiFab *const, 3 > &  B,
const std::array< amrex::Real, 3 > &  dx,
amrex::IntVect const  ngrow 
)
static

◆ ComputeDivE()

void WarpX::ComputeDivE ( amrex::MultiFab divE,
const int  lev 
)

◆ ComputeDt()

void WarpX::ComputeDt ( )

Determine the timestep of the simulation.

◆ computeE()

void WarpX::computeE ( amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &  E,
const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  phi,
std::array< amrex::Real, 3 > const  beta = {{0,0,0}} 
) const

◆ ComputeEightWaysExtensions()

void WarpX::ComputeEightWaysExtensions ( )

Do the eight-ways extension.

◆ ComputeFaceExtensions()

void WarpX::ComputeFaceExtensions ( )

Main function computing the cell extension. Where possible it computes one-way extensions and, when this is not possible, it does eight-ways extensions.

◆ ComputeMaxStep()

void WarpX::ComputeMaxStep ( )

Compute the last timestep of the simulation and make max_step and stop_time self-consistent. Calls computeMaxStepBoostAccelerator() if required.

◆ computeMaxStepBoostAccelerator()

void WarpX::computeMaxStepBoostAccelerator ( const amrex::Geometry geom)

◆ ComputeOneWayExtensions()

void WarpX::ComputeOneWayExtensions ( )

Do the one-way extension.

◆ computePhi()

void WarpX::computePhi ( const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  rho,
amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  phi,
std::array< amrex::Real, 3 > const  beta = {{0,0,0}},
amrex::Real const  required_precision = amrex::Real(1.e-11),
amrex::Real  absolute_tolerance = amrex::Real(0.0),
const int  max_iters = 200,
const int  verbosity = 2 
) const

◆ computePhiTriDiagonal()

void WarpX::computePhiTriDiagonal ( const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  rho,
amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  phi 
) const

◆ ComputePMLFactors()

void WarpX::ComputePMLFactors ( )
private

◆ ComputeSpaceChargeField()

void WarpX::ComputeSpaceChargeField ( bool const  reset_fields)

◆ CopyJPML()

void WarpX::CopyJPML ( )

Copy the current J from the regular grid to the PML.

◆ CountExtFaces()

amrex::Array1D< int, 0, 2 > WarpX::CountExtFaces ( )

Auxiliary function to count the amount of faces which still need to be extended.

◆ CurrentBufferMasks()

const iMultiFab * WarpX::CurrentBufferMasks ( int  lev)
static

◆ DampFieldsInGuards() [1/2]

void WarpX::DampFieldsInGuards ( const int  lev,
const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &  Efield,
const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &  Bfield 
)

Private function for spectral solver Applies a damping factor in the guards cells that extend beyond the extent of the domain, reducing fluctuations that can appear in parallel simulations. This will be called when FieldBoundaryType is set to damped. Vector version.

◆ DampFieldsInGuards() [2/2]

void WarpX::DampFieldsInGuards ( const int  lev,
std::unique_ptr< amrex::MultiFab > &  mf 
)

Private function for spectral solver Applies a damping factor in the guards cells that extend beyond the extent of the domain, reducing fluctuations that can appear in parallel simulations. This will be called when FieldBoundaryType is set to damped. Scalar version.

◆ DampJPML() [1/3]

void WarpX::DampJPML ( )

◆ DampJPML() [2/3]

void WarpX::DampJPML ( int  lev)

◆ DampJPML() [3/3]

void WarpX::DampJPML ( int  lev,
PatchType  patch_type 
)

◆ DampPML() [1/3]

void WarpX::DampPML ( )

◆ DampPML() [2/3]

void WarpX::DampPML ( const int  lev)

◆ DampPML() [3/3]

void WarpX::DampPML ( const int  lev,
PatchType  patch_type 
)

◆ DampPML_Cartesian()

void WarpX::DampPML_Cartesian ( const int  lev,
PatchType  patch_type 
)

◆ doFieldIonization() [1/2]

void WarpX::doFieldIonization ( )

Run the ionization module on all species

◆ doFieldIonization() [2/2]

void WarpX::doFieldIonization ( int  lev)

Run the ionization module on all species at level lev

Parameters
levlevel

◆ DoPML()

bool WarpX::DoPML ( ) const
inline

◆ doQEDEvents() [1/2]

void WarpX::doQEDEvents ( )

Run the QED module on all species

◆ doQEDEvents() [2/2]

void WarpX::doQEDEvents ( int  lev)

Run the QED module on all species at level lev

Parameters
levlevel

◆ ErrorEst()

void WarpX::ErrorEst ( int  lev,
amrex::TagBoxArray tags,
amrex::Real  time,
int   
)
finalvirtual

Tagging cells for refinement.

◆ Evolve()

void WarpX::Evolve ( int  numsteps = -1)

reduced diags

◆ EvolveB() [1/3]

void WarpX::EvolveB ( amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveB() [2/3]

void WarpX::EvolveB ( int  lev,
amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveB() [3/3]

void WarpX::EvolveB ( int  lev,
PatchType  patch_type,
amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveE() [1/3]

void WarpX::EvolveE ( amrex::Real  dt)

◆ EvolveE() [2/3]

void WarpX::EvolveE ( int  lev,
amrex::Real  dt 
)

◆ EvolveE() [3/3]

void WarpX::EvolveE ( int  lev,
PatchType  patch_type,
amrex::Real  dt 
)

◆ EvolveEM()

void WarpX::EvolveEM ( int  numsteps)
private

Advance the simulation by numsteps steps, electromagnetic case.

◆ EvolveF() [1/3]

void WarpX::EvolveF ( amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveF() [2/3]

void WarpX::EvolveF ( int  lev,
amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveF() [3/3]

void WarpX::EvolveF ( int  lev,
PatchType  patch_type,
amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveG() [1/3]

void WarpX::EvolveG ( amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveG() [2/3]

void WarpX::EvolveG ( int  lev,
amrex::Real  dt,
DtType  dt_type 
)

◆ EvolveG() [3/3]

void WarpX::EvolveG ( int  lev,
PatchType  patch_type,
amrex::Real  dt,
DtType  dt_type 
)

◆ fieldFactory()

amrex::FabFactory<amrex::FArrayBox> const& WarpX::fieldFactory ( int  lev) const
inlineprivatenoexcept

◆ FillBoundaryAux() [1/2]

void WarpX::FillBoundaryAux ( amrex::IntVect  ng)

◆ FillBoundaryAux() [2/2]

void WarpX::FillBoundaryAux ( int  lev,
amrex::IntVect  ng 
)

◆ FillBoundaryB() [1/3]

void WarpX::FillBoundaryB ( amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryB() [2/3]

void WarpX::FillBoundaryB ( int  lev,
amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryB() [3/3]

void WarpX::FillBoundaryB ( const int  lev,
const PatchType  patch_type,
const amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)
private

◆ FillBoundaryB_avg() [1/3]

void WarpX::FillBoundaryB_avg ( amrex::IntVect  ng)

◆ FillBoundaryB_avg() [2/3]

void WarpX::FillBoundaryB_avg ( int  lev,
amrex::IntVect  ng 
)

◆ FillBoundaryB_avg() [3/3]

void WarpX::FillBoundaryB_avg ( int  lev,
PatchType  patch_type,
amrex::IntVect  ng 
)
private

◆ FillBoundaryE() [1/3]

void WarpX::FillBoundaryE ( amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryE() [2/3]

void WarpX::FillBoundaryE ( int  lev,
amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryE() [3/3]

void WarpX::FillBoundaryE ( const int  lev,
const PatchType  patch_type,
const amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)
private

◆ FillBoundaryE_avg() [1/3]

void WarpX::FillBoundaryE_avg ( amrex::IntVect  ng)

◆ FillBoundaryE_avg() [2/3]

void WarpX::FillBoundaryE_avg ( int  lev,
amrex::IntVect  ng 
)

◆ FillBoundaryE_avg() [3/3]

void WarpX::FillBoundaryE_avg ( int  lev,
PatchType  patch_type,
amrex::IntVect  ng 
)
private

◆ FillBoundaryF() [1/3]

void WarpX::FillBoundaryF ( amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryF() [2/3]

void WarpX::FillBoundaryF ( int  lev,
amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryF() [3/3]

void WarpX::FillBoundaryF ( int  lev,
PatchType  patch_type,
amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)
private

◆ FillBoundaryG() [1/3]

void WarpX::FillBoundaryG ( amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryG() [2/3]

void WarpX::FillBoundaryG ( int  lev,
amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)

◆ FillBoundaryG() [3/3]

void WarpX::FillBoundaryG ( int  lev,
PatchType  patch_type,
amrex::IntVect  ng,
std::optional< bool >  nodal_sync = std::nullopt 
)
private

◆ GatherBufferMasks()

const iMultiFab * WarpX::GatherBufferMasks ( int  lev)
static

◆ get_array_Bfield_aux()

std::array<const amrex::MultiFab* const, 3> WarpX::get_array_Bfield_aux ( const int  lev) const
inline

◆ get_array_Efield_aux()

std::array<const amrex::MultiFab* const, 3> WarpX::get_array_Efield_aux ( const int  lev) const
inline

◆ get_load_balance_intervals()

utils::parser::IntervalsParser WarpX::get_load_balance_intervals ( ) const
inline

returns the load balance interval

◆ get_ng_depos_J()

const amrex::IntVect WarpX::get_ng_depos_J ( ) const
inline

◆ get_ng_depos_rho()

const amrex::IntVect WarpX::get_ng_depos_rho ( ) const
inline

◆ get_ng_fieldgather()

const amrex::IntVect WarpX::get_ng_fieldgather ( ) const
inline

◆ get_numprocs()

const amrex::IntVect WarpX::get_numprocs ( ) const
inline

Coarsest-level Domain Decomposition

If specified, the domain will be chopped into the exact number of pieces in each dimension as specified by this parameter.

Returns
the number of MPI processes per dimension if specified, otherwise a 0-vector

◆ get_pointer_Bfield_aux()

amrex::MultiFab* WarpX::get_pointer_Bfield_aux ( int  lev,
int  direction 
) const
inline

◆ get_pointer_Bfield_cp()

amrex::MultiFab* WarpX::get_pointer_Bfield_cp ( int  lev,
int  direction 
) const
inline

◆ get_pointer_Bfield_fp()

amrex::MultiFab* WarpX::get_pointer_Bfield_fp ( int  lev,
int  direction 
) const
inline

◆ get_pointer_current_cp()

amrex::MultiFab* WarpX::get_pointer_current_cp ( int  lev,
int  direction 
) const
inline

◆ get_pointer_current_fp()

amrex::MultiFab* WarpX::get_pointer_current_fp ( int  lev,
int  direction 
) const
inline

◆ get_pointer_edge_lengths()

amrex::MultiFab* WarpX::get_pointer_edge_lengths ( int  lev,
int  direction 
) const
inline

◆ get_pointer_Efield_aux()

amrex::MultiFab* WarpX::get_pointer_Efield_aux ( int  lev,
int  direction 
) const
inline

◆ get_pointer_Efield_cp()

amrex::MultiFab* WarpX::get_pointer_Efield_cp ( int  lev,
int  direction 
) const
inline

◆ get_pointer_Efield_fp()

amrex::MultiFab* WarpX::get_pointer_Efield_fp ( int  lev,
int  direction 
) const
inline

◆ get_pointer_F_cp()

amrex::MultiFab* WarpX::get_pointer_F_cp ( int  lev) const
inline

◆ get_pointer_F_fp()

amrex::MultiFab* WarpX::get_pointer_F_fp ( int  lev) const
inline

◆ get_pointer_face_areas()

amrex::MultiFab* WarpX::get_pointer_face_areas ( int  lev,
int  direction 
) const
inline

◆ get_pointer_G_cp()

amrex::MultiFab* WarpX::get_pointer_G_cp ( int  lev) const
inline

◆ get_pointer_G_fp()

amrex::MultiFab* WarpX::get_pointer_G_fp ( int  lev) const
inline

◆ get_pointer_phi_fp()

amrex::MultiFab* WarpX::get_pointer_phi_fp ( int  lev) const
inline

◆ get_pointer_rho_cp()

amrex::MultiFab* WarpX::get_pointer_rho_cp ( int  lev) const
inline

◆ get_pointer_rho_fp()

amrex::MultiFab* WarpX::get_pointer_rho_fp ( int  lev) const
inline

◆ get_spectral_solver_fp()

SpectralSolverRZ& WarpX::get_spectral_solver_fp ( int  lev)
inline

◆ getBfield()

const amrex::MultiFab& WarpX::getBfield ( int  lev,
int  direction 
)
inline

◆ getBfield_avg_cp()

const amrex::MultiFab& WarpX::getBfield_avg_cp ( int  lev,
int  direction 
)
inline

◆ getBfield_avg_fp()

const amrex::MultiFab& WarpX::getBfield_avg_fp ( int  lev,
int  direction 
)
inline

◆ getBfield_cp()

const amrex::MultiFab& WarpX::getBfield_cp ( int  lev,
int  direction 
)
inline

◆ getBfield_fp()

const amrex::MultiFab& WarpX::getBfield_fp ( int  lev,
int  direction 
)
inline

◆ GetCellCenteredData()

std::unique_ptr< MultiFab > WarpX::GetCellCenteredData ( )
private

◆ getCosts()

amrex::LayoutData< amrex::Real > * WarpX::getCosts ( int  lev)
static

◆ getcurrent_cp()

const amrex::MultiFab& WarpX::getcurrent_cp ( int  lev,
int  direction 
)
inline

◆ getcurrent_fp()

const amrex::MultiFab& WarpX::getcurrent_fp ( int  lev,
int  direction 
)
inline

◆ getcurrent_injection_position()

amrex::Real WarpX::getcurrent_injection_position ( ) const
inline

◆ getCurrentBufferMasks()

const amrex::iMultiFab* WarpX::getCurrentBufferMasks ( int  lev) const
inlineprivate

◆ getdo_moving_window()

int WarpX::getdo_moving_window ( ) const
inline

◆ getdt() [1/2]

amrex::Vector<amrex::Real> WarpX::getdt ( ) const
inline

◆ getdt() [2/2]

amrex::Real WarpX::getdt ( int  lev) const
inline

◆ getEfield()

const amrex::MultiFab& WarpX::getEfield ( int  lev,
int  direction 
)
inline

◆ getEfield_avg_cp()

const amrex::MultiFab& WarpX::getEfield_avg_cp ( int  lev,
int  direction 
)
inline

◆ getEfield_avg_fp()

const amrex::MultiFab& WarpX::getEfield_avg_fp ( int  lev,
int  direction 
)
inline

◆ getEfield_cp()

const amrex::MultiFab& WarpX::getEfield_cp ( int  lev,
int  direction 
)
inline

◆ getEfield_fp()

const amrex::MultiFab& WarpX::getEfield_fp ( int  lev,
int  direction 
)
inline

◆ getF_cp()

const amrex::MultiFab& WarpX::getF_cp ( int  lev)
inline

◆ getF_fp()

const amrex::MultiFab& WarpX::getF_fp ( int  lev)
inline

◆ getFornbergStencilCoefficients()

amrex::Vector< amrex::Real > WarpX::getFornbergStencilCoefficients ( const int  n_order,
const bool  nodal 
)
static

Returns an array of coefficients (Fornberg coefficients), corresponding to the weight of each point in a finite-difference approximation of a derivative (up to order n_order).

Parameters
[in]n_orderorder of the finite-difference approximation
[in]nodalwhether the finite-difference approximation is computed on a nodal grid or a staggered grid

◆ getG_cp()

const amrex::MultiFab& WarpX::getG_cp ( int  lev)
inline

◆ getG_fp()

const amrex::MultiFab& WarpX::getG_fp ( int  lev)
inline

◆ getGatherBufferMasks()

const amrex::iMultiFab* WarpX::getGatherBufferMasks ( int  lev) const
inlineprivate

◆ GetInstance()

WarpX & WarpX::GetInstance ( )
static

◆ getis_synchronized()

bool WarpX::getis_synchronized ( ) const
inline

◆ getistep() [1/2]

amrex::Vector<int> WarpX::getistep ( ) const
inline

◆ getistep() [2/2]

int WarpX::getistep ( int  lev) const
inline

◆ getLoadBalanceEfficiency()

amrex::Real WarpX::getLoadBalanceEfficiency ( const int  lev)
inline

◆ GetMacroscopicProperties()

MacroscopicProperties& WarpX::GetMacroscopicProperties ( )
inline

◆ getmoving_window_x()

amrex::Real WarpX::getmoving_window_x ( ) const
inline

◆ getngEB()

const amrex::IntVect WarpX::getngEB ( ) const
inline

◆ getngF()

const amrex::IntVect WarpX::getngF ( ) const
inline

◆ getngUpdateAux()

const amrex::IntVect WarpX::getngUpdateAux ( ) const
inline

◆ getnsubsteps() [1/2]

amrex::Vector<int> WarpX::getnsubsteps ( ) const
inline

◆ getnsubsteps() [2/2]

int WarpX::getnsubsteps ( int  lev) const
inline

◆ GetPartContainer()

MultiParticleContainer& WarpX::GetPartContainer ( )
inline

◆ GetParticleBoundaryBuffer()

ParticleBoundaryBuffer& WarpX::GetParticleBoundaryBuffer ( )
inline

◆ getphi_fp()

const amrex::MultiFab& WarpX::getphi_fp ( int  lev)
inline

◆ GetPML()

PML * WarpX::GetPML ( int  lev)

◆ GetPML_RZ()

PML_RZ * WarpX::GetPML_RZ ( int  lev)

◆ getPMLdirections()

std::vector< bool > WarpX::getPMLdirections ( ) const

get low-high-low-high-... vector for each direction indicating if mother grid PMLs are enabled

◆ getPMLRZ()

const PML_RZ* WarpX::getPMLRZ ( )
inline

◆ getRealBox()

amrex::RealBox WarpX::getRealBox ( const amrex::Box bx,
int  lev 
)
static

◆ GetRestartDMap()

amrex::DistributionMapping WarpX::GetRestartDMap ( const std::string &  chkfile,
const amrex::BoxArray ba,
int  lev 
) const
private

◆ getrho_cp()

const amrex::MultiFab& WarpX::getrho_cp ( int  lev)
inline

◆ getrho_fp()

const amrex::MultiFab& WarpX::getrho_fp ( int  lev)
inline

◆ getSliceRealBox()

amrex::RealBox WarpX::getSliceRealBox ( ) const
inline

◆ gett_new() [1/2]

amrex::Vector<amrex::Real> WarpX::gett_new ( ) const
inline

◆ gett_new() [2/2]

amrex::Real WarpX::gett_new ( int  lev) const
inline

◆ gett_old() [1/2]

amrex::Vector<amrex::Real> WarpX::gett_old ( ) const
inline

◆ gett_old() [2/2]

amrex::Real WarpX::gett_old ( int  lev) const
inline

◆ GotoNextLine()

void WarpX::GotoNextLine ( std::istream &  is)
static

◆ HandleSignals()

void WarpX::HandleSignals ( )
private

Complete the asynchronous broadcast of signal flags, and initiate a checkpoint if requested.

◆ Hybrid_QED_Push() [1/3]

void WarpX::Hybrid_QED_Push ( amrex::Vector< amrex::Real >  dt)

apply QED correction on electric field

Parameters
dtvector of time steps (for all levels)

◆ Hybrid_QED_Push() [2/3]

void WarpX::Hybrid_QED_Push ( int  lev,
amrex::Real  dt 
)

apply QED correction on electric field for level lev

Parameters
levmesh refinement level
dttime step

◆ Hybrid_QED_Push() [3/3]

void WarpX::Hybrid_QED_Push ( int  lev,
PatchType  patch_type,
amrex::Real  dt 
)

apply QED correction on electric field for level lev and patch type patch_type

Parameters
levmesh refinement level
dtpatch_type which MR patch: PatchType::fine or PatchType::coarse
dttime step

◆ InitBorrowing()

void WarpX::InitBorrowing ( )

Initialize the memory for the FaceInfoBoxes.

◆ InitData()

void WarpX::InitData ( )

◆ InitDiagnostics()

void WarpX::InitDiagnostics ( )
private

◆ InitEB()

void WarpX::InitEB ( )

◆ InitFilter()

void WarpX::InitFilter ( )
private

◆ InitFromCheckpoint()

void WarpX::InitFromCheckpoint ( )
private

◆ InitFromScratch()

void WarpX::InitFromScratch ( )
private

◆ InitializeEBGridData()

void WarpX::InitializeEBGridData ( int  lev)

This function initializes and calculates grid quantities used along with EBs such as edge lengths, face areas, distance to EB, etc. It also appropriately communicates EB data to guard cells.

Parameters
[in]lev,levelof the Multifabs that is initialized

◆ InitializeExternalFieldsOnGridUsingParser()

void WarpX::InitializeExternalFieldsOnGridUsingParser ( amrex::MultiFab mfx,
amrex::MultiFab mfy,
amrex::MultiFab mfz,
amrex::ParserExecutor< 3 > const &  xfield_parser,
amrex::ParserExecutor< 3 > const &  yfield_parser,
amrex::ParserExecutor< 3 > const &  zfield_parser,
std::array< std::unique_ptr< amrex::MultiFab >, 3 > const &  edge_lengths,
std::array< std::unique_ptr< amrex::MultiFab >, 3 > const &  face_areas,
const char  field,
const int  lev 
)

This function initializes the E and B fields on each level using the parser and the user-defined function for the external fields. The subroutine will parse the x_/y_z_external_grid_function and then, the field multifab is initialized based on the (x,y,z) position on the staggered yee-grid or cell-centered grid, in the interior cells and guard cells.

Parameters
[in]mfx,x-componentof the field to be initialized
[in]mfy,y-componentof the field to be initialized
[in]mfz,z-componentof the field to be initialized
[in]xfield_parser,parserfunction to initialize x-field
[in]yfield_parser,parserfunction to initialize y-field
[in]zfield_parser,parserfunction to initialize z-field
[in]edge_lengths,edgelengths information
[in]face_areas,faceareas information
[in]field,flagindicating which field is being initialized ('E' for electric, 'B' for magnetic)
[in]lev,levelof the Multifabs that is initialized

◆ InitLevelData()

void WarpX::InitLevelData ( int  lev,
amrex::Real  time 
)
protected

This function initializes E, B, rho, and F, at all the levels of the multifab. rho and F are initialized with 0. The E and B fields are initialized using user-defined inputs. The initialization type is set using "B_ext_grid_init_style" and "E_ext_grid_init_style". The initialization style is set to "default" if not explicitly defined by the user, and the E and B fields are initialized with E_external_grid and B_external_grid, respectively, each with a default value of 0. If the initialization type for the E and B field is "constant", then, the E and B fields at all the levels are initialized with user-defined values for E_external_grid and B_external_grid. If the initialization type for B-field is set to "parse_B_ext_grid_function", then, the parser is used to read Bx_external_grid_function(x,y,z), By_external_grid_function(x,y,z), and Bz_external_grid_function(x,y,z). Similarly, if the E-field initialization type is set to "parse_E_ext_grid_function", then, the parser is used to read Ex_external_grid_function(x,y,z), Ey_external_grid_function(x,y,z), and Ex_external_grid_function(x,y,z). The parser for the E and B initialization assumes that the function has three independent variables, at max, namely, x, y, z. However, any number of constants can be used in the function used to define the E and B fields on the grid.

◆ InitNCICorrector()

void WarpX::InitNCICorrector ( )
private

◆ InitPML()

void WarpX::InitPML ( )
private

◆ isAnyBoundaryPML()

bool WarpX::isAnyBoundaryPML ( )

◆ LoadBalance()

void WarpX::LoadBalance ( )

perform load balance; compute and communicate new amrex::DistributionMapping

◆ LowerCorner()

std::array< Real, 3 > WarpX::LowerCorner ( const amrex::Box bx,
const int  lev,
const amrex::Real  time_shift_delta 
)
static

Return the lower corner of the box in real units.

Parameters
bxThe box
levThe refinement level of the box
time_shift_deltaThe time relative to the current time at which to calculate the position (when v_galilean is not zero)
Returns
An array of the position coordinates

◆ MacroscopicEvolveE() [1/3]

void WarpX::MacroscopicEvolveE ( amrex::Real  dt)

◆ MacroscopicEvolveE() [2/3]

void WarpX::MacroscopicEvolveE ( int  lev,
amrex::Real  dt 
)

◆ MacroscopicEvolveE() [3/3]

void WarpX::MacroscopicEvolveE ( int  lev,
PatchType  patch_type,
amrex::Real  dt 
)

◆ MakeNewLevelFromCoarse()

void WarpX::MakeNewLevelFromCoarse ( int  ,
amrex::Real  ,
const amrex::BoxArray ,
const amrex::DistributionMapping  
)
finalprotectedvirtual

Make a new level using provided BoxArray and DistributionMapping and fill with interpolated coarse level data. Called by AmrCore::regrid.

◆ MakeNewLevelFromScratch()

void WarpX::MakeNewLevelFromScratch ( int  lev,
amrex::Real  time,
const amrex::BoxArray ba,
const amrex::DistributionMapping dm 
)
finalprotectedvirtual

Make a new level from scratch using provided BoxArray and DistributionMapping. Only used during initialization. Called by AmrCoreInitFromScratch.

◆ maxStep()

int WarpX::maxStep ( ) const
inline

◆ MoveWindow()

int WarpX::MoveWindow ( const int  step,
bool  move_j 
)

Move the moving window.

Parameters
stepTime step
move_jwhether the current (and the charge, if allocated) is shifted or not

◆ moving_window_active()

static int WarpX::moving_window_active ( int const  step)
inlinestatic

Returns true if the moving window is active for the provided step

Parameters
steptime step
Returns
true if active, else false

◆ NodalSyncJ()

void WarpX::NodalSyncJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_cp,
const int  lev,
PatchType  patch_type 
)
private

◆ NodalSyncPML() [1/3]

void WarpX::NodalSyncPML ( )

Synchronize the nodal points of the PML MultiFabs.

◆ NodalSyncPML() [2/3]

void WarpX::NodalSyncPML ( int  lev)

Synchronize the nodal points of the PML MultiFabs for given MR level.

◆ NodalSyncPML() [3/3]

void WarpX::NodalSyncPML ( int  lev,
PatchType  patch_type 
)

Synchronize the nodal points of the PML MultiFabs for given MR level and patch.

◆ NodalSyncRho()

void WarpX::NodalSyncRho ( const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_fp,
const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_cp,
const int  lev,
PatchType  patch_type,
const int  icomp,
const int  ncomp 
)
private

◆ OneStep_multiJ()

void WarpX::OneStep_multiJ ( const amrex::Real  t)
private

Perform one PIC iteration, with the multiple J deposition per time step.

◆ OneStep_nosub()

void WarpX::OneStep_nosub ( amrex::Real  t)
private

◆ OneStep_sub1()

void WarpX::OneStep_sub1 ( amrex::Real  t)
private

◆ PerformanceHints()

void WarpX::PerformanceHints ( )
private

Check the requested resources and write performance hints

◆ PicsarVersion()

std::string WarpX::PicsarVersion ( )
static

Version of PICSAR dependency.

◆ PostProcessBaseGrids()

void WarpX::PostProcessBaseGrids ( amrex::BoxArray ba0) const
finalprotectedvirtual

Use this function to override the Level 0 grids made by AMReX. This function is called in amrex::AmrCore::InitFromScratch.

Reimplemented from amrex::AmrMesh.

◆ PostRestart()

void WarpX::PostRestart ( )
private

◆ prepareFields()

void WarpX::prepareFields ( int const  step,
amrex::Vector< std::string > &  varnames,
amrex::Vector< amrex::MultiFab > &  mf_avg,
amrex::Vector< const amrex::MultiFab *> &  output_mf,
amrex::Vector< amrex::Geometry > &  output_geom 
) const

◆ PrintDtDxDyDz()

void WarpX::PrintDtDxDyDz ( )

Print dt and dx,dy,dz

◆ PrintMainPICparameters()

void WarpX::PrintMainPICparameters ( )

Print main PIC parameters to stdout

◆ PSATDBackwardTransformEB()

void WarpX::PSATDBackwardTransformEB ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  E_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  B_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  E_cp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  B_cp 
)
private

Backward FFT of E,B on all mesh refinement levels, with field damping in the guard cells (if needed)

Parameters
E_fpVector of three-dimensional arrays (for each level) storing the fine patch electric field to be transformed
B_fpVector of three-dimensional arrays (for each level) storing the fine patch magnetic field to be transformed
E_cpVector of three-dimensional arrays (for each level) storing the coarse patch electric field to be transformed
B_cpVector of three-dimensional arrays (for each level) storing the coarse patch magnetic field to be transformed

◆ PSATDBackwardTransformEBavg()

void WarpX::PSATDBackwardTransformEBavg ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  E_avg_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  B_avg_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  E_avg_cp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  B_avg_cp 
)
private

Backward FFT of averaged E,B on all mesh refinement levels.

Parameters
E_avg_fpVector of three-dimensional arrays (for each level) storing the fine patch averaged electric field to be transformed
B_avg_fpVector of three-dimensional arrays (for each level) storing the fine patch averaged magnetic field to be transformed
E_avg_cpVector of three-dimensional arrays (for each level) storing the coarse patch averaged electric field to be transformed
B_avg_cpVector of three-dimensional arrays (for each level) storing the coarse patch averaged magnetic field to be transformed

◆ PSATDBackwardTransformF()

void WarpX::PSATDBackwardTransformF ( )
private

Backward FFT of F on all mesh refinement levels.

◆ PSATDBackwardTransformG()

void WarpX::PSATDBackwardTransformG ( )
private

Backward FFT of G on all mesh refinement levels.

◆ PSATDBackwardTransformJ()

void WarpX::PSATDBackwardTransformJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_cp 
)
private

Backward FFT of J on all mesh refinement levels.

Parameters
J_fpVector of three-dimensional arrays (for each level) storing the fine patch current to be transformed
J_cpVector of three-dimensional arrays (for each level) storing the coarse patch current to be transformed

◆ PSATDCurrentCorrection()

void WarpX::PSATDCurrentCorrection ( )
private

Correct current in Fourier space so that the continuity equation is satisfied.

◆ PSATDEraseAverageFields()

void WarpX::PSATDEraseAverageFields ( )
private

Set averaged E,B fields to zero before new iteration.

◆ PSATDForwardTransformEB()

void WarpX::PSATDForwardTransformEB ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  E_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  B_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  E_cp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  B_cp 
)
private

Forward FFT of E,B on all mesh refinement levels.

Parameters
E_fpVector of three-dimensional arrays (for each level) storing the fine patch electric field to be transformed
B_fpVector of three-dimensional arrays (for each level) storing the fine patch magnetic field to be transformed
E_cpVector of three-dimensional arrays (for each level) storing the coarse patch electric field to be transformed
B_cpVector of three-dimensional arrays (for each level) storing the coarse patch magnetic field to be transformed

◆ PSATDForwardTransformF()

void WarpX::PSATDForwardTransformF ( )
private

Forward FFT of F on all mesh refinement levels.

◆ PSATDForwardTransformG()

void WarpX::PSATDForwardTransformG ( )
private

Forward FFT of G on all mesh refinement levels.

◆ PSATDForwardTransformJ()

void WarpX::PSATDForwardTransformJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_cp,
const bool  apply_kspace_filter = true 
)
private

Forward FFT of J on all mesh refinement levels, with k-space filtering (if needed)

Parameters
J_fpVector of three-dimensional arrays (for each level) storing the fine patch current to be transformed
J_cpVector of three-dimensional arrays (for each level) storing the coarse patch current to be transformed
[in]apply_kspace_filterControl whether to apply filtering (only used in RZ geometry to avoid double filtering)

◆ PSATDForwardTransformRho()

void WarpX::PSATDForwardTransformRho ( const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_fp,
const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_cp,
const int  icomp,
const int  dcomp,
const bool  apply_kspace_filter = true 
)
private

Forward FFT of rho on all mesh refinement levels, with k-space filtering (if needed)

Parameters
charge_fpVector (for each level) storing the fine patch charge to be transformed
charge_cpVector (for each level) storing the coarse patch charge to be transformed
[in]icompindex of fourth component (0 for rho_old, 1 for rho_new)
[in]dcompindex of spectral component (0 for rho_old, 1 for rho_new)
[in]apply_kspace_filterControl whether to apply filtering (only used in RZ geometry to avoid double filtering)

◆ PSATDMoveJNewToJOld()

void WarpX::PSATDMoveJNewToJOld ( )
private

Copy J_new to J_old in spectral space (when J is linear in time)

◆ PSATDMoveRhoNewToRhoOld()

void WarpX::PSATDMoveRhoNewToRhoOld ( )
private

Copy rho_new to rho_old in spectral space.

◆ PSATDPushSpectralFields()

void WarpX::PSATDPushSpectralFields ( )
private

Update all necessary fields in spectral space.

◆ PSATDScaleAverageFields()

void WarpX::PSATDScaleAverageFields ( const amrex::Real  scale_factor)
private

Scale averaged E,B fields to account for time integration.

Parameters
[in]scale_factorscalar to multiply each field component by

◆ PSATDSubtractCurrentPartialSumsAvg()

void WarpX::PSATDSubtractCurrentPartialSumsAvg ( )

Subtract the average of the cumulative sums of the preliminary current D from the current J (computed from D according to the Vay deposition scheme)

◆ PSATDVayDeposition()

void WarpX::PSATDVayDeposition ( )
private

Vay deposition in Fourier space (https://doi.org/10.1016/j.jcp.2013.03.010)

◆ PushParticlesandDepose() [1/2]

void WarpX::PushParticlesandDepose ( int  lev,
amrex::Real  cur_time,
DtType  a_dt_type = DtType::Full,
bool  skip_current = false 
)

◆ PushParticlesandDepose() [2/2]

void WarpX::PushParticlesandDepose ( amrex::Real  cur_time,
bool  skip_current = false 
)

◆ PushPSATD()

void WarpX::PushPSATD ( )
private

◆ ReadParameters()

void WarpX::ReadParameters ( )
private

◆ RefRatio()

IntVect WarpX::RefRatio ( int  lev)
static

◆ RemakeLevel()

void WarpX::RemakeLevel ( int  lev,
amrex::Real  time,
const amrex::BoxArray ba,
const amrex::DistributionMapping dm 
)
finalprotectedvirtual

Remake an existing level using provided BoxArray and DistributionMapping and fill with existing fine and coarse data. Called by AmrCore::regrid.

◆ ReorderFornbergCoefficients()

void WarpX::ReorderFornbergCoefficients ( amrex::Vector< amrex::Real > &  ordered_coeffs,
amrex::Vector< amrex::Real > &  unordered_coeffs,
const int  order 
)
private

Re-orders the Fornberg coefficients so that they can be used more conveniently for finite-order centering operations. For example, for finite-order centering of order 6, the Fornberg coefficients (c_0,c_1,c_2) are re-ordered as (c_2,c_1,c_0,c_0,c_1,c_2).

Parameters
[in,out]ordered_coeffshost vector where the re-ordered Fornberg coefficients will be stored
[in]unordered_coeffshost vector storing the original sequence of Fornberg coefficients
[in]orderorder of the finite-order centering along a given direction

◆ ResetCosts()

void WarpX::ResetCosts ( )

resets costs to zero

◆ ResetInstance()

void WarpX::ResetInstance ( )
static

◆ ResetProbDomain()

void WarpX::ResetProbDomain ( const amrex::RealBox rb)

◆ RestoreCurrent()

void WarpX::RestoreCurrent ( const int  lev)
private

◆ RestrictCurrentFromFineToCoarsePatch()

void WarpX::RestrictCurrentFromFineToCoarsePatch ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_cp,
const int  lev 
)
private

Fills the values of the current on the coarse patch by averaging the values of the current of the fine patch (on the same level).

◆ RestrictRhoFromFineToCoarsePatch()

void WarpX::RestrictRhoFromFineToCoarsePatch ( const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_fp,
const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &  charge_cp,
const int  lev 
)
private

◆ ScrapeParticles()

void WarpX::ScrapeParticles ( )
private

◆ setistep()

void WarpX::setistep ( int  lev,
int  ii 
)
inline

◆ setLoadBalanceEfficiency()

void WarpX::setLoadBalanceEfficiency ( const int  lev,
const amrex::Real  efficiency 
)
inline

◆ setPhiBC()

void WarpX::setPhiBC ( amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  phi) const

◆ sett_new()

void WarpX::sett_new ( int  lev,
amrex::Real  time 
)
inline

◆ ShiftGalileanBoundary()

void WarpX::ShiftGalileanBoundary ( )

This function shifts the boundary of the grid by 'm_v_galilean*dt'. In doding so, only positions attributes are changed while fields remain unchanged.

◆ shiftMF()

void WarpX::shiftMF ( amrex::MultiFab mf,
const amrex::Geometry geom,
int  num_shift,
int  dir,
const int  lev,
bool  update_cost_flag,
amrex::Real  external_field = 0.0,
bool  useparser = false,
amrex::ParserExecutor< 3 > const &  field_parser = {} 
)
static

◆ ShrinkBorrowing()

void WarpX::ShrinkBorrowing ( )

Shrink the vectors in the FaceInfoBoxes.

◆ stopTime()

amrex::Real WarpX::stopTime ( ) const
inline

◆ StoreCurrent()

void WarpX::StoreCurrent ( const int  lev)
private

◆ SumBoundaryJ() [1/2]

void WarpX::SumBoundaryJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  current,
const int  lev,
const int  idim,
const amrex::Periodicity period 
)
private

◆ SumBoundaryJ() [2/2]

void WarpX::SumBoundaryJ ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  current,
const int  lev,
const amrex::Periodicity period 
)
private

◆ SyncCurrent()

void WarpX::SyncCurrent ( const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_fp,
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 >> &  J_cp 
)

Apply filter and sum guard cells across MR levels. If current centering is used, center the current from a nodal grid to a staggered grid. For each MR level beyond level 0, interpolate the fine-patch current onto the coarse-patch current at the same level. Then, for each MR level, including level 0, apply filter and sum guard cells across levels.

Parameters
[in,out]J_fpreference to fine-patch current MultiFab (all MR levels)
[in,out]J_cpreference to coarse-patch current MultiFab (all MR levels)

◆ SyncCurrentAndRho()

void WarpX::SyncCurrentAndRho ( )

Synchronize J and rho: filter (if used), exchange guard cells, interpolate across MR levels. Contains separate calls to WarpX::SyncCurrent and WarpX::SyncRho.

◆ SyncRho()

void WarpX::SyncRho ( )

◆ UpdateAuxilaryData()

void WarpX::UpdateAuxilaryData ( )

◆ UpdateAuxilaryDataSameType()

void WarpX::UpdateAuxilaryDataSameType ( )

◆ UpdateAuxilaryDataStagToNodal()

void WarpX::UpdateAuxilaryDataStagToNodal ( )

◆ UpdateCurrentNodalToStag()

void WarpX::UpdateCurrentNodalToStag ( amrex::MultiFab dst,
amrex::MultiFab const &  src 
)

This function is called if warpx.do_current_centering = 1 and it centers the currents from a nodal grid to a staggered grid (Yee) using finite-order interpolation based on the Fornberg coefficients.

Parameters
[in,out]dstdestination MultiFab where the results of the finite-order centering are stored
[in]srcsource MultiFab that contains the values of the nodal current to be centered

◆ UpdatePlasmaInjectionPosition()

void WarpX::UpdatePlasmaInjectionPosition ( amrex::Real  dt)

◆ UpperCorner()

std::array< Real, 3 > WarpX::UpperCorner ( const amrex::Box bx,
const int  lev,
const amrex::Real  time_shift_delta 
)
static

Return the upper corner of the box in real units.

Parameters
bxThe box
levThe refinement level of the box
time_shift_deltaThe time relative to the current time at which to calculate the position (when v_galilean is not zero)
Returns
An array of the position coordinates

◆ Verbose()

int WarpX::Verbose ( ) const
inline

◆ Version()

std::string WarpX::Version ( )
static

Version of WarpX executable.

◆ WriteUsedInputsFile()

void WarpX::WriteUsedInputsFile ( ) const

Write a file that record all inputs: inputs file + command line options

Friends And Related Function Documentation

◆ PML

friend class PML
friend

Member Data Documentation

◆ authors

std::string WarpX::authors = ""
static

Author of an input file / simulation setup.

◆ B_ext_grid_s

std::string WarpX::B_ext_grid_s = "default"
static

Initialization type for external magnetic field on the grid.

◆ B_external_grid

Vector< Real > WarpX::B_external_grid
static

Initial magnetic field on the grid.

◆ beta_boost

Real WarpX::beta_boost = 0._rt
static

Beta value corresponding to the Lorentz factor of the boosted frame of the simulation.

◆ Bfield_aux

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_aux
private

◆ Bfield_avg_cp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_avg_cp
private

◆ Bfield_avg_fp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_avg_fp
private

◆ Bfield_cax

amrex::Vector<std::array<std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_cax
private

◆ Bfield_cp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_cp
private

◆ Bfield_fp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_fp
private

◆ Bfield_slice

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Bfield_slice
private

◆ bilinear_filter

BilinearFilter WarpX::bilinear_filter

◆ boost_direction

Vector< int > WarpX::boost_direction = {0,0,0}
static

Direction of the Lorentz transform that defines the boosted frame of the simulation.

◆ Bxfield_parser

std::unique_ptr<amrex::Parser> WarpX::Bxfield_parser

User-defined parser to initialize x-component of the magnetic field on the grid.

◆ Byfield_parser

std::unique_ptr<amrex::Parser> WarpX::Byfield_parser

User-defined parser to initialize y-component of the magnetic field on the grid.

◆ Bzfield_parser

std::unique_ptr<amrex::Parser> WarpX::Bzfield_parser

User-defined parser to initialize z-component of the magnetic field on the grid.

◆ cfl

amrex::Real WarpX::cfl = amrex::Real(0.999)
private

◆ charge_buf

amrex::Vector<std::unique_ptr<amrex::MultiFab> > WarpX::charge_buf
private

◆ charge_deposition_algo

short WarpX::charge_deposition_algo
static

Integer that corresponds to the charge deposition algorithm (only standard deposition)

◆ const_dt

amrex::Real WarpX::const_dt = amrex::Real(0.5e-11)
private

◆ costs

amrex::Vector<std::unique_ptr<amrex::LayoutData<amrex::Real> > > WarpX::costs
private

Collection of LayoutData to keep track of weights used in load balancing routines. Contains timer-based or heuristic-based costs depending on input option

◆ costs_heuristic_cells_wt

amrex::Real WarpX::costs_heuristic_cells_wt = amrex::Real(0)
private

Weight factor for cells in Heuristic costs update. Default values on GPU are determined from single-GPU tests on Summit. The problem setup for these tests is an empty (i.e. no particles) domain of size 256 by 256 by 256 cells, from which the average time per iteration per cell is computed.

◆ costs_heuristic_particles_wt

amrex::Real WarpX::costs_heuristic_particles_wt = amrex::Real(0)
private

Weight factor for particles in Heuristic costs update. Default values on GPU are determined from single-GPU tests on Summit. The problem setup for these tests is a high-ppc (27 particles per cell) uniform plasma on a domain of size 128 by 128 by 128, from which the approximate time per iteration per particle is computed.

◆ current_buf

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::current_buf
private

◆ current_buffer_masks

amrex::Vector<std::unique_ptr<amrex::iMultiFab> > WarpX::current_buffer_masks
private

◆ current_centering_nox

int WarpX::current_centering_nox = 2
static

Order of finite centering of currents (from nodal grid to staggered grid), along x.

◆ current_centering_noy

int WarpX::current_centering_noy = 2
static

Order of finite centering of currents (from nodal grid to staggered grid), along y.

◆ current_centering_noz

int WarpX::current_centering_noz = 2
static

Order of finite centering of currents (from nodal grid to staggered grid), along z.

◆ current_correction

bool WarpX::current_correction

If true, a correction is applied to the current in Fourier space,.

◆ current_cp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::current_cp
private

◆ current_deposition_algo

short WarpX::current_deposition_algo
static

Integer that corresponds to the current deposition algorithm (Esirkepov, direct, Vay)

◆ current_fp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::current_fp
private

◆ current_fp_nodal

amrex::Vector<std::array<std::unique_ptr<amrex::MultiFab>,3> > WarpX::current_fp_nodal
private

◆ current_fp_vay

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::current_fp_vay
private

◆ current_injection_position

amrex::Real WarpX::current_injection_position = 0
private

◆ current_slice

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::current_slice
private

◆ current_store

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::current_store
private

◆ device_current_centering_stencil_coeffs_x

amrex::Gpu::DeviceVector<amrex::Real> WarpX::device_current_centering_stencil_coeffs_x

◆ device_current_centering_stencil_coeffs_y

amrex::Gpu::DeviceVector<amrex::Real> WarpX::device_current_centering_stencil_coeffs_y

◆ device_current_centering_stencil_coeffs_z

amrex::Gpu::DeviceVector<amrex::Real> WarpX::device_current_centering_stencil_coeffs_z

◆ device_field_centering_stencil_coeffs_x

amrex::Gpu::DeviceVector<amrex::Real> WarpX::device_field_centering_stencil_coeffs_x

◆ device_field_centering_stencil_coeffs_y

amrex::Gpu::DeviceVector<amrex::Real> WarpX::device_field_centering_stencil_coeffs_y

◆ device_field_centering_stencil_coeffs_z

amrex::Gpu::DeviceVector<amrex::Real> WarpX::device_field_centering_stencil_coeffs_z

◆ do_back_transformed_diagnostics

bool WarpX::do_back_transformed_diagnostics = false
static

If true, then lab-frame data will be computed for boosted frame simulations with customized output format

◆ do_back_transformed_fields

bool WarpX::do_back_transformed_fields = true
static

If true, then lab-frame data will be computed for the fields and flushed out in customized format

◆ do_back_transformed_particles

bool WarpX::do_back_transformed_particles = true
static

If true, then lab-frame data will be computed for the particles and flushed out in customized format

◆ do_compute_max_step_from_zmax

bool WarpX::do_compute_max_step_from_zmax = false
static

Set to true if zmax_plasma_to_compute_max_step is specified, in which case the maximum number of iterations is computed automatically so that the lower end of the simulation domain along z reaches zmax_plasma_to_compute_max_step in the boosted frame

◆ do_current_centering

bool WarpX::do_current_centering = false
static

If true, the current is deposited on a nodal grid and then centered onto a staggered grid using finite centering of order given by current_centering_nox, current_centering_noy, and current_centering_noz

◆ do_device_synchronize

bool WarpX::do_device_synchronize = false
static

◆ do_divb_cleaning

bool WarpX::do_divb_cleaning = false
static

Solve additional Maxwell equation for G in order to control errors in magnetic Gauss' law.

◆ do_dive_cleaning

bool WarpX::do_dive_cleaning = false
static

Solve additional Maxwell equation for F in order to control errors in Gauss' law (useful when using current deposition algorithms that are not charge-conserving)

◆ do_dynamic_scheduling

bool WarpX::do_dynamic_scheduling = true
static

◆ do_electrostatic

int WarpX::do_electrostatic
static

◆ do_moving_window

int WarpX::do_moving_window = 0
static

◆ do_multi_J

bool WarpX::do_multi_J = false
static

◆ do_multi_J_n_depositions

int WarpX::do_multi_J_n_depositions
static

◆ do_nodal

bool WarpX::do_nodal = false
static

If true, all fields are evaluated on a nodal grid and all MultiFabs have a nodal index type.

◆ do_pml

int WarpX::do_pml = 0
private

◆ do_pml_divb_cleaning

bool WarpX::do_pml_divb_cleaning
private

◆ do_pml_dive_cleaning

bool WarpX::do_pml_dive_cleaning
private

◆ do_pml_Hi

amrex::Vector<amrex::IntVect> WarpX::do_pml_Hi
private

◆ do_pml_in_domain

int WarpX::do_pml_in_domain = 0
private

◆ do_pml_j_damping

int WarpX::do_pml_j_damping = 0
private

◆ do_pml_Lo

amrex::Vector<amrex::IntVect> WarpX::do_pml_Lo
private

◆ do_silver_mueller

int WarpX::do_silver_mueller = 0
private

◆ do_similar_dm_pml

int WarpX::do_similar_dm_pml = 1
staticprivate

◆ do_single_precision_comms

bool WarpX::do_single_precision_comms = false
static

perform field communications in single precision

◆ do_subcycling

bool WarpX::do_subcycling = false
static

◆ dt

amrex::Vector<amrex::Real> WarpX::dt
private

◆ dt_slice_snapshots_lab

Real WarpX::dt_slice_snapshots_lab
static

◆ dt_snapshots_lab

Real WarpX::dt_snapshots_lab = std::numeric_limits<Real>::lowest()
static

Time interval in lab-frame between the back-transformed snapshots.

◆ E_ext_grid_s

std::string WarpX::E_ext_grid_s = "default"
static

Initialization type for external electric field on the grid.

◆ E_external_grid

Vector< Real > WarpX::E_external_grid
static

Initial electric field on the grid.

◆ ECTRhofield

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::ECTRhofield
private

ECTRhofield is needed only by the ect solver and it contains the electromotive force density for every mesh face. The name ECTRhofield has been used to comply with the notation of the paper https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4463918 (page 9, equation 4 and below). Although it's called rho it has nothing to do with the charge density! This is only used for the ECT solver.

◆ Efield_aux

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_aux
private

◆ Efield_avg_cp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_avg_cp
private

◆ Efield_avg_fp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_avg_fp
private

◆ Efield_cax

amrex::Vector<std::array<std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_cax
private

◆ Efield_cp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_cp
private

◆ Efield_fp

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_fp
private

◆ Efield_slice

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Efield_slice
private

◆ em_solver_medium

int WarpX::em_solver_medium
static

Integer that corresponds to electromagnetic Maxwell solver (vaccum - 0, macroscopic - 1)

◆ end_moving_window_step

int WarpX::end_moving_window_step = -1
static

◆ Exfield_parser

std::unique_ptr<amrex::Parser> WarpX::Exfield_parser

User-defined parser to initialize x-component of the electric field on the grid.

◆ Eyfield_parser

std::unique_ptr<amrex::Parser> WarpX::Eyfield_parser

User-defined parser to initialize y-component of the electric field on the grid.

◆ Ezfield_parser

std::unique_ptr<amrex::Parser> WarpX::Ezfield_parser

User-defined parser to initialize z-component of the electric field on the grid.

◆ F_cp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::F_cp
private

◆ F_fp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::F_fp
private

◆ F_slice

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::F_slice
private

◆ fft_do_time_averaging

bool WarpX::fft_do_time_averaging = false
static

◆ fft_periodic_single_box

bool WarpX::fft_periodic_single_box = false
private

◆ field_boundary_hi

amrex::Vector< int > WarpX::field_boundary_hi
static

Integers that correspond to boundary condition applied to fields at the upper domain boundaries (0 to 6 correspond to PML, Periodic, PEC, PMC, Damped, Absorbing Silver-Mueller, None)

◆ field_boundary_lo

amrex::Vector< int > WarpX::field_boundary_lo
static

Integers that correspond to boundary condition applied to fields at the lower domain boundaries (0 to 6 correspond to PML, Periodic, PEC, PMC, Damped, Absorbing Silver-Mueller, None)

◆ field_centering_nox

int WarpX::field_centering_nox = 2
static

Order of finite centering of fields (from staggered grid to nodal grid), along x.

◆ field_centering_noy

int WarpX::field_centering_noy = 2
static

Order of finite centering of fields (from staggered grid to nodal grid), along y.

◆ field_centering_noz

int WarpX::field_centering_noz = 2
static

Order of finite centering of fields (from staggered grid to nodal grid), along z.

◆ field_gathering_algo

short WarpX::field_gathering_algo
static

Integer that corresponds to the field gathering algorithm (energy-conserving, momentum-conserving)

◆ field_io_nfiles

int WarpX::field_io_nfiles = 1024
private

◆ filter_npass_each_dir

IntVect WarpX::filter_npass_each_dir
static

◆ fine_tag_hi

amrex::RealVect WarpX::fine_tag_hi
private

◆ fine_tag_lo

amrex::RealVect WarpX::fine_tag_lo
private

◆ G_cp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::G_cp
private

◆ G_fp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::G_fp
private

◆ G_slice

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::G_slice
private

◆ galerkin_interpolation

bool WarpX::galerkin_interpolation = true
static

If true (Galerkin method): The fields are interpolated directly from the staggered grid to the particle positions (with reduced interpolation order in the parallel direction). This scheme is energy conserving in the limit of infinitely small time steps. Otherwise, "momentum conserving" (in the same limit): The fields are first interpolated from the staggered grid points to the corners of each cell, and then from the cell corners to the particle position (with the same order of interpolation in all directions). This scheme is momentum conserving in the limit of infinitely small time steps.

◆ gamma_boost

Real WarpX::gamma_boost = 1._rt
static

Lorentz factor of the boosted frame in which a boosted-frame simulation is run.

◆ gather_buffer_masks

amrex::Vector<std::unique_ptr<amrex::iMultiFab> > WarpX::gather_buffer_masks
private

◆ guard_cells

guardCellManager WarpX::guard_cells
private

◆ injected_plasma_species

amrex::Vector<int> WarpX::injected_plasma_species
private

◆ is_synchronized

bool WarpX::is_synchronized = true
private

◆ istep

amrex::Vector<int> WarpX::istep
private

◆ J_in_time

short WarpX::J_in_time
static

Integers that correspond to the time dependency of J (constant, linear) and rho (linear, quadratic) for the PSATD algorithm

◆ lab_data_directory

std::string WarpX::lab_data_directory = "lab_frame_data"
static

Name of the back-transformed diagnostics output directory.

◆ load_balance_costs_update_algo

short WarpX::load_balance_costs_update_algo
static

Records a number corresponding to the load balance cost update strategy being used (0, 1, 2 corresponding to timers, heuristic, or gpuclock).

◆ load_balance_efficiency

amrex::Vector<amrex::Real> WarpX::load_balance_efficiency
private

Current load balance efficiency for each level.

◆ load_balance_efficiency_ratio_threshold

amrex::Real WarpX::load_balance_efficiency_ratio_threshold = amrex::Real(1.1)
private

Threshold value that controls whether to adopt the proposed distribution mapping during load balancing. The new distribution mapping is adopted if the ratio of proposed distribution mapping efficiency to current distribution mapping efficiency is larger than the threshold; 'efficiency' here means the average cost per MPI rank.

◆ load_balance_intervals

utils::parser::IntervalsParser WarpX::load_balance_intervals
private

Load balancing intervals that reads the "load_balance_intervals" string int the input file for getting steps at which load balancing is performed

◆ load_balance_knapsack_factor

amrex::Real WarpX::load_balance_knapsack_factor = amrex::Real(1.24)
private

Controls the maximum number of boxes that can be assigned to a rank during load balance via the 'knapsack' strategy; e.g., if there are 4 boxes per rank, load_balance_knapsack_factor=2 limits the maximum number of boxes that can be assigned to a rank to 8.

◆ load_balance_with_sfc

int WarpX::load_balance_with_sfc = 0
private

Load balance with 'space filling curve' strategy.

◆ m_area_mod

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::m_area_mod
private

EB: m_area_mod contains the modified areas of the mesh faces, i.e. if a face is enlarged it contains the area of the enlarged face This is only used for the ECT solver.

◆ m_borrowing

amrex::Vector<std::array< std::unique_ptr<amrex::LayoutData<FaceInfoBox> >, 3 > > WarpX::m_borrowing
private

EB: m_borrowing contains the info about the enlarged cells, i.e. for every enlarged cell it contains the info of which neighbors are being intruded (and the amount of borrowed area). This is only used for the ECT solver.

◆ m_distance_to_eb

amrex::Vector<std::unique_ptr<amrex::MultiFab> > WarpX::m_distance_to_eb
private

◆ m_edge_lengths

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::m_edge_lengths
private

EB: Lengths of the mesh edges.

◆ m_face_areas

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::m_face_areas
private

EB: Areas of the mesh faces.

◆ m_fdtd_solver_cp

amrex::Vector<std::unique_ptr<FiniteDifferenceSolver> > WarpX::m_fdtd_solver_cp
private

◆ m_fdtd_solver_fp

amrex::Vector<std::unique_ptr<FiniteDifferenceSolver> > WarpX::m_fdtd_solver_fp
private

◆ m_field_factory

amrex::Vector<std::unique_ptr<amrex::FabFactory<amrex::FArrayBox> > > WarpX::m_field_factory
private

◆ m_fill_guards_current

amrex::IntVect WarpX::m_fill_guards_current = amrex::IntVect(0)
static

Whether to fill guard cells when computing inverse FFTs of currents.

◆ m_fill_guards_fields

amrex::IntVect WarpX::m_fill_guards_fields = amrex::IntVect(0)
static

Whether to fill guard cells when computing inverse FFTs of fields.

◆ m_flag_ext_face

amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>, 3 > > WarpX::m_flag_ext_face
private

EB: for every mesh face face flag_ext_face contains a:

◆ m_flag_info_face

amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>, 3 > > WarpX::m_flag_info_face
private

EB: for every mesh face flag_info_face contains a:

  • 0 if the face needs to be extended

1 if the face is large enough to lend area to other faces

  • 2 if the face is actually intruded by other face It is initialized in WarpX::MarkCells This is only used for the ECT solver.

◆ m_galilean_shift

amrex::Array<amrex::Real,3> WarpX::m_galilean_shift = {{0}}

◆ m_instance

WarpX * WarpX::m_instance = nullptr
staticprivate

◆ m_macroscopic_properties

std::unique_ptr<MacroscopicProperties> WarpX::m_macroscopic_properties
private

◆ m_particle_boundary_buffer

std::unique_ptr<ParticleBoundaryBuffer> WarpX::m_particle_boundary_buffer
private

particle buffer for scraped particles on the boundaries

◆ m_poisson_boundary_handler

ElectrostaticSolver::PoissonBoundaryHandler WarpX::m_poisson_boundary_handler

◆ m_rho_nodal_flag

amrex::IntVect WarpX::m_rho_nodal_flag

◆ m_v_comoving

amrex::Vector<amrex::Real> WarpX::m_v_comoving = amrex::Vector<amrex::Real>(3, amrex::Real(0.))

◆ m_v_galilean

amrex::Vector<amrex::Real> WarpX::m_v_galilean = amrex::Vector<amrex::Real>(3, amrex::Real(0.))

◆ macroscopic_solver_algo

int WarpX::macroscopic_solver_algo
static

Integer that correspond to macroscopic Maxwell solver algorithm (BackwardEuler - 0, Lax-Wendroff - 1)

◆ max_step

int WarpX::max_step = std::numeric_limits<int>::max()
private

◆ maxwell_solver_id

short WarpX::maxwell_solver_id
static

Integer that corresponds to the type of Maxwell solver (Yee, CKC, PSATD, ECT)

◆ mffile_nstreams

int WarpX::mffile_nstreams = 4
private

◆ mirror_z

amrex::Vector<amrex::Real> WarpX::mirror_z

◆ mirror_z_npoints

amrex::Vector<int> WarpX::mirror_z_npoints

◆ mirror_z_width

amrex::Vector<amrex::Real> WarpX::mirror_z_width

◆ moving_window_dir

int WarpX::moving_window_dir = -1
static

◆ moving_window_v

Real WarpX::moving_window_v = std::numeric_limits<amrex::Real>::max()
static

◆ moving_window_x

amrex::Real WarpX::moving_window_x = std::numeric_limits<amrex::Real>::max()
private

◆ multi_diags

std::unique_ptr<MultiDiagnostics> WarpX::multi_diags
private

◆ myBFD

std::unique_ptr<BackTransformedDiagnostic> WarpX::myBFD
private

◆ mypc

std::unique_ptr<MultiParticleContainer> WarpX::mypc
private

◆ n_current_deposition_buffer

int WarpX::n_current_deposition_buffer = -1
static

With mesh refinement, particles located inside a refinement patch, but within n_current_deposition_buffer cells of the edge of the patch, will deposit their charge and current onto the lower refinement level instead of the refinement patch itself

◆ n_field_gather_buffer

int WarpX::n_field_gather_buffer = -1
static

With mesh refinement, particles located inside a refinement patch, but within n_field_gather_buffer cells of the edge of the patch, will gather the fields from the lower refinement level instead of the refinement patch itself

◆ n_rz_azimuthal_modes

int WarpX::n_rz_azimuthal_modes = 1
static

Number of modes for the RZ multi-mode version.

◆ nci_godfrey_filter_bxbyez

amrex::Vector< std::unique_ptr<NCIGodfreyFilter> > WarpX::nci_godfrey_filter_bxbyez

◆ nci_godfrey_filter_exeybz

amrex::Vector< std::unique_ptr<NCIGodfreyFilter> > WarpX::nci_godfrey_filter_exeybz

◆ ncomps

int WarpX::ncomps = 1
static

Number of MultiFab components (with the RZ multi-mode version, each mode has a real and imaginary component, except mode 0 which is purely real: component 0 is mode 0, odd components are the real parts, even components are the imaginary parts)

◆ nox

int WarpX::nox = 0
static

Order of the particle shape factors (splines) along x.

◆ nox_fft

int WarpX::nox_fft = 16
private

◆ noy

int WarpX::noy = 0
static

Order of the particle shape factors (splines) along y.

◆ noy_fft

int WarpX::noy_fft = 16
private

◆ noz

int WarpX::noz = 0
static

Order of the particle shape factors (splines) along z.

◆ noz_fft

int WarpX::noz_fft = 16
private

◆ nsubsteps

amrex::Vector<int> WarpX::nsubsteps
private

◆ num_injected_species

int WarpX::num_injected_species = -1
private

◆ num_mirrors

int WarpX::num_mirrors = 0
static

◆ num_slice_snapshots_lab

int WarpX::num_slice_snapshots_lab = 0
static

◆ num_snapshots_lab

int WarpX::num_snapshots_lab = std::numeric_limits<int>::lowest()
static

Number of back-tranformed snapshots in the lab-frame.

◆ numprocs

amrex::IntVect WarpX::numprocs {0}
private

Domain decomposition on Level 0.

◆ override_sync_intervals

utils::parser::IntervalsParser WarpX::override_sync_intervals
private

◆ particle_boundary_hi

amrex::Vector< ParticleBoundaryType > WarpX::particle_boundary_hi
static

Integers that correspond to boundary condition applied to particles at the upper domain boundaries (0 to 3 correspond to Absorbing, Open, Reflecting, Periodic)

◆ particle_boundary_lo

amrex::Vector< ParticleBoundaryType > WarpX::particle_boundary_lo
static

Integers that correspond to boundary condition applied to particles at the lower domain boundaries (0 to 3 correspond to Absorbing, Open, Reflecting, Periodic)

◆ particle_io_nfiles

int WarpX::particle_io_nfiles = 1024
private

◆ particle_pusher_algo

short WarpX::particle_pusher_algo
static

Integer that corresponds to the particle push algorithm (Boris, Vay, Higuera-Cary)

◆ particle_slice_width_lab

Real WarpX::particle_slice_width_lab = 0.0_rt
static

◆ phi_fp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::phi_fp
private

◆ plotfile_headerversion

amrex::VisMF::Header::Version WarpX::plotfile_headerversion = amrex::VisMF::Header::Version_v1
private

◆ pml

amrex::Vector<std::unique_ptr<PML> > WarpX::pml
private

◆ pml_delta

int WarpX::pml_delta = 10
private

◆ pml_has_particles

int WarpX::pml_has_particles = 0
private

◆ pml_ncell

int WarpX::pml_ncell = 10
private

◆ pml_rz

amrex::Vector<std::unique_ptr<PML_RZ> > WarpX::pml_rz
private

◆ quantum_xi_c2

Real WarpX::quantum_xi_c2 = PhysConst::xi_c2
static

◆ reduced_diags

std::unique_ptr<MultiReducedDiags> WarpX::reduced_diags

object with all reduced diagnotics, similar to MultiParticleContainer for species.

◆ refine_plasma

bool WarpX::refine_plasma = false
static

◆ regrid_int

int WarpX::regrid_int = -1
private

◆ restart_chkfile

std::string WarpX::restart_chkfile
private

◆ rho_cp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::rho_cp
private

◆ rho_fp

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::rho_fp
private

◆ rho_in_time

short WarpX::rho_in_time
static

◆ rho_slice

amrex::Vector< std::unique_ptr<amrex::MultiFab> > WarpX::rho_slice
private

◆ safe_guard_cells

bool WarpX::safe_guard_cells = 0
static

◆ self_fields_absolute_tolerance

Real WarpX::self_fields_absolute_tolerance = 0.0_rt
static

◆ self_fields_max_iters

int WarpX::self_fields_max_iters = 200
static

◆ self_fields_required_precision

Real WarpX::self_fields_required_precision = 1.e-11_rt
static

◆ self_fields_verbosity

int WarpX::self_fields_verbosity = 2
static

◆ serialize_initial_conditions

bool WarpX::serialize_initial_conditions = false
static

If true, the initial conditions from random number generators are serialized (useful for reproducible testing with OpenMP)

◆ slice_cr_ratio

amrex::IntVect WarpX::slice_cr_ratio
private

◆ slice_max_grid_size

int WarpX::slice_max_grid_size
private

◆ slice_plot_int

int WarpX::slice_plot_int = -1
private

◆ slice_plotfile_headerversion

amrex::VisMF::Header::Version WarpX::slice_plotfile_headerversion = amrex::VisMF::Header::Version_v1
private

◆ slice_realbox

amrex::RealBox WarpX::slice_realbox
private

◆ sort_bin_size

amrex::IntVect WarpX::sort_bin_size
static

◆ sort_intervals

utils::parser::IntervalsParser WarpX::sort_intervals
static

◆ spectral_solver_cp

amrex::Vector<std::unique_ptr<SpectralSolverRZ> > WarpX::spectral_solver_cp
private

◆ spectral_solver_fp

amrex::Vector<std::unique_ptr<SpectralSolverRZ> > WarpX::spectral_solver_fp
private

◆ start_moving_window_step

int WarpX::start_moving_window_step = 0
static

◆ stop_time

amrex::Real WarpX::stop_time = std::numeric_limits<amrex::Real>::max()
private

◆ str_Bx_ext_grid_function

std::string WarpX::str_Bx_ext_grid_function
static

String storing parser function to initialize x-component of the magnetic field on the grid.

◆ str_By_ext_grid_function

std::string WarpX::str_By_ext_grid_function
static

String storing parser function to initialize y-component of the magnetic field on the grid.

◆ str_Bz_ext_grid_function

std::string WarpX::str_Bz_ext_grid_function
static

String storing parser function to initialize z-component of the magnetic field on the grid.

◆ str_Ex_ext_grid_function

std::string WarpX::str_Ex_ext_grid_function
static

String storing parser function to initialize x-component of the electric field on the grid.

◆ str_Ey_ext_grid_function

std::string WarpX::str_Ey_ext_grid_function
static

String storing parser function to initialize y-component of the electric field on the grid.

◆ str_Ez_ext_grid_function

std::string WarpX::str_Ez_ext_grid_function
static

String storing parser function to initialize z-component of the electric field on the grid.

◆ sync_nodal_points

const bool WarpX::sync_nodal_points = true
private

◆ t_new

amrex::Vector<amrex::Real> WarpX::t_new
private

◆ t_old

amrex::Vector<amrex::Real> WarpX::t_old
private

◆ time_of_last_gal_shift

amrex::Real WarpX::time_of_last_gal_shift = 0

◆ update_with_rho

bool WarpX::update_with_rho = false

If true, the PSATD update equation for E contains both J and rho (default is false for standard PSATD and true for Galilean PSATD)

◆ use_fdtd_nci_corr

bool WarpX::use_fdtd_nci_corr = false
static

If true, a Numerical Cherenkov Instability (NCI) corrector is applied (for simulations using the FDTD Maxwell solver)

◆ use_filter

bool WarpX::use_filter = true
static

If true, a bilinear filter is used to smooth charge and currents.

◆ use_filter_compensation

bool WarpX::use_filter_compensation = false
static

If true, a compensation step is added to the bilinear filtering of charge and currents.

◆ use_hybrid_QED

bool WarpX::use_hybrid_QED = 0
private

◆ use_kspace_filter

bool WarpX::use_kspace_filter = true
static

If true, the bilinear filtering of charge and currents is done in Fourier space.

◆ use_single_read

bool WarpX::use_single_read = true
private

◆ use_single_write

bool WarpX::use_single_write = true
private

◆ v_particle_pml

amrex::Real WarpX::v_particle_pml
private

◆ Venl

amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > WarpX::Venl
private

Venl contains the electromotive force for every mesh face, i.e. every entry is the corresponding entry in ECTRhofield multiplied by the total area (possibly with enlargement) This is only used for the ECT solver.

◆ verbose

int WarpX::verbose = 1
private

◆ warpx_do_continuous_injection

int WarpX::warpx_do_continuous_injection = 0
private

◆ zmax_plasma_to_compute_max_step

Real WarpX::zmax_plasma_to_compute_max_step = 0._rt
static

If specified, the maximum number of iterations is computed automatically so that the lower end of the simulation domain along z reaches zmax_plasma_to_compute_max_step in the boosted frame


The documentation for this class was generated from the following files: