WarpX
Loading...
Searching...
No Matches
WarpX Class Reference

#include <WarpX.H>

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

Public Member Functions

 ~WarpX () override
 
 WarpX (WarpX const &)=delete
 
WarpXoperator= (WarpX const &)=delete
 
 WarpX (WarpX &&)=delete
 
WarpXoperator= (WarpX &&)=delete
 
int Verbose () const
 
const amrex::Array< FieldBoundaryType, 3 > & GetFieldBoundaryLo () const
 
const amrex::Array< FieldBoundaryType, 3 > & GetFieldBoundaryHi () const
 
void InitData ()
 
void Evolve (int numsteps=-1)
 
void SynchronizeVelocityWithPosition ()
 
void SyncMassMatricesPC ()
 
void SaveParticlesAtImplicitStepStart ()
 
void FinishImplicitParticleUpdate ()
 
void SetElectricFieldAndApplyBCs (const WarpXSolverVec &a_E, amrex::Real a_time)
 
void UpdateMagneticFieldAndApplyBCs (ablastr::fields::MultiLevelVectorField const &a_Bn, amrex::Real a_thetadt, amrex::Real start_time)
 
void SpectralSourceFreeFieldAdvance (amrex::Real start_time)
 
void FinishMagneticFieldAndApplyBCs (ablastr::fields::MultiLevelVectorField const &a_Bn, amrex::Real a_theta, amrex::Real a_time)
 
void FinishImplicitField (const ablastr::fields::MultiLevelVectorField &Field_fp, const ablastr::fields::MultiLevelVectorField &Field_n, amrex::Real theta)
 
void ImplicitComputeRHSE (amrex::Real dt, WarpXSolverVec &a_Erhs_vec)
 
void ImplicitComputeRHSE (int lev, amrex::Real dt, WarpXSolverVec &a_Erhs_vec)
 
void ImplicitComputeRHSE (int lev, PatchType patch_type, amrex::Real dt, WarpXSolverVec &a_Erhs_vec)
 
MultiParticleContainerGetPartContainer ()
 
MultiFluidContainerGetFluidContainer ()
 
ElectrostaticSolverGetElectrostaticSolver ()
 
HybridPICModelget_pointer_HybridPICModel () const
 
MultiDiagnosticsGetMultiDiags ()
 
ParticleBoundaryBufferGetParticleBoundaryBuffer ()
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > & GetEBUpdateEFlag ()
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > & GetEBUpdateBFlag ()
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > const & GetEBReduceParticleShapeFlag () const
 
std::string GetAuthors () const
 If an authors' string is specified in the inputfile, this method returns that string. Otherwise, it returns an empty string.
 
void AllocInitMultiFab (std::unique_ptr< amrex::iMultiFab > &mf, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, int ncomp, const amrex::IntVect &ngrow, int level, const std::string &name, std::optional< const int > initial_value={})
 Allocate and optionally initialize the iMultiFab. This also adds the iMultiFab to the map of MultiFabs (used to ease the access to MultiFabs from the Python interface.
 
const amrex::iMultiFabgetFieldDotMaskPointer (warpx::fields::FieldType field_type, int lev, ablastr::fields::Direction dir) const
 Get pointer to the amrex::MultiFab containing the dotMask for the specified field.
 
bool DoPML () const
 
bool DoFluidSpecies () const
 
std::vector< bool > getPMLdirections () const
 
void setLoadBalanceEfficiency (int lev, amrex::Real efficiency)
 
amrex::Real getLoadBalanceEfficiency (int lev)
 
void applyMirrors (amrex::Real time)
 
void ComputeDt ()
 
void UpdateDtFromParticleSpeeds ()
 
void PrintMainPICparameters ()
 
void ComputeMaxStep ()
 Compute the last time step of the simulation Calls computeMaxStepBoostAccelerator() if required.
 
void computeMaxStepBoostAccelerator ()
 
int MoveWindow (int step, bool move_j)
 Move the moving window.
 
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.
 
void ResetProbDomain (const amrex::RealBox &rb)
 
void EvolveE (amrex::Real dt, amrex::Real start_time)
 
void EvolveE (int lev, amrex::Real dt, amrex::Real start_time)
 
void EvolveB (amrex::Real dt, SubcyclingHalf subcycling_half, amrex::Real start_time)
 
void EvolveB (int lev, amrex::Real dt, SubcyclingHalf subcycling_half, amrex::Real start_time)
 
void EvolveF (amrex::Real dt, int const rho_comp)
 
void EvolveF (int lev, amrex::Real dt, int const rho_comp)
 
void EvolveG (amrex::Real dt)
 
void EvolveG (int lev, amrex::Real dt)
 
void EvolveB (int lev, PatchType patch_type, amrex::Real dt, SubcyclingHalf subcycling_half, amrex::Real start_time)
 
void EvolveE (int lev, PatchType patch_type, amrex::Real dt, amrex::Real start_time)
 
void EvolveF (int lev, PatchType patch_type, amrex::Real dt, int const rho_comp)
 
void EvolveG (int lev, PatchType patch_type, amrex::Real dt)
 
void MacroscopicEvolveE (amrex::Real dt, amrex::Real start_time)
 
void MacroscopicEvolveE (int lev, amrex::Real dt, amrex::Real start_time)
 
void MacroscopicEvolveE (int lev, PatchType patch_type, amrex::Real dt, amrex::Real start_time)
 
void HybridPICEvolveFields ()
 Hybrid-PIC field evolve function. This function contains the logic involved in evolving the electric and magnetic fields in the hybrid PIC algorithm.
 
void HybridPICInitializeRhoJandB ()
 Hybrid-PIC initial deposition function. The hybrid-PIC algorithm uses the charge and current density from both the current and previous step when updating the fields. This function deposits the initial ion charge and current (before the first particle push), to be used in the HybridPICEvolveFields() function.
 
void HybridPICDepositRhoAndJ ()
 Hybrid-PIC deposition function. Helper function to contain all the needed logic to deposit charge and current densities for use in the Ohm's law solver. The deposition is done into the rho_fp and current_fp multifabs.
 
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 CheckLoadBalance (int step)
 
void LoadBalance ()
 perform load balance; compute and communicate new amrex::DistributionMapping
 
void ResetCosts ()
 resets costs to zero
 
void RescaleCosts (int step)
 
utils::parser::IntervalsParser get_load_balance_intervals () const
 returns the load balance interval
 
void DampFieldsInGuards (int lev, const ablastr::fields::VectorField &Efield, const ablastr::fields::VectorField &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.
 
void DampFieldsInGuards (int lev, 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.
 
void ApplyInverseVolumeScalingToCurrentDensity (amrex::MultiFab *Jx, amrex::MultiFab *Jy, amrex::MultiFab *Jz, int lev) const
 
void ApplyInverseVolumeScalingToChargeDensity (amrex::MultiFab *Rho, int lev) const
 
void ApplyRhofieldBoundary (int lev, amrex::MultiFab *Rho, PatchType patch_type)
 If a PEC boundary conditions is used the charge density deposited in the guard cells have to be reflected back into the simulation domain. This function performs that logic.
 
void ApplyJfieldBoundary (int lev, amrex::MultiFab *Jx, amrex::MultiFab *Jy, amrex::MultiFab *Jz, PatchType patch_type)
 If a PEC boundary conditions is used the current density deposited in the guard cells have to be reflected back into the simulation domain. This function performs that logic.
 
void ApplyEfieldBoundary (int lev, PatchType patch_type, amrex::Real cur_time)
 
void ApplyBfieldBoundary (int lev, PatchType patch_type, SubcyclingHalf subcycling_half, amrex::Real cur_time)
 
void ApplyFieldBoundaryOnAxis (amrex::MultiFab *Er, amrex::MultiFab *Et, amrex::MultiFab *Ez, int lev) const
 
void ApplyElectronPressureBoundary (int lev, PatchType patch_type)
 When the Ohm's law solver is used, the electron pressure values on PEC boundaries are set to enforce a zero derivative Neumann condition, otherwise the E_perp values have large spikes (that grows as 1/dx). This has to be done since the E-field is algebraically calculated instead of evolved which means the 1/dx growth is not avoided by multiplication with dt as happens in the B-field evolve.
 
void DampPML ()
 
void DampPML (int lev)
 
void DampPML (int lev, PatchType patch_type)
 
void DampPML_Cartesian (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.
 
PMLGetPML (int lev)
 
PML_RZGetPML_RZ (int lev)
 
void doFieldIonization ()
 
void doQEDEvents ()
 
void PushParticlesandDeposit (int lev, amrex::Real cur_time, SubcyclingHalf subcycling_half=SubcyclingHalf::None, bool skip_current=false, ImplicitOptions const *implicit_options=nullptr)
 
void PushParticlesandDeposit (amrex::Real cur_time, bool skip_current=false, ImplicitOptions const *implicit_options=nullptr)
 
void UpdateAuxilaryData ()
 
void UpdateAuxilaryDataStagToNodal ()
 
void UpdateAuxilaryDataSameType ()
 
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 and apply boundary conditions. Contains separate calls to WarpX::SyncCurrent and WarpX::SyncRho.
 
void SyncCurrent (const std::string &current_fp_string)
 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.
 
void SyncRho ()
 
void SyncRho (const ablastr::fields::MultiLevelScalarField &charge_fp, const ablastr::fields::MultiLevelScalarField &charge_cp, ablastr::fields::MultiLevelScalarField const &charge_buffer)
 
amrex::Vector< int > getnsubsteps () const
 
int getnsubsteps (int lev) const
 
amrex::Vector< int > getistep () 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
 
bool getis_synchronized () const
 
int maxStep () const
 
void updateMaxStep (const int new_max_step)
 
amrex::Real stopTime () const
 
void updateStopTime (const amrex::Real new_stop_time)
 
void ComputeDivE (amrex::MultiFab &divE, int lev)
 
void ProjectionCleanDivB ()
 
void CalculateExternalCurlA ()
 
amrex::IntVect getngEB () const
 
amrex::IntVect getngF () const
 
amrex::IntVect getngUpdateAux () const
 
amrex::IntVect get_ng_depos_J () const
 
amrex::IntVect get_ng_depos_rho () const
 
amrex::IntVect get_ng_fieldgather () const
 
amrex::IntVect get_numprocs () const
 
void ComputeSpaceChargeField (bool reset_fields)
 
void ComputeMagnetostaticField ()
 
void AddMagnetostaticFieldLabFrame ()
 
void computeVectorPotential (ablastr::fields::MultiLevelVectorField const &curr, ablastr::fields::MultiLevelVectorField const &A, amrex::Real required_precision=amrex::Real(1.e-11), amrex::Real absolute_tolerance=amrex::Real(0.0), int max_iters=200, int verbosity=2)
 
void setVectorPotentialBC (ablastr::fields::MultiLevelVectorField const &A) const
 
void ComputeExternalFieldOnGridUsingParser (const std::variant< warpx::fields::FieldType, std::string > &field, amrex::ParserExecutor< 4 > const &fx_parser, amrex::ParserExecutor< 4 > const &fy_parser, amrex::ParserExecutor< 4 > const &fz_parser, int lev, PatchType patch_type, amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > const &eb_update_field, bool use_eb_flags=true)
 This function computes the E, B, and J 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.
 
void LoadExternalFields (int lev)
 Load field values from a user-specified openPMD file, for the fields Ex, Ey, Ez, Bx, By, Bz.
 
void ReadExternalFieldFromFile (const std::string &read_fields_from_path, amrex::MultiFab *mf, const std::string &F_name, const std::string &F_component)
 Load field values from a user-specified openPMD file for a specific field (specified by F_name)
 
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.
 
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
 
void ApplyFilterandSumBoundaryRho (int lev, int glev, amrex::MultiFab &rho, int icomp, int ncomp)
 
void ApplyFilterMF (const ablastr::fields::MultiLevelVectorField &mfvec, int lev, int idim)
 
void ApplyFilterMF (const ablastr::fields::MultiLevelVectorField &mfvec, int lev)
 
void ErrorEst (int lev, amrex::TagBoxArray &tags, amrex::Real time, int) final
 Tagging cells for refinement.
 
const AcceleratorLatticeget_accelerator_lattice (int lev)
 
void BuildBufferMasksInBox (amrex::Box tbx, amrex::IArrayBox &buffer_mask, const amrex::IArrayBox &guard_mask, int ng)
 Build buffer mask within given FArrayBox.
 
void InitEB ()
 
void ComputeDistanceToEB ()
 Compute the level set function used for particle-boundary interaction.
 
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.
 
void InitBorrowing ()
 Initialize the memory for the FaceInfoBoxes.
 
void ShrinkBorrowing ()
 Shrink the vectors in the FaceInfoBoxes.
 
void ComputeOneWayExtensions ()
 Do the one-way extension.
 
void ComputeEightWaysExtensions ()
 Do the eight-ways extension.
 
auto & get_spectral_solver_fp (int lev)
 
FiniteDifferenceSolverget_pointer_fdtd_solver_fp (int lev)
 
ablastr::fields::MultiFabRegisterGetMultiFabRegister ()
 
void PostProcessBaseGrids (amrex::BoxArray &ba0) const final
 
- 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, 3 > const &is_per)
 
 AmrCore (Geometry const &level_0_geom, AmrInfo const &amr_info)
 
 AmrCore (AmrCore &&rhs) noexcept
 
AmrCoreoperator= (AmrCore &&rhs) noexcept
 
 AmrCore (const AmrCore &rhs)=delete
 
AmrCoreoperator= (const AmrCore &rhs)=delete
 
 ~AmrCore () override
 
AmrParGDBGetParGDB () const noexcept
 
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 &a_refrat, Array< int, 3 > 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) const 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) const 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) const noexcept
 

