chombo-discharge
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Physics::TracerParticle::TracerParticleStepper< P > Class Template Reference

Implementation of TimeStepper for advancing tracer particles in a fixed velocity field. More...

#include <CD_TracerParticleStepper.H>

Inheritance diagram for Physics::TracerParticle::TracerParticleStepper< P >:
Inheritance graph
[legend]
Collaboration diagram for Physics::TracerParticle::TracerParticleStepper< P >:
Collaboration graph
[legend]

Public Member Functions

 TracerParticleStepper ()
 Constructor. Does nothing.
 
 TracerParticleStepper (const TracerParticleStepper< P > &a_other)=delete
 Copy constructor. Disallowed. More...
 
 TracerParticleStepper (const TracerParticleStepper< P > &&a_other)=delete
 Move constructor. Disallowed. More...
 
virtual ~TracerParticleStepper ()
 Destructor.
 
TracerParticleStepperoperator= (const TracerParticleStepper< P > &a_other)=delete
 Copy assignment operator. Disallowed. More...
 
TracerParticleStepperoperator= (const TracerParticleStepper< P > &&a_other)=delete
 Move assignment operator. Disallowed. More...
 
void setupSolvers () override
 Instantiate the tracer particle solver.
 
void allocate () override
 Allocate storage for solvers and time stepper.
 
void initialData () override
 Fill problem with initial data.
 
void postInitialize () override
 Perform any post-initialization steps. Not needed for this time stepper.
 
void postCheckpointSetup () override
 Post checkpoint operations. Not needed for this time stepper.
 
void registerRealms () override
 Register realms. Primal is the only realm we need.
 
void registerOperators () override
 Register operators. More...
 
void parseOptions ()
 Parse options.
 
void parseRuntimeOptions () override
 Parse runtime options.
 
int getNumberOfPlotVariables () const override
 Get number of plot variables for this physics module.
 
Vector< std::string > getPlotVariableNames () const override
 Get plot variable names.
 
void writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_realm, const int a_level) const override
 Write plot data to output holder. More...
 
virtual Real computeDt () override
 Compute a time step to be used by Driver.
 
virtual Real advance (const Real a_dt) override
 Advancement method. Swaps between various kernels. More...
 
virtual void synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override
 Synchronize solver times and time steps. More...
 
virtual void printStepReport () override
 Print a step report. More...
 
virtual void preRegrid (const int a_lmin, const int a_oldFinestLevel) override
 Perform pre-regrid operations. More...
 
virtual void regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
 Time stepper regrid method. More...
 
virtual void postRegrid () override
 Perform post-regrid operations. More...
 
- Public Member Functions inherited from TimeStepper
 TimeStepper ()
 Default constructor (does nothing)
 
virtual ~TimeStepper ()
 Default destructor (does nothing)
 
void setAmr (const RefCountedPtr< AmrMesh > &a_amr)
 Set AmrMesh. More...
 
void setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Set the computational geometry. More...
 
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.
 
virtual Vector< long int > getCheckpointLoads (const std::string a_realm, const int a_level) const
 Get computational loads to be checkpointed. More...
 
virtual bool needToRegrid ()
 Fuction which can have Driver do regrids at arbitrary points in the simulation. More...
 
virtual bool loadBalanceThisRealm (const std::string a_realm) const
 Load balancing query for a specified realm. If this returns true for a_realm, load balancing routines will be called during regrids. More...
 
virtual 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)
 Load balance grid boxes for a specified realm. More...
 

Protected Member Functions

virtual void initialParticles ()
 Fill initial particles.
 
virtual void setVelocity ()
 Set the velocity on the mesh.
 
virtual void parseIntegrator ()
 Parse reactive integrator.
 
virtual void parseVelocityField ()
 Parse velocity field.
 
virtual void parseInitialConditions ()
 Parse initial conditions.
 
virtual void advanceParticlesEuler (const Real a_dt)
 Advance particles using explicit Euler rule. More...
 
virtual void advanceParticlesRK2 (const Real a_dt)
 Advance particles using second order Runge-Kutta. More...
 
virtual void advanceParticlesRK4 (const Real a_dt)
 Advance particles using fourth order Runge-Kutta. More...
 

Protected Attributes

IntegrationAlgorithm m_algorithm
 Integration algorithm.
 
VelocityField m_velocityField
 Velocity field type.
 
std::string m_realm
 Realm where solver and m_velocity lives.
 
phase::which_phase m_phase
 Phase (gas/solid) where the solver lives.
 
RefCountedPtr< TracerParticleSolver< P > > m_solver
 Tracer particle solvers.
 
EBAMRCellData m_velocity
 Tracer particle velocity field.
 
Real m_cfl
 Particle "CFL" time step.
 
size_t m_numInitialParticles
 Number of particles.
 
- Protected Attributes inherited from TimeStepper
int m_verbosity
 Class verbosity.
 
int m_timeStep
 Time step.
 
Real m_time
 TIme.
 
Real m_dt
 Previous time step size.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh.
 
RefCountedPtr< ComputationalGeometrym_computationalGeometry
 Computational geometry.
 

