WARPXM v1.10.0
Loading...
Searching...
No Matches
WmSolver Class Reference

Provides many vital functionality to building and executing a sequence of simulation code. More...

#include <wmsolver.h>

Inheritance diagram for WmSolver:
WmSolverBase WxStepper WxObject

Detailed Description

Provides many vital functionality to building and executing a sequence of simulation code.

Public Member Functions

 WmSolver (const WmSimulation *parentSim)
 Create solver Subsequent setup() call still required.
 
virtual ~WmSolver ()
 Destroy solver.
 
void setStartFrame (unsigned frame)
 Set frame from which to start the simulation.
 
virtual void setup (const WxCryptSet &wxc)
 Setup the subsolver using cryptset.
 
const WmDomaingetDomain () const
 Return unstructured multi-subdomain domain.
 
WmSubSolvergetSubSolver (const std::string &name) const
 Return pointer to subsolver.
 
const wxm::variable::variable_tgetConstVar (const std::string &name) const
 Return constant reference to a read variable.
 
wxm::variable::variable_tgetVar (const std::string &name) const
 Return reference to a variable.
 
const std::type_info & getVarType (const std::string &name) const
 Return a type_info reference for a variable known to the solver.
 
WmSequencedGroupgetSequencedGroup (const std::string &name)
 Return reference WmSequencedGroup.
 
virtual void solve ()
 Run solver.
 
void presolve ()
 Run any pre-solve initialization.
 
void step_dt (real limit_dt=0)
 Tries to steps a single time step dt.
 
const solverParameters_tgetSolverParameters () const
 Return the solver parameters.
 
const std::vector< WmHostAction * > & getStartOnlyGroup () const
 
const std::vector< WmHostAction * > & getPerStepGroup () const
 
- Public Member Functions inherited from WmSolverBase
 WmSolverBase (const WmSimulation *parentSim)
 Create new solver.
 
virtual ~WmSolverBase ()
 Destroy the object.
 
virtual void setup (const WxCryptSet &wxc)
 Setup object using supplied crypset.
 
std::string runName () const
 Return the run name (name identifying this run of the simulation)
 
std::string getSolverName () const
 Get the solver name (name associaton from the cryptset)
 
virtual void solve ()=0
 Run the solver.
 
virtual const WmDomaingetDomain () const =0
 Return unstructured domain.
 
virtual WmSubSolvergetSubSolver (const std::string &name) const =0
 Return pointer to subsolver.
 
virtual const wxm::variable::variable_tgetConstVar (const std::string &name) const =0
 Return constant reference to a read variable.
 
virtual wxm::variable::variable_tgetVar (const std::string &name) const =0
 Return reference to a variable.
 
virtual const std::type_info & getVarType (const std::string &name) const =0
 Return a type_info reference for a variable known to the solver.
 
virtual const solverParameters_tgetSolverParameters () const =0
 Return number of frames to output.
 
- Public Member Functions inherited from WxStepper
 WxStepper ()
 Create a new stepper.
 
virtual ~WxStepper ()
 Dtor: destroy object.
 
void setDt (time_t dt)
 Set time-step for the step method.
 
time_t getDt () const
 Get time-step for the step method.
 
void setTimeData (const WxStepper &timeData)
 Set time data for the step method.
 
void setCurrentTime (time_t tcurr)
 Set current time.
 
time_t incrementCurrentTime (time_t tadd)
 Increment current time.
 
time_t getCurrentTime () const
 Get the current time.
 
void setCurrentFrame (int frame)
 Set current frame number.
 
int incrementCurrentFrame ()
 Increment current frame number.
 
int getCurrentFrame () const
 Get the current frame number.
 
virtual WxStepperStatus step ()=0
 Advance the stepper by assigned time step.
 
virtual WxStepperStatus end ()
 Perform actions only done at simulation end.
 
- Public Member Functions inherited from WxObject
virtual ~WxObject ()
 Dtor: destroy object.
 
void setIo (WxIoBase &io)
 Set the I/O pointer for use in object.
 
void setMsg (WxMsgBase &msg)
 Set the msg pointer for use in object.
 
WxIoBasegetIo ()
 Return reference to I/O object.
 
const WxIoBasegetIo () const
 Return constant reference to I/O object.
 
WxMsgBasegetMsg ()
 Return reference to msg object.
 