Static Public Member Functions

static WarpXGetInstance ()
 
static void ResetInstance ()
 
static void Finalize ()
 This method has to be called at the end of the simulation. It deletes the WarpX instance.
 
static std::string Version ()
 Version of WarpX executable.
 
static std::string PicsarVersion ()
 Version of PICSAR dependency.
 
static amrex::LayoutData< amrex::Real > * getCosts (int lev)
 
static bool isAnyParticleBoundaryThermal ()
 
static std::array< amrex::Real, 3 > CellSize (int lev)
 
static amrex::XDim3 InvCellSize (int lev)
 
static amrex::RealBox getRealBox (const amrex::Box &bx, int lev)
 
static amrex::XDim3 LowerCorner (const amrex::Box &bx, int lev, amrex::Real time_shift_delta)
 Return the lower corner of the box in real units.
 
static amrex::XDim3 UpperCorner (const amrex::Box &bx, int lev, amrex::Real time_shift_delta)
 Return the upper corner of the box in real units.
 
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 dcomp, ablastr::fields::VectorField const &B, const std::array< amrex::Real, 3 > &dx)
 
static void ComputeDivB (amrex::MultiFab &divB, int dcomp, ablastr::fields::VectorField const &B, const std::array< amrex::Real, 3 > &dx, amrex::IntVect ngrow)
 

Public Attributes

int maxlevel_extEMfield_init
 
EvolveScheme evolve_scheme = EvolveScheme::Default
 Integer that corresponds to the evolve scheme (explicit, semi_implicit_em, theta_implicit_em)
 
bool do_current_centering = false
 
bool current_correction = true
 If true, a correction is applied to the current in Fourier space,.
 
bool update_with_rho = false
 
amrex::IntVect m_rho_nodal_flag
 
std::map< std::string, amrex::iMultiFab * > imultifab_map
 
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.))
 
std::unique_ptr< MultiReducedDiagsreduced_diags
 object with all reduced diagnostics, similar to MultiParticleContainer for species.
 
amrex::Real m_quantum_xi_c2
 
MagnetostaticSolver::VectorPoissonBoundaryHandler m_vector_poisson_boundary_handler
 
int magnetostatic_solver_max_iters = 200
 
int magnetostatic_solver_verbosity = 2
 
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
 
ablastr::fields::MultiFabRegister m_fields
 

Static Public Attributes

static auto current_deposition_algo = CurrentDepositionAlgo::Default
 Integer that corresponds to the current deposition algorithm (Esirkepov, direct, Vay, Villasenor)
 
static auto charge_deposition_algo = ChargeDepositionAlgo::Default
 Integer that corresponds to the charge deposition algorithm (only standard deposition)
 
static auto field_gathering_algo = GatheringAlgo::Default
 Integer that corresponds to the field gathering algorithm (energy-conserving, momentum-conserving)
 
static auto particle_pusher_algo = ParticlePusherAlgo::Default
 Integer that corresponds to the particle push algorithm (Boris, Vay, Higuera-Cary)
 
static auto electromagnetic_solver_id = ElectromagneticSolverAlgo::Default
 Integer that corresponds to the type of Maxwell solver (Yee, CKC, PSATD, ECT)
 
static auto load_balance_costs_update_algo = LoadBalanceCostsUpdateAlgo::Default
 
static amrex::Array< FieldBoundaryType, 3 > field_boundary_lo
 
static amrex::Array< FieldBoundaryType, 3 > field_boundary_hi
 
static amrex::Array< ParticleBoundaryType, 3 > particle_boundary_lo
 
static amrex::Array< ParticleBoundaryType, 3 > particle_boundary_hi
 
static auto time_dependency_J = TimeDependencyJ::Default
 
static auto time_dependency_rho = TimeDependencyRho::Default
 
static bool do_single_precision_comms = false
 perform field communications in single precision
 
static bool do_shared_mem_charge_deposition = false
 used shared memory algorithm for charge deposition
 
static bool do_shared_mem_current_deposition = false
 use shared memory algorithm for current deposition
 
static int shared_mem_current_tpb = 128
 number of threads to use per block in shared deposition
 
static amrex::IntVect shared_tilesize
 tileSize to use for shared current deposition operations
 
static amrex::IntVect m_fill_guards_fields = amrex::IntVect(0)
 Whether to fill guard cells when computing inverse FFTs of fields.
 
static amrex::IntVect m_fill_guards_current = amrex::IntVect(0)
 Whether to fill guard cells when computing inverse FFTs of currents.
 
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.
 
static int nox = 0
 Order of the particle shape factors (splines) along x.
 
static int noy = 0
 Order of the particle shape factors (splines) along y.
 
static int noz = 0
 Order of the particle shape factors (splines) along z.
 
static int particle_max_grid_crossings = 1
 Maximum number of allowed grid crossings for particles.
 
static int field_centering_nox = 2
 Order of finite centering of fields (from staggered grid to nodal grid), along x.
 
static int field_centering_noy = 2
 Order of finite centering of fields (from staggered grid to nodal grid), along y.
 
static int field_centering_noz = 2
 Order of finite centering of fields (from staggered grid to nodal grid), along z.
 