Detailed Description

template<typename P>
class Physics::TracerParticle::TracerParticleStepper< P >

Implementation of TimeStepper for advancing tracer particles in a fixed velocity field.

The template requirements on the particle type P are the same as for TracerParticleSolver with the addition of templated functions of the type RealVect& P::vector<size_t>() which returns a RealVect. This is used for the Runge-Kutta particle advection kernels. This class will work fine with TracerParticle<0, M> where M >= 4.

Constructor & Destructor Documentation

◆ TracerParticleStepper() [1/2]

template<typename P >
Physics::TracerParticle::TracerParticleStepper< P >::TracerParticleStepper ( const TracerParticleStepper< P > &  a_other)
delete

Copy constructor. Disallowed.

Parameters
[in]a_otherOther

◆ TracerParticleStepper() [2/2]

template<typename P >
Physics::TracerParticle::TracerParticleStepper< P >::TracerParticleStepper ( const TracerParticleStepper< P > &&  a_other)
delete

Move constructor. Disallowed.

Parameters
[in]a_otherOther

Member Function Documentation

◆ advance()

template<typename P >
Real TracerParticleStepper::advance ( const Real  a_dt)
inlineoverridevirtual

Advancement method. Swaps between various kernels.

Parameters
[in]a_dtTime step to be used for advancement
Returns
Returns the time step that was used (equal to a_dt in this case).

Implements TimeStepper.

◆ advanceParticlesEuler()

template<typename P >
void TracerParticleStepper::advanceParticlesEuler ( const Real  a_dt)
inlineprotectedvirtual

Advance particles using explicit Euler rule.

Parameters
[in]a_dtAdvanced time step

◆ advanceParticlesRK2()

template<typename P >
void TracerParticleStepper::advanceParticlesRK2 ( const Real  a_dt)
inlineprotectedvirtual

Advance particles using second order Runge-Kutta.

Parameters
[in]a_dtAdvanced time step

◆ advanceParticlesRK4()

template<typename P >
void TracerParticleStepper::advanceParticlesRK4 ( const Real  a_dt)
inlineprotectedvirtual

Advance particles using fourth order Runge-Kutta.

Parameters
[in]a_dtAdvanced time step

◆ operator=() [1/2]

template<typename P >
TracerParticleStepper& Physics::TracerParticle::TracerParticleStepper< P >::operator= ( const TracerParticleStepper< P > &&  a_other)
delete

Move assignment operator. Disallowed.

Parameters
[in]a_otherOther

◆ operator=() [2/2]

template<typename P >
TracerParticleStepper& Physics::TracerParticle::TracerParticleStepper< P >::operator= ( const TracerParticleStepper< P > &  a_other)
delete

Copy assignment operator. Disallowed.

Parameters
[in]a_otherOther

◆ postRegrid()

template<typename P >
void TracerParticleStepper::postRegrid
inlineoverridevirtual

Perform post-regrid operations.

This includes all operations to be done AFTER interpolating data to new grids.

Implements TimeStepper.

◆ preRegrid()

template<typename P >
void TracerParticleStepper::preRegrid ( const int  a_lmin,
const int  a_oldFinestLevel 
)
inlineoverridevirtual

Perform pre-regrid operations.

Parameters
[in]a_lminThe coarsest level that changes
[in]a_oldFinestLevelThe finest level before the regrid.

Implements TimeStepper.

◆ printStepReport()

template<typename P >
virtual void Physics::TracerParticle::TracerParticleStepper< P >::printStepReport ( )
inlineoverridevirtual

Print a step report.

This is called by Driver after time step. The routine can be used to display use information about the simulation progress. Not used by this class.

Implements TimeStepper.

◆ registerOperators()

template<typename P >
void TracerParticleStepper::registerOperators
inlineoverridevirtual

Register operators.

Only need the solver's operators.

Implements TimeStepper.

◆ regrid()

template<typename P >
void TracerParticleStepper::regrid ( const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel 
)
inlineoverridevirtual

Time stepper regrid method.

Parameters
[in]a_lminThe coarsest level that changed.
[in]a_oldFinestLevelThe finest level before the regrid.
[in]a_newFinestLevelThe finest level after the regrid.

Implements TimeStepper.

◆ synchronizeSolverTimes()

template<typename P >
void TracerParticleStepper::synchronizeSolverTimes ( const int  a_step,
const Real  a_time,
const Real  a_dt 
)
inlineoverridevirtual

Synchronize solver times and time steps.

Parameters
[in]a_stepTime step
[in]a_timeTime (in seconds)
[in]a_dtTime step that was used.

Implements TimeStepper.

◆ writePlotData()

template<typename P >
void TracerParticleStepper::writePlotData ( LevelData< EBCellFAB > &  a_output,
int &  a_icomp,
const std::string  a_realm,
const int  a_level 
) const
inlineoverridevirtual

Write plot data to output holder.

Parameters
[in,out]a_outputOutput data holder.
[in,out]a_icompStarting component in a_output to begin at.
[in]a_outputRealmRealm where a_output belongs
[in]a_levelGrid level

Implements TimeStepper.


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