const WxMsgBasegetMsg () const
 Return const reference to msg object.
 
virtual void setup (const WxCryptSet &wxc)
 Setup object using supplied crypset.
 
virtual void init ()
 Initialize the object.
 
virtual void finishBuild ()
 Finish building the object.
 
virtual void load (WxIoBase &io, const WxIoNodeType &grpNode)
 Load object from file.
 
virtual void dump (WxIoBase &io, WxIoNodeType &grpNode) const
 Dump object to file.
 
virtual std::string name () const
 Get name of object.
 
void setName (const std::string &nm)
 Set object's name.
 

Additional Inherited Members

- Public Types inherited from WxStepper
typedef real time_t
 Time scalar data type.
 
- Static Public Member Functions inherited from WmSolverBase
static std::string getSrcDirectory ()
 Returns the source directory used for finding kernels.
 
- Protected Member Functions inherited from WxObject
 WxObject ()
 Create object, that will be initialized subsequently.
 
 WxObject (const std::string &name)
 Create object with given name bypassing object setup phase Protected because there is no reason to have a WxObject directly, as it is meant to be a parent class.
 
- Protected Attributes inherited from WmSolverBase
const WmSimulation_parentSim
 Parent WmSimulation that owns this solver.
 

Constructor & Destructor Documentation

◆ WmSolver()

WmSolver::WmSolver ( const WmSimulation parentSim)

Create solver Subsequent setup() call still required.

Parameters
parentWmSimulation class which owns this solver

◆ ~WmSolver()

virtual WmSolver::~WmSolver ( )
virtual

Destroy solver.

Member Function Documentation

◆ getConstVar()

const wxm::variable::variable_t & WmSolver::getConstVar ( const std::string &  name) const
inlinevirtual

Return constant reference to a read variable.

Parameters
namename of read variable to return
Returns
reference to read variable

Implements WmSolverBase.

◆ getDomain()

const WmDomain & WmSolver::getDomain ( ) const
virtual

Return unstructured multi-subdomain domain.

Returns
WmDomain of entire problem domain

Implements WmSolverBase.

◆ getPerStepGroup()

const std::vector< WmHostAction * > & WmSolver::getPerStepGroup ( ) const
inline

◆ getSequencedGroup()

WmSequencedGroup & WmSolver::getSequencedGroup ( const std::string &  name)
inline

Return reference WmSequencedGroup.

Parameters
namename of sequenced group to return
Returns
reference to sequenced group

◆ getSolverParameters()

const solverParameters_t & WmSolver::getSolverParameters ( ) const
inlinevirtual

Return the solver parameters.

Returns
solver parameters

Implements WmSolverBase.

◆ getStartOnlyGroup()

const std::vector< WmHostAction * > & WmSolver::getStartOnlyGroup ( ) const
inline

◆ getSubSolver()

WmSubSolver * WmSolver::getSubSolver ( const std::string &  name) const
virtual

Return pointer to subsolver.

NOTE: this interface allows non-const access to the held subsolver through const member.

Parameters
namename of subsolver to return

Implements WmSolverBase.

◆ getVar()

wxm::variable::variable_t & WmSolver::getVar ( const std::string &  name) const
inlinevirtual

Return reference to a variable.

NOTE: this interface allows non-const access to the held variable through const member.

Parameters
namename of read variable to return
Returns
reference to read variable

Implements WmSolverBase.

◆ getVarType()

const std::type_info & WmSolver::getVarType ( const std::string &  name) const
virtual

Return a type_info reference for a variable known to the solver.

Parameters
namename of variable to return
Returns
type_id reference for the variable

Implements WmSolverBase.

◆ presolve()

void WmSolver::presolve ( )

Run any pre-solve initialization.

◆ setStartFrame()

void WmSolver::setStartFrame ( unsigned  frame)
inline

Set frame from which to start the simulation.

Parameters
frameFrame from which to start

◆ setup()

virtual void WmSolver::setup ( const WxCryptSet wxc)
virtual

Setup the subsolver using cryptset.

Parameters
wxcCryptset using which the object is set up.

Reimplemented from WmSolverBase.

◆ solve()

virtual void WmSolver::solve ( )
virtual

Run solver.

Implements WmSolverBase.

◆ step_dt()

void WmSolver::step_dt ( real  limit_dt = 0)

Tries to steps a single time step dt.

Parameters
limit_dtminimum allowed dt

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