static int n_rz_azimuthal_modes = 1
 Number of modes for the RZ multi-mode version.
 
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.
 
static bool use_kspace_filter = true
 If true, the bilinear filtering of charge and currents is done in Fourier space.
 
static bool use_filter_compensation = false
 If true, a compensation step is added to the bilinear filtering of charge and currents.
 
static bool serialize_initial_conditions = false
 If true, the initial conditions from random number generators are serialized (useful for reproducible testing with OpenMP)
 
static amrex::Real gamma_boost = 1._rt
 Lorentz factor of the boosted frame in which a boosted-frame simulation is run.
 
static amrex::Real beta_boost = 0._rt
 Beta value corresponding to the Lorentz factor of the boosted frame of the simulation.
 
static amrex::Vector< int > boost_direction = {0,0,0}
 Direction of the Lorentz transform that defines the boosted frame of the simulation.
 
static amrex::Real zmin_domain_boost_step_0 = 0._rt
 
static bool compute_max_step_from_btd = false
 If true, the code will compute max_step from the back transformed diagnostics.
 
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 sort_particles_for_deposition
 If true, particles will be sorted in the order x -> y -> z -> ppc for faster deposition.
 
static amrex::IntVect sort_idx_type
 Specifies the type of grid used for the above sorting, i.e. cell-centered, nodal, or mixed.
 
static int n_field_gather_buffer = -1
 
static int n_current_deposition_buffer = -1
 
static auto grid_type = ablastr::utils::enums::GridType::Default
 
static amrex::IntVect filter_npass_each_dir
 
static auto electrostatic_solver_id = ElectrostaticSolverAlgo::Default
 
static auto poisson_solver_id = PoissonSolverAlgo::Default
 
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
 

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_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_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.
 
amrex::DistributionMapping MakeDistributionMap (int lev, amrex::BoxArray const &ba) final
 Use this function to override how DistributionMapping is made.
 
void MakeNewLevelFromScratch (int lev, amrex::Real time, const amrex::BoxArray &new_grids, const amrex::DistributionMapping &new_dmap) final
 
void MakeNewLevelFromCoarse (int, amrex::Real, const amrex::BoxArray &, const amrex::DistributionMapping &) final
 
void RemakeLevel (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) final
 
void ClearLevel (int lev) final
 Delete level data. Called by AmrCore::regrid.
 
- Protected Member Functions inherited from amrex::AmrCore
void ErrorEst (int lev, TagBoxArray &tags, Real time, int ngrow) override=0
 
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

 WarpX ()
 WarpX constructor. This method should not be called directly, but rather through the static member function MakeWarpX(). MakeWarpX() is called by GetInstance () if an instance of the WarpX class does not currently exist.
 
void HandleSignals ()
 Complete the asynchronous broadcast of signal flags, and initiate a checkpoint if requested.
 
void FillBoundaryB (int lev, PatchType patch_type, amrex::IntVect ng, std::optional< bool > nodal_sync=std::nullopt)
 
