Template Numerical Library version\ main:a0a944a8c
|
Base class for direct solvers. More...
#include <TNL/Solvers/DirectSolver.h>
Public Types | |
using | IndexType = Index |
Indexing type. | |
using | RealType = Real |
Floating point type used for computations. | |
using | SolverMonitorType = SolverMonitor |
Type of an object used for monitoring of the convergence. |
Public Member Functions | |
DirectSolver ()=default | |
Default constructor. | |
const Real & | getResidue () const |
Gets the residue reached at the current iteration. | |
void | setRefreshRate (const Index &refreshRate) |
Sets the refresh rate (in milliseconds) for the solver monitor. | |
void | setResidue (const Real &residue) |
Sets the residue reached at the current iteration. | |
void | setSolverMonitor (SolverMonitorType &solverMonitor) |
Sets the solver monitor object. | |
bool | setup (const Config::ParameterContainer ¶meters, const std::string &prefix="") |
Method for setup of the direct solver based on configuration parameters. |
Static Public Member Functions | |
static void | configSetup (Config::ConfigDescription &config, const std::string &prefix="") |
This method defines configuration entries for setup of the iterative solver. | |
static constexpr bool | isDirectSolver () |
Returns true if the solver is a direct solver. | |
static constexpr bool | isIterativeSolver () |
Returns true if the solver is an iterative solver. |
Protected Attributes | |
Real | currentResidue = std::numeric_limits< RealType >::max() |
Index | refreshRate = 1 |
SolverMonitor * | solverMonitor = nullptr |
Base class for direct solvers.
Real | is a floating point type used for computations. |
Index | is an indexing type. |
IterativeSolverMonitor< | Real > is type of an object used for monitoring of the convergence. |
|
static |
This method defines configuration entries for setup of the iterative solver.
The following entries are defined:
refresh-rate - number of milliseconds between solver monitor refreshes.
config | contains description of configuration parameters. |
prefix | is a prefix of particular configuration entries. |
const Real & TNL::Solvers::DirectSolver< Real, Index, SolverMonitor >::getResidue | ( | ) | const |
Gets the residue reached at the current iteration.
void TNL::Solvers::DirectSolver< Real, Index, SolverMonitor >::setRefreshRate | ( | const Index & | refreshRate | ) |
Sets the refresh rate (in milliseconds) for the solver monitor.
refreshRate | of the solver monitor in milliseconds. |
void TNL::Solvers::DirectSolver< Real, Index, SolverMonitor >::setResidue | ( | const Real & | residue | ) |
Sets the residue reached at the current iteration.
residue | reached at the current iteration. |
void TNL::Solvers::DirectSolver< Real, Index, SolverMonitor >::setSolverMonitor | ( | SolverMonitorType & | solverMonitor | ) |
Sets the solver monitor object.
The solver monitor is an object for monitoring the status of the iterative solver. Usually it prints the number of iterations, current residue or elapsed time.
solverMonitor | is an object for monitoring the iterative solver. |
bool TNL::Solvers::DirectSolver< Real, Index, SolverMonitor >::setup | ( | const Config::ParameterContainer & | parameters, |
const std::string & | prefix = "" ) |
Method for setup of the direct solver based on configuration parameters.
parameters | contains values of the define configuration entries. |
prefix | is a prefix of particular configuration entries. |