class handling the adaptive time step
More...
#include <AdaptiveTimeStep.H>
class handling the adaptive time step
◆ AdaptiveTimeStep()
AdaptiveTimeStep::AdaptiveTimeStep |
( |
const int |
nbeams | ) |
|
|
explicit |
◆ BroadcastTimeStep()
void AdaptiveTimeStep::BroadcastTimeStep |
( |
amrex::Real & |
dt | ) |
|
Head rank initial time step
- Parameters
-
[in,out] | dt | initial time step |
◆ CalculateFromDensity()
void AdaptiveTimeStep::CalculateFromDensity |
( |
amrex::Real |
t, |
|
|
amrex::Real & |
dt, |
|
|
MultiPlasma & |
plasmas |
|
) |
| |
Right before starting a time step, correct its dt to account for local plasma density and resolve density gradients.
- Parameters
-
[in] | t | current physical time |
[in,out] | dt | the time step |
[in] | plasmas | multiplasma to get density profile info |
◆ CalculateFromMinUz()
void AdaptiveTimeStep::CalculateFromMinUz |
( |
amrex::Real |
t, |
|
|
amrex::Real & |
dt, |
|
|
MultiBeam & |
beams, |
|
|
MultiPlasma & |
plasmas |
|
) |
| |
calculate the adaptive time step based on the beam energy
- Parameters
-
[in] | t | current physical time |
[in,out] | dt | the time step |
[in] | beams | multibeam containing all beams |
[in] | plasmas | multiplasma to get density profile info |
◆ GatherMinAccSlice()
gather min Ez from the beam slice
- Parameters
-
[in] | beams | multibeam containing all beams |
[in] | geom | geometry object |
[in] | fields | field object |
◆ GatherMinUzSlice()
void AdaptiveTimeStep::GatherMinUzSlice |
( |
MultiBeam & |
beams, |
|
|
const bool |
initial |
|
) |
| |
gather min uz from the beam slice
- Parameters
-
[in] | beams | multibeam containing all beams |
[in] | initial | whether to calculate the initial dt from the beam init slice |
◆ m_adaptive_control_phase_advance
bool AdaptiveTimeStep::m_adaptive_control_phase_advance = true |
|
private |
If true, a test on the phase advance sets the time step so it matches the phase advance expected for a uniform plasma. Relevant in the presence of density gradients. The tolerance on the phase advance difference is controlled by m_adaptive_phase_tolerance
◆ m_adaptive_gather_ez
bool AdaptiveTimeStep::m_adaptive_gather_ez = false |
Whether to Gather Ez to take into account the deceleration of a particle when calculating the time step for parallel jobs.
◆ m_adaptive_phase_substeps
int AdaptiveTimeStep::m_adaptive_phase_substeps = 2000 |
|
private |
Number of substeps on which the phase advance is monitored
◆ m_adaptive_phase_tolerance
amrex::Real AdaptiveTimeStep::m_adaptive_phase_tolerance = 4.e-4 |
|
private |
Phase shift tolerance. Relevant when density gradients are present. Lower is more accurate.
◆ m_adaptive_predict_step
bool AdaptiveTimeStep::m_adaptive_predict_step = true |
|
private |
Whether to predict the next time steps. More accurate for parallel simulations
◆ m_do_adaptive_time_step
bool AdaptiveTimeStep::m_do_adaptive_time_step = false |
Whether to use an adaptive time step
◆ m_dt_max
amrex::Real AdaptiveTimeStep::m_dt_max = std::numeric_limits<amrex::Real>::infinity() |
|
private |
Upper bound of the time step. Avoid gigantic time step(s) when beam starts near vacuum
◆ m_min_uz
amrex::Real AdaptiveTimeStep::m_min_uz = std::numeric_limits<amrex::Real>::max() |
|
private |
uz of the slowest particles
◆ m_nbeams
int AdaptiveTimeStep::m_nbeams = 0 |
|
private |
Number of beam species for which adaptive time step is computed
◆ m_nt_per_betatron
amrex::Real AdaptiveTimeStep::m_nt_per_betatron = 20. |
|
private |
Number of time steps per betatron period for the adaptive time step
◆ m_threshold_uz
amrex::Real AdaptiveTimeStep::m_threshold_uz = 2. |
|
private |
Threshold beam momentum, below which the time step is not decreased
◆ m_timestep_data
container including dt, min_gamma, sum of weights and the sum of weights times gamma
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/hipace/checkouts/stable/src/utils/AdaptiveTimeStep.H
- /home/docs/checkouts/readthedocs.org/user_builds/hipace/checkouts/stable/src/utils/AdaptiveTimeStep.cpp