void FillBoundaryE (int lev, PatchType patch_type, 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 AddExternalFields (int lev)
 
void OneStep (amrex::Real a_cur_time, amrex::Real a_dt, int a_step)
 Perform collisions, particle injection, and advance fields and particles by one time step.
 
void OneStep_nosub (amrex::Real cur_time)
 Perform one PIC iteration, without subcycling i.e. all levels/patches use the same timestep (that of the finest level) for the field advance and particle pusher.
 
void OneStep_sub1 (amrex::Real cur_time)
 Perform one PIC iteration, with subcycling i.e. The fine patch uses a smaller timestep (and steps more often) than the coarse patch, for the field advance and particle pusher.
 
void OneStep_JRhom (amrex::Real cur_time)
 Perform one PIC iteration, with the multiple J deposition per time step.
 
void RestrictCurrentFromFineToCoarsePatch (const ablastr::fields::MultiLevelVectorField &J_fp, const ablastr::fields::MultiLevelVectorField &J_cp, 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).
 
void AddCurrentFromFineLevelandSumBoundary (const ablastr::fields::MultiLevelVectorField &J_fp, const ablastr::fields::MultiLevelVectorField &J_cp, const ablastr::fields::MultiLevelVectorField &J_buffer, int lev)
 Update the currents of lev by adding the currents from particles that are in the mesh refinement patches at lev+1
 
void SumBoundaryJ (const ablastr::fields::MultiLevelVectorField &current, int lev, int idim, const amrex::Periodicity &period)
 
void SumBoundaryJ (const ablastr::fields::MultiLevelVectorField &current, int lev, const amrex::Periodicity &period)
 
void RestrictRhoFromFineToCoarsePatch (int lev)
 
void ApplyFilterandSumBoundaryRho (const ablastr::fields::MultiLevelScalarField &charge_fp, const ablastr::fields::MultiLevelScalarField &charge_cp, int lev, PatchType patch_type, int icomp, int ncomp)
 
void AddRhoFromFineLevelandSumBoundary (const ablastr::fields::MultiLevelScalarField &charge_fp, const ablastr::fields::MultiLevelScalarField &charge_cp, ablastr::fields::MultiLevelScalarField const &charge_buffer, int lev, int icomp, int ncomp)
 Update the charge density of lev by adding the charge density from particles that are in the mesh refinement patches at lev+1
 
void ReadParameters ()
 
void BackwardCompatibility ()
 
void InitFromScratch ()
 
void AllocLevelData (int lev, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
 
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.
 
void BuildBufferMasks ()
 
const amrex::iMultiFabgetCurrentBufferMasks (int lev) const
 
const amrex::iMultiFabgetGatherBufferMasks (int lev) const
 
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, bool aux_is_nodal)
 
void AllocLevelSpectralSolverRZ (amrex::Vector< std::unique_ptr< SpectralSolverRZ > > &spectral_solver, int lev, const amrex::BoxArray &realspace_ba, const amrex::DistributionMapping &dm, const std::array< amrex::Real, 3 > &dx)
 
bool checkStopSimulation (amrex::Real cur_time)
 
void HandleParticlesAtBoundaries (int step, amrex::Real cur_time, int num_moved)
 
void ExplicitFillBoundaryEBUpdateAux ()
 
void PushPSATD (amrex::Real start_time)
 
void PSATDForwardTransformEB ()
 Forward FFT of E,B on all mesh refinement levels.
 
void PSATDBackwardTransformEB ()
 Backward FFT of E,B on all mesh refinement levels, with field damping in the guard cells (if needed)
 
void PSATDBackwardTransformEBavg (ablastr::fields::MultiLevelVectorField const &E_avg_fp, ablastr::fields::MultiLevelVectorField const &B_avg_fp, ablastr::fields::MultiLevelVectorField const &E_avg_cp, ablastr::fields::MultiLevelVectorField const &B_avg_cp)
 Backward FFT of averaged E,B on all mesh refinement levels.
 
void PSATDForwardTransformJ (std::string const &J_fp_string, std::string const &J_cp_string, bool apply_kspace_filter=true)
 Forward FFT of J on all mesh refinement levels, with k-space filtering (if needed)
 
void PSATDBackwardTransformJ (std::string const &J_fp_string, std::string const &J_cp_string)
 Backward FFT of J on all mesh refinement levels.
 
void PSATDForwardTransformRho (std::string const &charge_fp_string, std::string const &charge_cp_string, int icomp, int dcomp, bool apply_kspace_filter=true)
 Forward FFT of rho on all mesh refinement levels, with k-space filtering (if needed)
 
void PSATDMoveRhoNewToRhoOld ()
 Copy rho_new to rho_old in spectral space (when rho is linear in time)
 
void PSATDMoveJNewToJOld ()
 Copy J_new to J_old in spectral space (when J is linear in time)
 
void PSATDMoveRhoNewToRhoMid ()
 Copy rho_new to rho_mid in spectral space (when rho is quadratic in time)
 
void PSATDMoveJNewToJMid ()
 Copy J_new to J_mid in spectral space (when J is quadratic in time)
 
void PSATDForwardTransformF ()
 Forward FFT of F on all mesh refinement levels.
 
void PSATDBackwardTransformF ()
 Backward FFT of F on all mesh refinement levels.
 
void PSATDForwardTransformG ()
 Forward FFT of G on all mesh refinement levels.
 
void PSATDBackwardTransformG ()
 Backward FFT of G on all mesh refinement levels.
 
void PSATDPushSpectralFields ()
 Update all necessary fields in spectral space.
 
void PSATDScaleAverageFields (amrex::Real scale_factor)
 Scale averaged E,B fields to account for time integration.
 
void PSATDEraseAverageFields ()
 Set averaged E,B fields to zero before new iteration.
 

Static Private Member Functions

static void MakeWarpX ()
 This method creates a new instance of the WarpX class.
 

Private Attributes

std::string m_authors
 Author of an input file / simulation setup.
 
amrex::Vector< int > istep
 
amrex::Vector< int > nsubsteps
 
amrex::Vector< amrex::Real > t_new
 
amrex::Vector< amrex::Real > t_old
 
amrex::Vector< amrex::Real > dt
 
utils::parser::IntervalsParser m_dt_update_interval = utils::parser::IntervalsParser{}
 
bool m_safe_guard_cells = false
 
std::unique_ptr< MultiParticleContainermypc
 
std::unique_ptr< MultiDiagnosticsmulti_diags
 
int m_current_centering_nox = 2
 Order of finite centering of currents (from nodal grid to staggered grid), along x.
 
int m_current_centering_noy = 2
 Order of finite centering of currents (from nodal grid to staggered grid), along y.
 
int m_current_centering_noz = 2
 Order of finite centering of currents (from nodal grid to staggered grid), along z.
 
bool do_fluid_species = false
 
std::unique_ptr< MultiFluidContainermyfl
 
MediumForEM m_em_solver_medium = MediumForEM::Default
 Integer that corresponds to electromagnetic Maxwell solver (vacuum - 0, macroscopic - 1)
 
MacroscopicSolverAlgo m_macroscopic_solver_algo = MacroscopicSolverAlgo::Default
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > Efield_dotMask
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > Bfield_dotMask
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > Afield_dotMask
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > phi_dotMask
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > m_eb_update_E
 
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > m_eb_update_B
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_eb_reduce_particle_shape
 
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::LayoutData< FaceInfoBox > >, 3 > > m_borrowing
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > current_buffer_masks
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > gather_buffer_masks
 
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_similar_dm_pml = true
 
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
 
std::unique_ptr< PEC_Insulatorpec_insulator_boundary
 
std::unique_ptr< ExternalFieldParamsm_p_ext_field_params
 
amrex::Real moving_window_x = std::numeric_limits<amrex::Real>::max()
 
int m_num_mirrors = 0
 
amrex::Vector< amrex::Real > m_mirror_z
 
amrex::Vector< amrex::Real > m_mirror_z_width
 
amrex::Vector< int > m_mirror_z_npoints
 
int warpx_do_continuous_injection = 0
 
int num_injected_species = -1
 
amrex::Vector< int > injected_plasma_species
 
std::optional< amrex::Real > m_const_dt
 
std::optional< amrex::Real > m_max_dt
 
bool m_do_subcycling = false
 
bool m_verboncoeur_axis_correction = true
 
std::unique_ptr< MacroscopicPropertiesm_macroscopic_properties
 
std::unique_ptr< ElectrostaticSolverm_electrostatic_solver
 
std::unique_ptr< HybridPICModelm_hybrid_pic_model
 
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 m_limit_verbose_step = false
 
bool use_hybrid_QED = false
 
int max_step = std::numeric_limits<int>::max()
 
amrex::Real stop_time = std::numeric_limits<amrex::Real>::max()
 
std::optional< amrex::Real > m_zmax_plasma_to_compute_max_step = std::nullopt
 
int regrid_int = -1
 
amrex::Real cfl = amrex::Real(0.999)
 
std::string restart_chkfile
 
bool write_diagnostics_on_restart = false
 
bool synchronize_velocity_for_diagnostics = true
 
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
 
std::unique_ptr< amrex::Parserref_patch_parser
 User-defined parser to define refinement patches.
 
bool m_is_synchronized = true
 
guardCellManager guard_cells
 
int slice_max_grid_size
 
int slice_plot_int = -1
 
amrex::RealBox slice_realbox
 
amrex::IntVect slice_cr_ratio
 
bool fft_periodic_single_box = false
 
int nox_fft = 16
 
int noy_fft = 16
 
int noz_fft = 16
 
bool m_sort_particles_for_deposition = false
 If true, particles will be sorted in the order x -> y -> z -> ppc for faster deposition.
 
amrex::IntVect m_sort_idx_type = amrex::IntVect(AMREX_D_DECL(0,0,0))
 Specifies the type of grid used for the above sorting, i.e. cell-centered, nodal, or mixed.
 
bool m_do_initial_div_cleaning = false
 
amrex::IntVect numprocs {0}
 Domain decomposition on Level 0.
 
std::unique_ptr< ParticleBoundaryBufferm_particle_boundary_buffer
 particle buffer for scraped particles on the boundaries
 
amrex::Vector< std::unique_ptr< AcceleratorLattice > > m_accelerator_lattice
 
amrex::Vector< std::unique_ptr< amrex::FabFactory< amrex::FArrayBox > > > m_field_factory
 
bool m_exit_loop_due_to_interrupt_signal = false
 
PSATDSolutionType m_psatd_solution_type = PSATDSolutionType::Default
 
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
 
std::unique_ptr< ImplicitSolverm_implicit_solver
 
bool m_JRhom = false
 PSATD JRhom algorithm.
 
int m_JRhom_subintervals
 

Static Private Attributes

static WarpXm_instance = nullptr
 
static constexpr bool sync_nodal_points = true
 

Additional Inherited Members

- Protected Attributes inherited from amrex::AmrCore
std::unique_ptr< AmrParGDBm_gdb
 
- 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 ( )
override

Destructor

◆ WarpX() [1/3]

WarpX::WarpX ( WarpX const & )
delete

Copy constructor

◆ WarpX() [2/3]

WarpX::WarpX ( WarpX && )
delete

Move constructor

◆ WarpX() [3/3]

WarpX::WarpX ( )
private

WarpX constructor. This method should not be called directly, but rather through the static member function MakeWarpX(). MakeWarpX() is called by GetInstance () if an instance of the WarpX class does not currently exist.

Member Function Documentation

◆ AddCurrentFromFineLevelandSumBoundary()

void WarpX::AddCurrentFromFineLevelandSumBoundary ( const ablastr::fields::MultiLevelVectorField & J_fp,
const ablastr::fields::MultiLevelVectorField & J_cp,
const ablastr::fields::MultiLevelVectorField & J_buffer,
int lev )
private

Update the currents of lev by adding the currents from particles that are in the mesh refinement patches at lev+1

More precisely, apply filter and sum boundaries for the current of:

  • the fine patch of lev
  • the coarse patch of lev+1 (same resolution)
  • the buffer regions of the coarse patch of lev+1 (i.e. for particules that are within the mesh refinement patch, but do not deposit on the mesh refinement patch because they are too close to the boundary)

Then update the fine patch of lev by adding the currents for the coarse patch (and buffer region) of lev+1

◆ AddExternalFields()

void WarpX::AddExternalFields ( int lev)
private

◆ AddMagnetostaticFieldLabFrame()

void WarpX::AddMagnetostaticFieldLabFrame ( )

◆ AddRhoFromFineLevelandSumBoundary()

void WarpX::AddRhoFromFineLevelandSumBoundary ( const ablastr::fields::MultiLevelScalarField & charge_fp,
const ablastr::fields::MultiLevelScalarField & charge_cp,
ablastr::fields::MultiLevelScalarField const & charge_buffer,
int lev,
int icomp,
int ncomp )
private

Update the charge density of lev by adding the charge density from particles that are in the mesh refinement patches at lev+1

More precisely, apply filter and sum boundaries for the charge density of:

  • the fine patch of lev
  • the coarse patch of lev+1 (same resolution)
  • the buffer regions of the coarse patch of lev+1 (i.e. for particules that are within the mesh refinement patch, but do not deposit on the mesh refinement patch because they are too close to the boundary)

Then update the fine patch of lev by adding the charge density for the coarse patch (and buffer region) of lev+1

◆ AllocInitMultiFab()

void WarpX::AllocInitMultiFab ( std::unique_ptr< amrex::iMultiFab > & mf,
const amrex::BoxArray & ba,
const amrex::DistributionMapping & dm,
int ncomp,
const amrex::IntVect & ngrow,
int level,
const std::string & name,
std::optional< const int > initial_value = {} )

Allocate and optionally initialize the iMultiFab. This also adds the iMultiFab to the map of MultiFabs (used to ease the access to MultiFabs from the Python interface.

Parameters
[out]mfThe iMultiFab unique pointer to be allocated
[in]baThe BoxArray describing the iMultiFab
[in]dmThe DistributionMapping describing the iMultiFab
[in]ncompThe number of components in the iMultiFab
[in]ngrowThe number of guard cells in the iMultiFab
[in]levelThe refinement level
[in]nameThe name of the iMultiFab to use in the map
[in]initial_valueThe optional initial value

◆ AllocLevelData()

void WarpX::AllocLevelData ( int lev,
const amrex::BoxArray & ba,
const amrex::DistributionMapping & dm )
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,
bool aux_is_nodal )
private

EB: Lengths of the mesh edges

EB: Areas of the mesh faces

EB: 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.

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.

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.

◆ AllocLevelSpectralSolverRZ()

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

◆ ApplyBfieldBoundary()

void WarpX::ApplyBfieldBoundary ( int lev,
PatchType patch_type,
SubcyclingHalf subcycling_half,
amrex::Real cur_time )

◆ ApplyEfieldBoundary()

void WarpX::ApplyEfieldBoundary ( int lev,
PatchType patch_type,
amrex::Real cur_time )

◆ ApplyElectronPressureBoundary()

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

When the Ohm's law solver is used, the electron pressure values on PEC boundaries are set to enforce a zero derivative Neumann condition, otherwise the E_perp values have large spikes (that grows as 1/dx). This has to be done since the E-field is algebraically calculated instead of evolved which means the 1/dx growth is not avoided by multiplication with dt as happens in the B-field evolve.

◆ ApplyFieldBoundaryOnAxis()

void WarpX::ApplyFieldBoundaryOnAxis ( amrex::MultiFab * Er,
amrex::MultiFab * Et,
amrex::MultiFab * Ez,
int lev ) const

◆ ApplyFilterandSumBoundaryRho() [1/2]

void WarpX::ApplyFilterandSumBoundaryRho ( const ablastr::fields::MultiLevelScalarField & charge_fp,
const ablastr::fields::MultiLevelScalarField & charge_cp,
int lev,
PatchType patch_type,
int icomp,
int ncomp )
private

◆ ApplyFilterandSumBoundaryRho() [2/2]

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

◆ ApplyFilterMF() [1/2]

void WarpX::ApplyFilterMF ( const ablastr::fields::MultiLevelVectorField & mfvec,
int lev )

◆ ApplyFilterMF() [2/2]

void WarpX::ApplyFilterMF ( const ablastr::fields::MultiLevelVectorField & mfvec,
int lev,
int idim )

◆ ApplyInverseVolumeScalingToChargeDensity()

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

◆ ApplyInverseVolumeScalingToCurrentDensity()

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

◆ ApplyJfieldBoundary()

void WarpX::ApplyJfieldBoundary ( int lev,
amrex::MultiFab * Jx,
amrex::MultiFab * Jy,
amrex::MultiFab * Jz,
PatchType patch_type )

If a PEC boundary conditions is used the current density deposited in the guard cells have to be reflected back into the simulation domain. This function performs that logic.

◆ applyMirrors()

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

◆ ApplyRhofieldBoundary()

void WarpX::ApplyRhofieldBoundary ( int lev,
amrex::MultiFab * Rho,
PatchType patch_type )

If a PEC boundary conditions is used the charge density deposited in the guard cells have to be reflected back into the simulation domain. This function performs that logic.

◆ 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 ( amrex::Box tbx,
amrex::IArrayBox & buffer_mask,
const amrex::IArrayBox & guard_mask,
int ng )

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

◆ CalculateExternalCurlA()

void WarpX::CalculateExternalCurlA ( )

◆ CellSize()

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

◆ CheckGuardCells()

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.

◆ CheckLoadBalance()

void WarpX::CheckLoadBalance ( int step)

Check and potentially compute load balancing

◆ checkStopSimulation()

bool WarpX::checkStopSimulation ( amrex::Real cur_time)
nodiscardprivate

Stop the simulation at the end of the current step?

◆ ClearLevel()

void WarpX::ClearLevel ( int lev)
finalprotectedvirtual

Delete level data. Called by AmrCore::regrid.

Implements amrex::AmrCore.

◆ 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 level set function used for particle-boundary interaction.

◆ ComputeDivB() [1/2]

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

◆ ComputeDivB() [2/2]

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

◆ ComputeDivE()

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

◆ ComputeDt()

void WarpX::ComputeDt ( )

Determine the timestep of the simulation.

◆ ComputeEightWaysExtensions()

void WarpX::ComputeEightWaysExtensions ( )

Do the eight-ways extension.

◆ ComputeExternalFieldOnGridUsingParser()

void WarpX::ComputeExternalFieldOnGridUsingParser ( const std::variant< warpx::fields::FieldType, std::string > & field,
amrex::ParserExecutor< 4 > const & fx_parser,
amrex::ParserExecutor< 4 > const & fy_parser,
amrex::ParserExecutor< 4 > const & fz_parser,
int lev,
PatchType patch_type,
amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > const & eb_update_field,
bool use_eb_flags = true )

This function computes the E, B, and J 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]fieldFieldType or string containing field name to grab from register to write into
[in]fx_parserparser function to initialize x-field
[in]fy_parserparser function to initialize y-field
[in]fz_parserparser function to initialize z-field
[in]levlevel of the Multifabs that is initialized
[in]patch_typePatchType on which the field is initialized (fine or coarse)
[in]eb_update_fieldflag indicating which gridpoints should be modified by this functions
[in]use_eb_flags(default:true) flag indicating if eb points should be excluded or not

