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

Top level class for WARPXM simulations. More...

#include <wmsimulation.h>

Inheritance diagram for WmSimulation:
WxObject

Detailed Description

Top level class for WARPXM simulations.

This class does all the setup of the simulation and runs it to completion.

Public Member Functions

 WmSimulation ()
 Construct a new simulation object.
 
 WmSimulation (MPI_Comm comm)
 constructs a WmSimulation with a given MPI Communicator.
 
virtual ~WmSimulation ()
 Destroy simulation.
 
const std::string & getInpFileName () const
 Return name of input file including absolute or relative path as specified.
 
bool parseCmdLine ()
 Parse command line parameters.
 
const std::string & getRunName () const
 Return name of run.
 
bool isRestarting () const
 Return true if we are restarting simulation.
 
std::string getRestartFile () const
 Get file from which to restart the simulation.
 
int getRestartFrame () const
 Get frame from which to restart the simulation.
 
virtual void setup (const WxCryptSet &wmc)
 Setup simulation using supplied crypset.
 
void setInputFileText (const std::string &str)
 Set string representing the input file contents used to build this simulation.
 
const std::string & getInputFileText () const
 Get string representing the input file contents used to build this simulation.
 
void simulate ()
 Run simulation.
 
WmSolverget_solver ()
 Get access to the underlying WmSolver.
 
WxMpiMsggetMsg ()
 
- 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

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

Constructor & Destructor Documentation

◆ WmSimulation() [1/2]

WmSimulation::WmSimulation ( )

Construct a new simulation object.

◆ WmSimulation() [2/2]

WmSimulation::WmSimulation ( MPI_Comm  comm)

constructs a WmSimulation with a given MPI Communicator.

Note: this will create a duplicate of comm

◆ ~WmSimulation()

virtual WmSimulation::~WmSimulation ( )
virtual

Destroy simulation.

Member Function Documentation

◆ get_solver()

WmSolver * WmSimulation::get_solver ( )
inline

Get access to the underlying WmSolver.

◆ getInpFileName()

const std::string & WmSimulation::getInpFileName ( ) const

Return name of input file including absolute or relative path as specified.

Returns
Name of input file

◆ getInputFileText()

const std::string & WmSimulation::getInputFileText ( ) const

Get string representing the input file contents used to build this simulation.

Useful for archival purposes.

Returns
String representing the input file contents.

◆ getMsg()

WxMpiMsg & WmSimulation::getMsg ( )
inline

◆ getRestartFile()

std::string WmSimulation::getRestartFile ( ) const
inline

Get file from which to restart the simulation.

Parameters
filename

◆ getRestartFrame()

int WmSimulation::getRestartFrame ( ) const
inline

Get frame from which to restart the simulation.

Parameters
framenumber

◆ getRunName()

const std::string & WmSimulation::getRunName ( ) const
inline

Return name of run.

Returns
Name of run

◆ isRestarting()

bool WmSimulation::isRestarting ( ) const
inline

Return true if we are restarting simulation.

Returns
true if we are restarting simulation

◆ parseCmdLine()

bool WmSimulation::parseCmdLine ( )

Parse command line parameters.

◆ setInputFileText()

void WmSimulation::setInputFileText ( const std::string &  str)

Set string representing the input file contents used to build this simulation.

Useful for archival purposes.

Parameters
strString representing the input file contents.

◆ setup()

virtual void WmSimulation::setup ( const WxCryptSet wmc)
virtual

Setup simulation using supplied crypset.

Parameters
wmcCryptset using which the object is set up.

Reimplemented from WxObject.

◆ simulate()

void WmSimulation::simulate ( )

Run simulation.


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