hydrobricks
Loading...
Searching...
No Matches
Solver Class Referenceabstract
Inheritance diagram for Solver:
SolverEulerExplicit SolverHeunExplicit SolverRK4 SolverSequential SolverAnalyticLinear SolverCrankNicolson SolverExponentialEuler SolverImplicitEuler

Public Member Functions

virtual bool Solve (double timeStepInDays)=0
 
void Connect (Processor *processor)
 
virtual void InitializeContainers ()=0
 

Static Public Member Functions

static std::unique_ptr< SolverFactory (const SolverSettings &solverSettings)
 

Protected Attributes

Processor_processor
 

Member Function Documentation

◆ Connect()

void Solver::Connect ( Processor * processor)
inline

Connect the solver to a processor.

Parameters
processorThe processor to connect with.

◆ Factory()

std::unique_ptr< Solver > Solver::Factory ( const SolverSettings & solverSettings)
static

Create the solver based on the provided settings.

Parameters
solverSettingsThe solver settings.
Returns
A new generated solver.

◆ InitializeContainers()

virtual void Solver::InitializeContainers ( )
pure virtual

Allocate the internal rate and state buffers to the needed size. Must be called after Connect(), once the processor knows its connection and state counts.

Implemented in SolverEulerExplicit, SolverHeunExplicit, SolverRK4, and SolverSequential.

◆ Solve()

virtual bool Solver::Solve ( double timeStepInDays)
pure virtual

Apply the solver.

Parameters
timeStepInDaysThe time step in days.
Returns
True if success, false otherwise.

Implemented in SolverEulerExplicit, SolverHeunExplicit, SolverRK4, and SolverSequential.


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