◆ 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.

◆ ComputeMagnetostaticField()

void WarpX::ComputeMagnetostaticField ( )

◆ ComputeMaxStep()

void WarpX::ComputeMaxStep ( )

Compute the last time step of the simulation Calls computeMaxStepBoostAccelerator() if required.

◆ computeMaxStepBoostAccelerator()

void WarpX::computeMaxStepBoostAccelerator ( )

◆ ComputeOneWayExtensions()

void WarpX::ComputeOneWayExtensions ( )

Do the one-way extension.

◆ ComputePMLFactors()

void WarpX::ComputePMLFactors ( )
private

◆ ComputeSpaceChargeField()

void WarpX::ComputeSpaceChargeField ( bool reset_fields)

Electrostatic solve call

◆ computeVectorPotential()

void WarpX::computeVectorPotential ( ablastr::fields::MultiLevelVectorField const & curr,
ablastr::fields::MultiLevelVectorField const & A,
amrex::Real required_precision = amrex::Real(1.e-11),
amrex::Real absolute_tolerance = amrex::Real(0.0),
int max_iters = 200,
int verbosity = 2 )

◆ CopyJPML()

void WarpX::CopyJPML ( )

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

◆ CurrentBufferMasks()

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

◆ DampFieldsInGuards() [1/2]

