9#ifndef THERMALHYDRAULICSOLVER_H
10#define THERMALHYDRAULICSOLVER_H
129 virtual void restore(
const std::vector<char>& data) = 0;
Callback interface that the engine implements to receive notifications from the solver.
virtual void onBranchingPoint(ThermalHydraulicSolver &solver)=0
Called when a branching point is reached during simulation. RelapSolver routes the Fortran initiate_b...
virtual ~SolverCallback()=default
virtual void onFirstInit(ThermalHydraulicSolver &solver)=0
Called once for the entire simulation during first initialization. RelapSolver routes the Fortran act...
virtual void onTimestepAction(ThermalHydraulicSolver &solver)=0
Called at each timestep for action execution. RelapSolver routes the Fortran actte_() callback here; ...
virtual void onScenarioStart(ThermalHydraulicSolver &solver)=0
Called once at the start of each scenario/sequence. RelapSolver routes the Fortran secini_() callback...
virtual void onEvaluationPoint(ThermalHydraulicSolver &solver)=0
Called at each evaluation point (~0.5s simulation time intervals). RelapSolver routes the Fortran int...
Abstract interface for thermal-hydraulic solvers.
virtual bool isTerminateAll() const =0
True if all simulation should terminate.
virtual int stopFlag() const =0
RELAP5 stop flag. 0=running, 3=normal end, 11=crash.
virtual void setNewRestart(bool v)=0
Set whether this is a fresh start (true) or a restart (false).
virtual void setGenNode(bool v)=0
Signal the solver to generate a restart checkpoint at this point.
virtual void runSequence(SolverCallback &cb)=0
Run one complete simulation sequence. Blocks until the sequence completes. The solver calls back into...
virtual void setThermoCacheMode(int mode)=0
Set thermodynamic table caching mode (RelapSolver; no-op for RestApiSolver). 2 forces a reload of the...
virtual void restore(const std::vector< char > &data)=0
Restore the solver's state from a buffer returned by checkpoint().
virtual void setMembufMode(int mode)=0
Set in-memory restart buffer mode (RelapSolver; no-op for RestApiSolver). 1=enabled,...
virtual void setTerminateAll(bool v)=0
Set the terminate-all flag.
virtual double currentTime() const =0
Current simulation time [s].
virtual void setBranchCount(int n)=0
Set the number of branches generated at the current branching point.
virtual ~ThermalHydraulicSolver()=default
virtual void setInputDeck(const std::string &path)=0
Set the input deck file path for the next sequence.
virtual std::vector< char > checkpoint()=0
Extract the solver's restart checkpoint as an opaque byte buffer.