|
|
| BrownianWalkerStepper () |
| | Default constructor. Parses all options from the BrownianWalker ParmParse block.
|
| |
| | BrownianWalkerStepper (RefCountedPtr< ItoSolver > &a_solver) |
| | Full constructor. Delegates to the default constructor and stores the provided solver.
|
| |
|
virtual | ~BrownianWalkerStepper () |
| | Destructor.
|
| |
| void | initialData () override |
| | Fill the solver with initial particles, make superparticles, and set flow fields.
|
| |
| void | allocate () override |
| | Allocate internal storage in the solver.
|
| |
| void | postInitialize () override |
| | Post-initialization hook. No operations are performed.
|
| |
| bool | loadBalanceThisRealm (const std::string &a_realm) const override |
| | Return whether the given realm should be load balanced by this stepper.
|
| |
| Vector< long int > | getCheckpointLoads (const std::string &a_realm, const int a_level) const override |
| | Return per-patch computational loads for checkpointing and plotting.
|
| |
| void | loadBalanceBoxes (Vector< Vector< int > > &a_procs, Vector< Vector< Box > > &a_boxes, const std::string &a_realm, const Vector< DisjointBoxLayout > &a_grids, const int a_lmin, const int a_finestLevel) override |
| | Load balance grid patches for the specified realm.
|
| |
| void | postCheckpointSetup () override |
| | Post-checkpoint setup. Remaps particles, makes superparticles, and restores advection and diffusion fields after a restart.
|
| |
| int | getNumberOfPlotVariables () const override |
| | Return the number of output variables contributed by this stepper.
|
| |
| Vector< std::string > | getPlotVariableNames () const override |
| | Return the names of the output variables contributed by this stepper.
|
| |
| void | writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const override |
| | Write plot data into the output holder.
|
| |
| Real | computeDt () override |
| | Compute the next time step as m_cfl * ItoSolver::computeDt().
|
| |
| void | synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override |
| | Update internal time/step counters and forward them to the solver.
|
| |
| void | printStepReport () override |
| | Print a step report showing the local and global particle counts.
|
| |
| void | registerOperators () override |
| | Register the operators required by the solver.
|
| |
| void | registerRealms () override |
| | Register the realm(s) used in the simulation.
|
| |
| void | parseRuntimeOptions () override |
| | Parse runtime options from ParmParse. Re-reads verbosity, ppc, CFL, and load balancing flag.
|
| |
| bool | needToRegrid () override |
| | Always returns false; regridding is triggered externally by Driver.
|
| |
| void | preRegrid (const int a_lbase, const int a_oldFinestLevel) override |
| | Pre-regrid hook. Deposits particle counts onto the mesh and puts the solver in pre-regrid mode.
|
| |
| void | setupSolvers () override |
| | Instantiate the species and configure the solver with realm, phase, and AMR data.
|
| |
| Real | advance (const Real a_dt) override |
| | Advance the particle system by one Euler-Maruyama step.
|
| |
| void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override |
| | Regrid the solver onto the new mesh and remake superparticles.
|
| |
| void | postRegrid () override |
| | Post-regrid hook. Clears temporary mesh storage and restores flow fields.
|
| |
|
| TimeStepper () |
| | Default constructor (does nothing)
|
| |
|
virtual | ~TimeStepper () |
| | Default destructor (does nothing)
|
| |
|
| TimeStepper (const TimeStepper &)=delete |
| | Disallow copy construction.
|
| |
|
TimeStepper & | operator= (const TimeStepper &)=delete |
| | Disallow copy assignment.
|
| |
|
| TimeStepper (TimeStepper &&)=default |
| | Allow move construction.
|
| |
| TimeStepper & | operator= (TimeStepper &&)=default |
| | Allow move assignment.
|
| |
| void | setAmr (const RefCountedPtr< AmrMesh > &a_amr) |
| | Set AmrMesh.
|
| |
| void | setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry) |
| | Set the computational geometry.
|
| |
| virtual void | prePlot () |
| | An option for calling special functions prior to plotting data. Called by Driver in the IMMEDIATELY before writing the plot file.
|
| |
| virtual void | postPlot () |
| | An option for calling special functions prior to plotting data. Called by Driver in the IMMEDIATELY after writing the plot file.
|
| |
| bool | keepGoing () const |
| | Query whether the time stepper wants to continue stepping.
|
| |
|
|
void | setAdvectionDiffusion () |
| | Set the velocity and diffusion fields on the mesh if the solver is mobile/diffusive.
|
| |
|
void | setVelocity () |
| | Compute and assign the solid-body rotation velocity field to the solver.
|
| |
| void | setDiffusion () |
| | Set the mesh diffusion function on the solver.
|
| |
|
void | makeSuperParticles () |
| | Sort particles by cell, merge to m_ppc per cell, then re-sort by patch.
|
| |
| void | loadBalanceBoxesMesh (Vector< Vector< int > > &a_procs, Vector< Vector< Box > > &a_boxes, const std::string &a_realm, const Vector< DisjointBoxLayout > &a_grids, const int a_lmin, const int a_finestLevel) |
| | Load balance using particle counts estimated from mesh-deposited data.
|
| |
| void | loadBalanceBoxesParticles (Vector< Vector< int > > &a_procs, Vector< Vector< Box > > &a_boxes, const std::string &a_realm, const Vector< DisjointBoxLayout > &a_grids, const int a_lmin, const int a_finestLevel) |
| | Load balance by directly remapping particles to the new grids and counting them.
|
| |
|
|
LoadBalancingMethod | m_whichLoadBalance |
| | Selected load balancing strategy.
|
| |
|
std::string | m_realm |
| | Name of the realm on which the particles live.
|
| |
|
phase::which_phase | m_phase |
| | Computational phase on which the particles live.
|
| |
|
bool | m_loadBalance |
| | If true, the application performs particle-based load balancing at each regrid.
|
| |
|
RefCountedPtr< ItoSolver > | m_solver |
| | The Ito solver used to advance the particle system.
|
| |
|
RefCountedPtr< ItoSpecies > | m_species |
| | Species definition passed to the Ito solver.
|
| |
|
EBAMRCellData | m_regridPPC |
| | Temporary storage for the number of particles per cell, used during load balancing.
|
| |
|
Real | m_diffCo |
| | Spatially uniform diffusion coefficient for all particles.
|
| |
|
Real | m_mobility |
| | Spatially uniform particle mobility.
|
| |
|
Real | m_omega |
| | Angular velocity of the solid-body rotation advection field.
|
| |
|
int | m_ppc |
| | Target number of computational particles per cell after superparticle merging.
|
| |
|
Real | m_cfl |
| | CFL-like scaling factor applied to the solver's intrinsic time step estimate.
|
| |
|
int | m_verbosity |
| | Class verbosity.
|
| |
|
int | m_timeStep |
| | Time step.
|
| |
|
Real | m_time |
| | TIme.
|
| |
|
Real | m_dt |
| | Previous time step size.
|
| |
| bool | m_keepGoing |
| | If false, Driver will stop the time loop after the current step.
|
| |
|
RefCountedPtr< AmrMesh > | m_amr |
| | AmrMesh.
|
| |
|
RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
| | Computational geometry.
|
| |
TimeStepper implementation for advancing Brownian walker particles.
This class drives a single ItoSolver using an Euler-Maruyama scheme:
\[ \mathbf{X}^{n+1} = \mathbf{X}^n + \mathbf{V}\,\Delta t + \sqrt{2D\,\Delta t}\,\mathbf{N}(0,1) \]
where \(\mathbf{V}\) is the advection velocity, \(D\) is the diffusion coefficient, and \(\mathbf{N}(0,1)\) is a standard Gaussian random vector.
The velocity field is a solid-body rotation with angular velocity \(\omega\), and both the mobility and diffusion coefficient are spatially uniform and set directly on each particle.
This module demonstrates two particle-based load balancing strategies:
- Mesh-based: estimates the particle count on new grids from mesh-deposited data (faster).
- Particle-based: directly remaps and counts particles on the new grids (more accurate).