deltaFlow
ISolverObserver Class Referenceabstract

Sink for solver progress/diagnostics (Dependency Inversion / SRP). More...

#include <ISolver.H>

Inheritance diagram for ISolverObserver:

Public Member Functions

virtual ~ISolverObserver ()=default
 
virtual void onIteration (const char *solverName, int iter, int maxIter, double error, double tolerance)=0
 Called after every iteration with the current error/tolerance.
 
virtual void onFinished (const char *solverName, bool converged, int iter, int maxIter, double error, double tolerance)=0
 Called once after the iteration loop ends (converged or not).
 
virtual void onMessage (const char *solverName, const char *message)=0
 Called for solver-specific diagnostic/warning messages (e.g.
 

Detailed Description

Sink for solver progress/diagnostics (Dependency Inversion / SRP).

GaussSeidel and NewtonRaphson must only solve; reporting iteration progress and logging is a separate responsibility. Instead of calling LOG_* macros and printIterationProgress()/printConvergenceStatus() directly, the solvers report through this abstraction. A null observer pointer means "no reporting" – the solver remains pure numerically. Concrete observers (e.g. one that writes to the Logger singleton and the terminal progress bar) are injected by the caller, not hardcoded inside the solver.

Definition at line 93 of file ISolver.H.

Constructor & Destructor Documentation

◆ ~ISolverObserver()

virtual ISolverObserver::~ISolverObserver ( )
virtualdefault

Member Function Documentation

◆ onFinished()

virtual void ISolverObserver::onFinished ( const char *  solverName,
bool  converged,
int  iter,
int  maxIter,
double  error,
double  tolerance 
)
pure virtual

Called once after the iteration loop ends (converged or not).

Implemented in LoggingSolverObserver.

Here is the caller graph for this function:

◆ onIteration()

virtual void ISolverObserver::onIteration ( const char *  solverName,
int  iter,
int  maxIter,
double  error,
double  tolerance 
)
pure virtual

Called after every iteration with the current error/tolerance.

Implemented in LoggingSolverObserver.

Here is the caller graph for this function:

◆ onMessage()

virtual void ISolverObserver::onMessage ( const char *  solverName,
const char *  message 
)
pure virtual

Called for solver-specific diagnostic/warning messages (e.g.

relaxation coefficient notes).

Implemented in LoggingSolverObserver.

Here is the caller graph for this function:

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