void WarpX::DampFieldsInGuards ( int lev,
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.

◆ DampFieldsInGuards() [2/2]

void WarpX::DampFieldsInGuards ( int lev,
const ablastr::fields::VectorField & Efield,
const ablastr::fields::VectorField & 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.

◆ 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 ( int lev)

◆ DampPML() [3/3]

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

◆ DampPML_Cartesian()

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

◆ doFieldIonization()

void WarpX::doFieldIonization ( )

Run the ionization module on all species

◆ DoFluidSpecies()

bool WarpX::DoFluidSpecies ( ) const
inlinenodiscard

◆ DoPML()

bool WarpX::DoPML ( ) const
inlinenodiscard

◆ doQEDEvents()

void WarpX::doQEDEvents ( )

Run the QED module on all species

◆ ErrorEst()

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

Tagging cells for refinement.

◆ Evolve()

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

reduced diags

◆ EvolveB() [1/3]

void WarpX::EvolveB ( amrex::Real dt,
SubcyclingHalf subcycling_half,
amrex::Real start_time )

◆ EvolveB() [2/3]

void WarpX::EvolveB ( int lev,
amrex::Real dt,
SubcyclingHalf subcycling_half,
amrex::Real start_time )

◆ EvolveB() [3/3]

void WarpX::EvolveB ( int lev,
PatchType patch_type,
amrex::Real dt,
SubcyclingHalf subcycling_half,
amrex::Real start_time )

◆ EvolveE() [1/3]

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

◆ EvolveE() [2/3]

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

◆ EvolveE() [3/3]

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

◆ EvolveF() [1/3]

void WarpX::EvolveF ( amrex::Real dt,
int const rho_comp )

◆ EvolveF() [2/3]

void WarpX::EvolveF ( int lev,
amrex::Real dt,
int const rho_comp )

◆ EvolveF() [3/3]

void WarpX::EvolveF ( int lev,
PatchType patch_type,
amrex::Real dt,
int const rho_comp )

◆ EvolveG() [1/3]

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

◆ EvolveG() [2/3]

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

◆ EvolveG() [3/3]

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

◆ ExplicitFillBoundaryEBUpdateAux()

void WarpX::ExplicitFillBoundaryEBUpdateAux ( )
private

Update the E and B fields in the explicit em PIC scheme.

At the beginning, we have B^{n} and E^{n}. Particles have p^{n} and x^{n}.

◆ 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 ( int lev,
PatchType patch_type,
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 ( int lev,
PatchType patch_type,
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

◆ Finalize()

void WarpX::Finalize ( )
static

This method has to be called at the end of the simulation. It deletes the WarpX instance.

◆ FinishImplicitField()

void WarpX::FinishImplicitField ( const ablastr::fields::MultiLevelVectorField & Field_fp,
const ablastr::fields::MultiLevelVectorField & Field_n,
amrex::Real theta )

◆ FinishImplicitParticleUpdate()

void WarpX::FinishImplicitParticleUpdate ( )

◆ FinishMagneticFieldAndApplyBCs()

void WarpX::FinishMagneticFieldAndApplyBCs ( ablastr::fields::MultiLevelVectorField const & a_Bn,
amrex::Real a_theta,
amrex::Real a_time )

◆ GatherBufferMasks()

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

◆ get_accelerator_lattice()

const AcceleratorLattice & WarpX::get_accelerator_lattice ( int lev)
inline

◆ get_load_balance_intervals()

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

returns the load balance interval

◆ get_ng_depos_J()

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

◆ get_ng_depos_rho()

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

◆ get_ng_fieldgather()

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

◆ get_numprocs()

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

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_fdtd_solver_fp()

FiniteDifferenceSolver * WarpX::get_pointer_fdtd_solver_fp ( int lev)
inline

◆ get_pointer_HybridPICModel()

HybridPICModel * WarpX::get_pointer_HybridPICModel ( ) const
inlinenodiscard

◆ get_spectral_solver_fp()

auto & WarpX::get_spectral_solver_fp ( int lev)
inline

◆ GetAuthors()

std::string WarpX::GetAuthors ( ) const
inlinenodiscard

If an authors' string is specified in the inputfile, this method returns that string. Otherwise, it returns an empty string.

◆ getCosts()

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

◆ getCurrentBufferMasks()

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

◆ getdo_moving_window()

int WarpX::getdo_moving_window ( ) const
inlinenodiscard

◆ getdt() [1/2]

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

◆ getdt() [2/2]

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

◆ GetEBReduceParticleShapeFlag()

amrex::Vector< std::unique_ptr< amrex::iMultiFab > > const & WarpX::GetEBReduceParticleShapeFlag ( ) const
inline

◆ GetEBUpdateBFlag()

amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > & WarpX::GetEBUpdateBFlag ( )
inline

◆ GetEBUpdateEFlag()

amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > & WarpX::GetEBUpdateEFlag ( )
inline

◆ GetElectrostaticSolver()

ElectrostaticSolver & WarpX::GetElectrostaticSolver ( )
inline

◆ GetFieldBoundaryHi()

const amrex::Array< FieldBoundaryType, 3 > & WarpX::GetFieldBoundaryHi ( ) const
inlinenodiscard

◆ GetFieldBoundaryLo()

const amrex::Array< FieldBoundaryType, 3 > & WarpX::GetFieldBoundaryLo ( ) const
inlinenodiscard

◆ getFieldDotMaskPointer()

const amrex::iMultiFab * WarpX::getFieldDotMaskPointer ( warpx::fields::FieldType field_type,
int lev,
ablastr::fields::Direction dir ) const
nodiscard

Get pointer to the amrex::MultiFab containing the dotMask for the specified field.

◆ GetFluidContainer()

MultiFluidContainer & WarpX::GetFluidContainer ( )
inline

◆ getGatherBufferMasks()

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

◆ GetInstance()

WarpX & WarpX::GetInstance ( )
static

◆ getis_synchronized()

bool WarpX::getis_synchronized ( ) const
inlinenodiscard

◆ getistep() [1/2]

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

◆ getistep() [2/2]

int WarpX::getistep ( int lev) const
inlinenodiscard

◆ getLoadBalanceEfficiency()

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

◆ getmoving_window_x()

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

◆ GetMultiDiags()

MultiDiagnostics & WarpX::GetMultiDiags ( )
inline

◆ GetMultiFabRegister()

ablastr::fields::MultiFabRegister & WarpX::GetMultiFabRegister ( )
inline

◆ getngEB()

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

◆ getngF()

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

◆ getngUpdateAux()

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

◆ getnsubsteps() [1/2]

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

◆ getnsubsteps() [2/2]

int WarpX::getnsubsteps ( int lev) const
inlinenodiscard

◆ GetPartContainer()

MultiParticleContainer & WarpX::GetPartContainer ( )
inline

◆ GetParticleBoundaryBuffer()

ParticleBoundaryBuffer & WarpX::GetParticleBoundaryBuffer ( )
inline

◆ GetPML()

PML * WarpX::GetPML ( int lev)

◆ GetPML_RZ()

PML_RZ * WarpX::GetPML_RZ ( int lev)

◆ getPMLdirections()

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

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

◆ 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
nodiscardprivate

◆ gett_new() [1/2]

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

◆ gett_new() [2/2]

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

◆ gett_old() [1/2]

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

◆ gett_old() [2/2]

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

◆ HandleParticlesAtBoundaries()

void WarpX::HandleParticlesAtBoundaries ( int step,
amrex::Real cur_time,
int num_moved )
private

Perform essential particle house keeping at boundaries

Inject, communicate, scrape and sort particles.

Parameters
stepcurrent step
cur_timecurrent time
num_movednumber of cells the moving window moved

◆ 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
patch_typewhich MR patch: PatchType::fine or PatchType::coarse
dttime step

◆ HybridPICDepositRhoAndJ()

void WarpX::HybridPICDepositRhoAndJ ( )

Hybrid-PIC deposition function. Helper function to contain all the needed logic to deposit charge and current densities for use in the Ohm's law solver. The deposition is done into the rho_fp and current_fp multifabs.

◆ HybridPICEvolveFields()

void WarpX::HybridPICEvolveFields ( )

Hybrid-PIC field evolve function. This function contains the logic involved in evolving the electric and magnetic fields in the hybrid PIC algorithm.

◆ HybridPICInitializeRhoJandB()

void WarpX::HybridPICInitializeRhoJandB ( )

Hybrid-PIC initial deposition function. The hybrid-PIC algorithm uses the charge and current density from both the current and previous step when updating the fields. This function deposits the initial ion charge and current (before the first particle push), to be used in the HybridPICEvolveFields() function.

◆ ImplicitComputeRHSE() [1/3]

void WarpX::ImplicitComputeRHSE ( amrex::Real dt,
WarpXSolverVec & a_Erhs_vec )

◆ ImplicitComputeRHSE() [2/3]

void WarpX::ImplicitComputeRHSE ( int lev,
amrex::Real dt,
WarpXSolverVec & a_Erhs_vec )

◆ ImplicitComputeRHSE() [3/3]

void WarpX::ImplicitComputeRHSE ( int lev,
PatchType patch_type,
amrex::Real dt,
WarpXSolverVec & a_Erhs_vec )

◆ 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]levlevel of 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_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_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

◆ InvCellSize()

amrex::XDim3 WarpX::InvCellSize ( int lev)
static

◆ isAnyParticleBoundaryThermal()

bool WarpX::isAnyParticleBoundaryThermal ( )
static

True if any of the particle boundary condition type is Thermal

◆ LoadBalance()

void WarpX::LoadBalance ( )

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

◆ LoadExternalFields()

void WarpX::LoadExternalFields ( int lev)

Load field values from a user-specified openPMD file, for the fields Ex, Ey, Ez, Bx, By, Bz.

◆ LowerCorner()

amrex::XDim3 WarpX::LowerCorner ( const amrex::Box & bx,
int lev,
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,
amrex::Real start_time )

◆ MacroscopicEvolveE() [2/3]

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

◆ MacroscopicEvolveE() [3/3]

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

◆ MakeDistributionMap()

amrex::DistributionMapping WarpX::MakeDistributionMap ( int lev,
amrex::BoxArray const & ba )
nodiscardfinalprotectedvirtual

Use this function to override how DistributionMapping is made.

Reimplemented from amrex::AmrMesh.

◆ MakeNewLevelFromCoarse()

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

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 & new_grids,
const amrex::DistributionMapping & new_dmap )
finalprotected

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

◆ MakeWarpX()

void WarpX::MakeWarpX ( )
staticprivate

This method creates a new instance of the WarpX class.

◆ maxStep()

int WarpX::maxStep ( ) const
inlinenodiscard

◆ MoveWindow()

int WarpX::MoveWindow ( 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

◆ OneStep()

void WarpX::OneStep ( amrex::Real a_cur_time,
amrex::Real a_dt,
int a_step )
private

Perform collisions, particle injection, and advance fields and particles by one time step.

◆ OneStep_JRhom()

void WarpX::OneStep_JRhom ( amrex::Real cur_time)
private

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

◆ OneStep_nosub()

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

Perform one PIC iteration, without subcycling i.e. all levels/patches use the same timestep (that of the finest level) for the field advance and particle pusher.

◆ OneStep_sub1()

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

Perform one PIC iteration, with subcycling i.e. The fine patch uses a smaller timestep (and steps more often) than the coarse patch, for the field advance and particle pusher.

This version of subcycling only works for 2 levels and with a refinement ratio of 2. The particles and fields of the fine patch are pushed twice (with dt[coarse]/2) in this routine. The particles of the coarse patch and mother grid are pushed only once (with dt[coarse]). The fields on the coarse patch and mother grid are pushed in a way which is equivalent to pushing once only, with a current which is the average of the coarse + fine current at the 2 steps of the fine grid.

◆ operator=() [1/2]

WarpX & WarpX::operator= ( WarpX && )
delete

Move operator

◆ operator=() [2/2]

WarpX & WarpX::operator= ( WarpX const & )
delete

Copy operator

◆ PicsarVersion()

std::string WarpX::PicsarVersion ( )
static

Version of PICSAR dependency.

◆ PostProcessBaseGrids()

void WarpX::PostProcessBaseGrids ( amrex::BoxArray & ba0) const
finalvirtual

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

create object for reduced diagnostics

Reimplemented from amrex::AmrMesh.

◆ PostRestart()

void WarpX::PostRestart ( )
private

◆ PrintMainPICparameters()

void WarpX::PrintMainPICparameters ( )

Print main PIC parameters to stdout

◆ ProjectionCleanDivB()

void WarpX::ProjectionCleanDivB ( )

◆ PSATDBackwardTransformEB()

void WarpX::PSATDBackwardTransformEB ( )
private

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

◆ PSATDBackwardTransformEBavg()

void WarpX::PSATDBackwardTransformEBavg ( ablastr::fields::MultiLevelVectorField const & E_avg_fp,
ablastr::fields::MultiLevelVectorField const & B_avg_fp,
ablastr::fields::MultiLevelVectorField const & E_avg_cp,
ablastr::fields::MultiLevelVectorField const & 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 ( std::string const & J_fp_string,
std::string const & J_cp_string )
private

Backward FFT of J on all mesh refinement levels.

Parameters
J_fp_stringString representing the fine patch current to be transformed
J_cp_stringString representing the coarse patch current to be transformed

◆ PSATDEraseAverageFields()

void WarpX::PSATDEraseAverageFields ( )
private

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

◆ PSATDForwardTransformEB()

void WarpX::PSATDForwardTransformEB ( )
private

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

◆ 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 ( std::string const & J_fp_string,
std::string const & J_cp_string,
bool apply_kspace_filter = true )
private

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

Parameters
J_fp_stringString representing the fine patch current to be transformed
J_cp_stringString representing 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 ( std::string const & charge_fp_string,
std::string const & charge_cp_string,
int icomp,
int dcomp,
bool apply_kspace_filter = true )
private

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

Parameters
charge_fp_stringString representing the fine patch charge to be transformed
charge_cp_stringString representing 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)

◆ PSATDMoveJNewToJMid()

void WarpX::PSATDMoveJNewToJMid ( )
private

Copy J_new to J_mid in spectral space (when J is quadratic in time)

◆ PSATDMoveJNewToJOld()

void WarpX::PSATDMoveJNewToJOld ( )
private

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

◆ PSATDMoveRhoNewToRhoMid()

void WarpX::PSATDMoveRhoNewToRhoMid ( )
private

Copy rho_new to rho_mid in spectral space (when rho is quadratic in time)

◆ PSATDMoveRhoNewToRhoOld()

void WarpX::PSATDMoveRhoNewToRhoOld ( )
private

Copy rho_new to rho_old in spectral space (when rho is linear in time)

◆ PSATDPushSpectralFields()

void WarpX::PSATDPushSpectralFields ( )
private

Update all necessary fields in spectral space.

◆ PSATDScaleAverageFields()

void WarpX::PSATDScaleAverageFields ( 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

◆ PushParticlesandDeposit() [1/2]

void WarpX::PushParticlesandDeposit ( amrex::Real cur_time,
bool skip_current = false,
ImplicitOptions const * implicit_options = nullptr )

◆ PushParticlesandDeposit() [2/2]

void WarpX::PushParticlesandDeposit ( int lev,
amrex::Real cur_time,
SubcyclingHalf subcycling_half = SubcyclingHalf::None,
bool skip_current = false,
ImplicitOptions const * implicit_options = nullptr )

◆ PushPSATD()

void WarpX::PushPSATD ( amrex::Real start_time)
private

◆ ReadExternalFieldFromFile()

void WarpX::ReadExternalFieldFromFile ( const std::string & read_fields_from_path,
amrex::MultiFab * mf,
const std::string & F_name,
const std::string & F_component )

Load field values from a user-specified openPMD file for a specific field (specified by F_name)

◆ 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 )
finalprotected

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

◆ RescaleCosts()

void WarpX::RescaleCosts ( int step)

Perform running average of the LB costs

Only needed for timers cost update, heuristic load balance considers the instantaneous costs. This gives more importance to most recent costs.

◆ ResetCosts()

void WarpX::ResetCosts ( )

resets costs to zero

◆ ResetInstance()

void WarpX::ResetInstance ( )
static

◆ ResetProbDomain()

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

◆ RestrictCurrentFromFineToCoarsePatch()

void WarpX::RestrictCurrentFromFineToCoarsePatch ( const ablastr::fields::MultiLevelVectorField & J_fp,
const ablastr::fields::MultiLevelVectorField & J_cp,
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 ( int lev)
private

◆ SaveParticlesAtImplicitStepStart()

void WarpX::SaveParticlesAtImplicitStepStart ( )

◆ SetElectricFieldAndApplyBCs()

void WarpX::SetElectricFieldAndApplyBCs ( const WarpXSolverVec & a_E,
amrex::Real a_time )

◆ setistep()

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

◆ setLoadBalanceEfficiency()

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

◆ sett_new()

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

◆ setVectorPotentialBC()

void WarpX::setVectorPotentialBC ( ablastr::fields::MultiLevelVectorField const & A) const

◆ 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.

◆ ShrinkBorrowing()

void WarpX::ShrinkBorrowing ( )

Shrink the vectors in the FaceInfoBoxes.

◆ SpectralSourceFreeFieldAdvance()

void WarpX::SpectralSourceFreeFieldAdvance ( amrex::Real start_time)

◆ stopTime()

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

◆ SumBoundaryJ() [1/2]

void WarpX::SumBoundaryJ ( const ablastr::fields::MultiLevelVectorField & current,
int lev,
const amrex::Periodicity & period )
private

◆ SumBoundaryJ() [2/2]

void WarpX::SumBoundaryJ ( const ablastr::fields::MultiLevelVectorField & current,
int lev,
int idim,
const amrex::Periodicity & period )
private

◆ SyncCurrent()

void WarpX::SyncCurrent ( const std::string & current_fp_string)

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]current_fp_stringthe coarse of fine patch to use for current

◆ SyncCurrentAndRho()

void WarpX::SyncCurrentAndRho ( )

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

◆ SynchronizeVelocityWithPosition()

void WarpX::SynchronizeVelocityWithPosition ( )

Push momentum one half step forward to synchronize with position. Also sets m_is_synchronized to true.

◆ SyncMassMatricesPC()

void WarpX::SyncMassMatricesPC ( )

◆ SyncRho() [1/2]

void WarpX::SyncRho ( )

◆ SyncRho() [2/2]

void WarpX::SyncRho ( const ablastr::fields::MultiLevelScalarField & charge_fp,
const ablastr::fields::MultiLevelScalarField & charge_cp,
ablastr::fields::MultiLevelScalarField const & charge_buffer )

◆ UpdateAuxilaryData()

void WarpX::UpdateAuxilaryData ( )

◆ UpdateAuxilaryDataSameType()

void WarpX::UpdateAuxilaryDataSameType ( )

◆ UpdateAuxilaryDataStagToNodal()

void WarpX::UpdateAuxilaryDataStagToNodal ( )

◆ UpdateDtFromParticleSpeeds()

void WarpX::UpdateDtFromParticleSpeeds ( )

Determine the simulation timestep from the maximum speed of all particles Sets timestep so that a particle can only cross cfl*dx cells per timestep.

◆ UpdateMagneticFieldAndApplyBCs()

void WarpX::UpdateMagneticFieldAndApplyBCs ( ablastr::fields::MultiLevelVectorField const & a_Bn,
amrex::Real a_thetadt,
amrex::Real start_time )

◆ updateMaxStep()

void WarpX::updateMaxStep ( const int new_max_step)
inline

◆ updateStopTime()

void WarpX::updateStopTime ( const amrex::Real new_stop_time)
inline

◆ UpperCorner()

amrex::XDim3 WarpX::UpperCorner ( const amrex::Box & bx,
int lev,
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
inlinenodiscard

◆ Version()

std::string WarpX::Version ( )
static

Version of WarpX executable.

Member Data Documentation

◆ Afield_dotMask

amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>,3 > > WarpX::Afield_dotMask
mutableprivate

◆ beta_boost

Real WarpX::beta_boost = 0._rt
static

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

◆ Bfield_dotMask

amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>,3 > > WarpX::Bfield_dotMask
mutableprivate

◆ 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.

◆ cfl

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

◆ charge_deposition_algo

auto WarpX::charge_deposition_algo = ChargeDepositionAlgo::Default
inlinestatic

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

◆ compute_max_step_from_btd

bool WarpX::compute_max_step_from_btd = false
static

If true, the code will compute max_step from the back transformed diagnostics.

◆ 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_buffer_masks

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

◆ current_correction

bool WarpX::current_correction = true

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

◆ current_deposition_algo

auto WarpX::current_deposition_algo = CurrentDepositionAlgo::Default
inlinestatic

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

◆ 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_current_centering

bool WarpX::do_current_centering = false

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_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_fluid_species

bool WarpX::do_fluid_species = false
private

◆ do_moving_window

int WarpX::do_moving_window = 0
static

◆ 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_shared_mem_charge_deposition

bool WarpX::do_shared_mem_charge_deposition = false
static

used shared memory algorithm for charge deposition

◆ do_shared_mem_current_deposition

bool WarpX::do_shared_mem_current_deposition = false
static

use shared memory algorithm for current deposition

◆ do_silver_mueller

int WarpX::do_silver_mueller = 0
private

◆ do_similar_dm_pml

bool WarpX::do_similar_dm_pml = true
private

◆ do_single_precision_comms

bool WarpX::do_single_precision_comms = false
static

perform field communications in single precision

◆ dt

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

◆ Efield_dotMask

amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>,3 > > WarpX::Efield_dotMask
mutableprivate

◆ electromagnetic_solver_id

auto WarpX::electromagnetic_solver_id = ElectromagneticSolverAlgo::Default
inlinestatic

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

◆ electrostatic_solver_id

auto WarpX::electrostatic_solver_id = ElectrostaticSolverAlgo::Default
inlinestatic

◆ end_moving_window_step

int WarpX::end_moving_window_step = -1
static

◆ evolve_scheme

EvolveScheme WarpX::evolve_scheme = EvolveScheme::Default

Integer that corresponds to the evolve scheme (explicit, semi_implicit_em, theta_implicit_em)

◆ 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::Array<FieldBoundaryType,3> WarpX::field_boundary_hi
inlinestatic

Boundary conditions applied to fields at the upper domain boundaries (Possible values PML, Periodic, PEC, PMC, Neumann, Damped, Absorbing Silver-Mueller, None)

◆ field_boundary_lo

amrex::Array<FieldBoundaryType,3> WarpX::field_boundary_lo
inlinestatic

Boundary conditions applied to fields at the lower domain boundaries (Possible values PML, Periodic, PEC, PMC, Neumann, 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

auto WarpX::field_gathering_algo = GatheringAlgo::Default
inlinestatic

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

◆ 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

◆ grid_type

auto WarpX::grid_type = ablastr::utils::enums::GridType::Default
inlinestatic

Integer that corresponds to the type of grid used in the simulation (collocated, staggered, hybrid)

◆ guard_cells

guardCellManager WarpX::guard_cells
private

◆ imultifab_map

std::map<std::string, amrex::iMultiFab *> WarpX::imultifab_map

◆ injected_plasma_species

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

◆ istep

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

◆ load_balance_costs_update_algo

auto WarpX::load_balance_costs_update_algo = LoadBalanceCostsUpdateAlgo::Default
inlinestatic

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

◆ 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_accelerator_lattice

amrex::Vector< std::unique_ptr<AcceleratorLattice> > WarpX::m_accelerator_lattice
private

◆ m_authors

std::string WarpX::m_authors
private

Author of an input file / simulation setup.

◆ 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_const_dt

std::optional<amrex::Real> WarpX::m_const_dt
private

◆ m_current_centering_nox

int WarpX::m_current_centering_nox = 2
private

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

◆ m_current_centering_noy

int WarpX::m_current_centering_noy = 2
private

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

◆ m_current_centering_noz

int WarpX::m_current_centering_noz = 2
private

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

◆ m_do_initial_div_cleaning

bool WarpX::m_do_initial_div_cleaning = false
private

Solve Poisson equation when loading an external magnetic field to clean divergence This is useful to remove errors that could lead to non-zero B field divergence

◆ m_do_subcycling

bool WarpX::m_do_subcycling = false
private

◆ m_dt_update_interval

utils::parser::IntervalsParser WarpX::m_dt_update_interval = utils::parser::IntervalsParser{}
private

◆ m_eb_reduce_particle_shape

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

EB: Mask that indicates whether a particle should use its regular shape factor (mask set to 0) or a reduced, order-1 shape factor instead (mask set to 1) in a given cell, when depositing charge/current. The flag is typically set to 1 in cells that are close to the embedded boundary, in order to avoid errors in charge conservation when a particle is too close to the embedded boundary.

◆ m_eb_update_B

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

◆ m_eb_update_E

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

EB: Flag to indicate whether a gridpoint is inside the embedded boundary and therefore whether the E or B should not be updated. (One array per level and per direction, due to staggering)

◆ m_electrostatic_solver

std::unique_ptr<ElectrostaticSolver> WarpX::m_electrostatic_solver
private

◆ m_em_solver_medium

MediumForEM WarpX::m_em_solver_medium = MediumForEM::Default
private

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

◆ m_exit_loop_due_to_interrupt_signal

bool WarpX::m_exit_loop_due_to_interrupt_signal = false
private

Stop the simulation at the end of the current step due to a received Unix signal?

◆ 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_fields

◆ 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::MarkExtensionCells This is only used for the ECT solver.

◆ m_galilean_shift

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

◆ m_hybrid_pic_model

std::unique_ptr<HybridPICModel> WarpX::m_hybrid_pic_model
private

◆ m_implicit_solver

std::unique_ptr<ImplicitSolver> WarpX::m_implicit_solver
private

◆ m_instance

WarpX * WarpX::m_instance = nullptr
staticprivate

◆ m_is_synchronized

bool WarpX::m_is_synchronized = true
private

◆ m_JRhom

bool WarpX::m_JRhom = false
private

PSATD JRhom algorithm.

◆ m_JRhom_subintervals

int WarpX::m_JRhom_subintervals
private

◆ m_limit_verbose_step

bool WarpX::m_limit_verbose_step = false
private

◆ m_macroscopic_properties

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

◆ m_macroscopic_solver_algo

MacroscopicSolverAlgo WarpX::m_macroscopic_solver_algo = MacroscopicSolverAlgo::Default
private

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

◆ m_max_dt

std::optional<amrex::Real> WarpX::m_max_dt
private

◆ m_mirror_z

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

◆ m_mirror_z_npoints

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

◆ m_mirror_z_width

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

◆ m_num_mirrors

int WarpX::m_num_mirrors = 0
private

◆ m_p_ext_field_params

std::unique_ptr<ExternalFieldParams> WarpX::m_p_ext_field_params
private

◆ m_particle_boundary_buffer

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

particle buffer for scraped particles on the boundaries

◆ m_psatd_solution_type

PSATDSolutionType WarpX::m_psatd_solution_type = PSATDSolutionType::Default
private

Integer that corresponds to the order of the PSATD solution (whether the PSATD equations are derived from first-order or second-order solution)

◆ m_quantum_xi_c2

amrex::Real WarpX::m_quantum_xi_c2

◆ m_rho_nodal_flag

amrex::IntVect WarpX::m_rho_nodal_flag

◆ m_safe_guard_cells

bool WarpX::m_safe_guard_cells = false
private

◆ m_sort_idx_type

amrex::IntVect WarpX::m_sort_idx_type = amrex::IntVect(AMREX_D_DECL(0,0,0))
private

Specifies the type of grid used for the above sorting, i.e. cell-centered, nodal, or mixed.

◆ m_sort_particles_for_deposition

bool WarpX::m_sort_particles_for_deposition = false
private

If true, particles will be sorted in the order x -> y -> z -> ppc for faster deposition.

◆ 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.))

◆ m_vector_poisson_boundary_handler

MagnetostaticSolver::VectorPoissonBoundaryHandler WarpX::m_vector_poisson_boundary_handler

◆ m_verboncoeur_axis_correction

bool WarpX::m_verboncoeur_axis_correction = true
private

Flag whether the Verboncoeur correction is applied to the current and charge density on the axis when using RZ.

◆ m_zmax_plasma_to_compute_max_step

std::optional<amrex::Real> WarpX::m_zmax_plasma_to_compute_max_step = std::nullopt
private

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

◆ magnetostatic_solver_max_iters

int WarpX::magnetostatic_solver_max_iters = 200

◆ magnetostatic_solver_verbosity

int WarpX::magnetostatic_solver_verbosity = 2

◆ max_step

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

◆ maxlevel_extEMfield_init

int WarpX::maxlevel_extEMfield_init

Maximum level up to which the externally defined electric and magnetic fields are initialized. The default value is set to the max levels in the simulation. if lev > maxlevel_extEMfield_init, the fields on those levels will have a default value of 0

◆ mffile_nstreams

int WarpX::mffile_nstreams = 4
private

◆ 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

◆ myfl

std::unique_ptr<MultiFluidContainer> WarpX::myfl
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

◆ 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::Array<ParticleBoundaryType,3> WarpX::particle_boundary_hi
inlinestatic

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

◆ particle_boundary_lo

amrex::Array<ParticleBoundaryType,3> WarpX::particle_boundary_lo
inlinestatic

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

◆ particle_io_nfiles

int WarpX::particle_io_nfiles = 1024
private

◆ particle_max_grid_crossings

int WarpX::particle_max_grid_crossings = 1
static

Maximum number of allowed grid crossings for particles.

◆ particle_pusher_algo

auto WarpX::particle_pusher_algo = ParticlePusherAlgo::Default
inlinestatic

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

◆ pec_insulator_boundary

std::unique_ptr<PEC_Insulator> WarpX::pec_insulator_boundary
private

◆ phi_dotMask

amrex::Vector< std::unique_ptr<amrex::iMultiFab> > WarpX::phi_dotMask
mutableprivate

◆ 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

◆ poisson_solver_id

auto WarpX::poisson_solver_id = PoissonSolverAlgo::Default
inlinestatic

◆ reduced_diags

std::unique_ptr<MultiReducedDiags> WarpX::reduced_diags

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

◆ ref_patch_parser

std::unique_ptr<amrex::Parser> WarpX::ref_patch_parser
private

User-defined parser to define refinement patches.

◆ refine_plasma

bool WarpX::refine_plasma = false
static

◆ regrid_int

int WarpX::regrid_int = -1
private

◆ restart_chkfile

std::string WarpX::restart_chkfile
private

◆ 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)

◆ shared_mem_current_tpb

int WarpX::shared_mem_current_tpb = 128
static

number of threads to use per block in shared deposition

◆ shared_tilesize

amrex::IntVect WarpX::shared_tilesize
static

tileSize to use for shared current deposition operations

◆ 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_realbox

amrex::RealBox WarpX::slice_realbox
private

◆ sort_bin_size

amrex::IntVect WarpX::sort_bin_size
static

◆ sort_idx_type

amrex::IntVect WarpX::sort_idx_type
static

Specifies the type of grid used for the above sorting, i.e. cell-centered, nodal, or mixed.

◆ sort_intervals

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

◆ sort_particles_for_deposition

bool WarpX::sort_particles_for_deposition
static

If true, particles will be sorted in the order x -> y -> z -> ppc for faster deposition.

◆ 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

◆ sync_nodal_points

bool WarpX::sync_nodal_points = true
staticconstexprprivate

◆ synchronize_velocity_for_diagnostics

bool WarpX::synchronize_velocity_for_diagnostics = true
private

◆ t_new

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

◆ t_old

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

◆ time_dependency_J

auto WarpX::time_dependency_J = TimeDependencyJ::Default
inlinestatic

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

◆ time_dependency_rho

auto WarpX::time_dependency_rho = TimeDependencyRho::Default
inlinestatic

◆ 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 = false
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

◆ verbose

int WarpX::verbose = 1
private

◆ warpx_do_continuous_injection

int WarpX::warpx_do_continuous_injection = 0
private

◆ write_diagnostics_on_restart

bool WarpX::write_diagnostics_on_restart = false
private

When true, write the diagnostics after restart at the time of the restart.

◆ zmin_domain_boost_step_0

Real WarpX::zmin_domain_boost_step_0 = 0._rt
static

store initial value of zmin_domain_boost because WarpX::computeMaxStepBoostAccelerator needs the initial value of zmin_domain_boost, even if restarting from a checkpoint file


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