Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
The Simulator class contains all the neccesary tools for running the whole simulation. More...
#include <alsfvm/simulator/Simulator.hpp>
Public Member Functions | |
Simulator (const SimulatorParameters &simulatorParameters, alsfvm::shared_ptr< grid::Grid > &grid, volume::VolumeFactory &volumeFactory, integrator::IntegratorFactory &integratorFactory, boundary::BoundaryFactory &boundaryFactory, numflux::NumericalFluxFactory &numericalFluxFactory, equation::CellComputerFactory &cellComputerFactory, alsfvm::shared_ptr< memory::MemoryFactory > &memoryFactory, real endTime, alsfvm::shared_ptr< DeviceConfiguration > &deviceConfiguration, std::string &equationName, alsfvm::shared_ptr< alsfvm::diffusion::DiffusionOperator > diffusionOperator, const std::string &name) | |
Simulator. More... | |
~Simulator () | |
bool | atEnd () override |
void | performStep () override |
void | callWriters () override |
void | addWriter (alsfvm::shared_ptr< io::Writer > writer) override |
addWriter adds a writer, this will be called every time callWriter is called More... | |
void | addTimestepAdjuster (alsfvm::shared_ptr< integrator::TimestepAdjuster > &adjuster) override |
real | getCurrentTime () const override |
real | getEndTime () const override |
void | setSimulationState (const volume::Volume &conservedVolume) |
std::string | getPlatformName () const |
std::string | getEquationName () const |
void | setInitialValue (alsfvm::shared_ptr< init::InitialData > &initialData) |
const std::shared_ptr< grid::Grid > & | getGrid () const override |
Gets the current grid that is being used. More... | |
std::shared_ptr< grid::Grid > & | getGrid () override |
Gets the current grid that is being used. More... | |
void | finalize () override |
Finalizes the computation, should be called at the end. More... | |
std::string | getName () const |
The Simulator class contains all the neccesary tools for running the whole simulation.
How to use:
alsfvm::simulator::Simulator::Simulator | ( | const SimulatorParameters & | simulatorParameters, |
alsfvm::shared_ptr< grid::Grid > & | grid, | ||
volume::VolumeFactory & | volumeFactory, | ||
integrator::IntegratorFactory & | integratorFactory, | ||
boundary::BoundaryFactory & | boundaryFactory, | ||
numflux::NumericalFluxFactory & | numericalFluxFactory, | ||
equation::CellComputerFactory & | cellComputerFactory, | ||
alsfvm::shared_ptr< memory::MemoryFactory > & | memoryFactory, | ||
real | endTime, | ||
alsfvm::shared_ptr< DeviceConfiguration > & | deviceConfiguration, | ||
std::string & | equationName, | ||
alsfvm::shared_ptr< alsfvm::diffusion::DiffusionOperator > | diffusionOperator, | ||
const std::string & | name | ||
) |
simulatorParameters | |
grid | |
volumeFactory | |
integratorFactory | |
boundaryFactory | |
numericalFluxFactory | |
cellComputerFactory | |
memoryFactory | |
endTime | |
deviceConfiguration | |
equationName | |
diffusionOperator | the diffusion operator to use |
name | the name of the simulator |
alsfvm::simulator::Simulator::~Simulator | ( | ) |
|
overridevirtual |
Adds a timestep adjuster.
The timestep adjuster is run as
the timestep adjuster is used to save at specific times.
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
addWriter adds a writer, this will be called every time callWriter is called
writer |
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
Calls the writers.
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
Finalizes the computation, should be called at the end.
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
Implements alsfvm::simulator::AbstractSimulator.
std::string alsfvm::simulator::Simulator::getEquationName | ( | ) | const |
|
overridevirtual |
Gets the current grid that is being used.
Implements alsfvm::simulator::AbstractSimulator.
|
overridevirtual |
Gets the current grid that is being used.
Implements alsfvm::simulator::AbstractSimulator.
std::string alsfvm::simulator::Simulator::getName | ( | ) | const |
std::string alsfvm::simulator::Simulator::getPlatformName | ( | ) | const |
|
overridevirtual |
Performs one timestep
Implements alsfvm::simulator::AbstractSimulator.
void alsfvm::simulator::Simulator::setInitialValue | ( | alsfvm::shared_ptr< init::InitialData > & | initialData | ) |
void alsfvm::simulator::Simulator::setSimulationState | ( | const volume::Volume & | conservedVolume | ) |
Updates the simulation state.
conservedVolume | the conservedVolume to update to |