Template Numerical Library version\ main:161afe73
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
TNL::Solvers::ODE::StaticExplicitSolver< Real, Index > Class Template Reference

Base class for ODE solvers and explicit solvers od PDEs. More...

#include <TNL/Solvers/ODE/StaticExplicitSolver.h>

Inheritance diagram for TNL::Solvers::ODE::StaticExplicitSolver< Real, Index >:
Inheritance graph
[legend]
Collaboration diagram for TNL::Solvers::ODE::StaticExplicitSolver< Real, Index >:
Collaboration graph
[legend]

Public Types

using IndexType = Index
 Indexing type.
 
using RealType = Real
 Type of the floating-point arithmetics or static vector.
 

Public Member Functions

__cuda_callable__ StaticExplicitSolver ()=default
 Default constructor.
 
bool __cuda_callable__ checkNextIteration ()
 Checks if the solver is allowed to do the next iteration. More...
 
__cuda_callable__ const RealTypegetMaxTau () const
 Getter of maximal value of the time step.
 
__cuda_callable__ const RealTypegetStopTime () const
 Getter of the time where the evolution computation shall by stopped.
 
__cuda_callable__ const RealTypegetTau () const
 Getter of the time step used for the computation.
 
__cuda_callable__ const RealTypegetTime () const
 Getter of the current time of the evolution computed by the solver.
 
__cuda_callable__ void setMaxTau (const RealType &maxTau)
 Setter of maximal value of the time step. More...
 
__cuda_callable__ void setStopTime (const RealType &stopTime)
 Setter of the time where the evolution computation shall by stopped.
 
__cuda_callable__ void setTau (const RealType &tau)
 Setter of the time step used for the computation. More...
 
__cuda_callable__ void setTestingMode (bool testingMode)
 
__cuda_callable__ void setTime (const RealType &t)
 Settter of the current time of the evolution computed by the solver.
 
bool setup (const Config::ParameterContainer &parameters, const String &prefix="")
 Method for setup of the iterative solver based on configuration parameters.
 
- Public Member Functions inherited from TNL::Solvers::StaticIterativeSolver< Real, Index >
__cuda_callable__ StaticIterativeSolver ()=default
 Default constructor.
 
__cuda_callable__ bool checkConvergence ()
 Checks whether the convergence occurred already. More...
 
__cuda_callable__ bool checkNextIteration ()
 Checks if the solver is allowed to do the next iteration. More...
 
__cuda_callable__ const RealgetConvergenceResidue () const
 Gets the the convergence threshold. More...
 
__cuda_callable__ const RealgetDivergenceResidue () const
 Gets the limit for the divergence criterion. More...
 
__cuda_callable__ const Index & getIterations () const
 Gets the number of iterations performed by the solver so far. More...
 
__cuda_callable__ const Index & getMaxIterations () const
 Gets the maximal number of iterations the solver is allowed to perform. More...
 
__cuda_callable__ const Index & getMinIterations () const
 Gets the minimal number of iterations the solver is supposed to do. More...
 
__cuda_callable__ const RealgetResidue () const
 Gets the residue reached at the current iteration. More...
 
__cuda_callable__ bool nextIteration ()
 Proceeds to the next iteration. More...
 
__cuda_callable__ void resetIterations ()
 Sets the the number of the current iterations to zero.
 
__cuda_callable__ void setConvergenceResidue (const Real &convergenceResidue)
 Sets the threshold for the convergence. More...
 
__cuda_callable__ void setDivergenceResidue (const Real &divergenceResidue)
 Sets the residue limit for the divergence criterion. More...
 
__cuda_callable__ void setMaxIterations (const Index &maxIterations)
 Sets the maximal number of iterations the solver is allowed to perform. More...
 
__cuda_callable__ void setMinIterations (const Index &minIterations)
 Sets the minimal number of iterations the solver is supposed to do. More...
 
__cuda_callable__ void setResidue (const Real &residue)
 Sets the residue reached at the current iteration. More...
 
bool setup (const Config::ParameterContainer &parameters, const String &prefix="")
 Method for setup of the iterative solver based on configuration parameters. More...
 

Static Public Member Functions

static void configSetup (Config::ConfigDescription &config, const String &prefix="")
 This method defines configuration entries for setup of the iterative solver.
 
- Static Public Member Functions inherited from TNL::Solvers::StaticIterativeSolver< Real, Index >
static void configSetup (Config::ConfigDescription &config, const String &prefix="")
 This method defines configuration entries for setup of the iterative solver. More...
 

Protected Attributes

RealType maxTau = std::numeric_limits< RealType >::max()
 
bool stopOnSteadyState = false
 
RealType stopTime
 
RealType tau = 0.0
 
bool testingMode = false
 
RealType time = 0.0
 
- Protected Attributes inherited from TNL::Solvers::StaticIterativeSolver< Real, Index >
Real convergenceResidue = 1e-6
 
Index currentIteration = 0
 
Real currentResidue = 0
 
Real divergenceResidue = std::numeric_limits< Real >::max()
 
Index maxIterations = 1000000000
 
Index minIterations = 0
 
Index refreshRate = 1
 

Detailed Description

template<typename Real = double, typename Index = int>
class TNL::Solvers::ODE::StaticExplicitSolver< Real, Index >

Base class for ODE solvers and explicit solvers od PDEs.

This is a specialization for static solvers, i.e. solvers which of scalar problem or small system of ODEs solution of which can be expressed by TNL::Containers::StaticVector. The static solvers can be created even in GPU kernels and can be combined with TNL::Algorithms::ParallelFor.

See also: TNL::Solvers::ODE::StaticEuler, TNL::Solvers::ODE::StaticMerson.

Template Parameters
Realis type of the floating-point arithmetics or static vector ( TNL::Containers::StaticVector ).
Indexis type for indexing.

Member Function Documentation

◆ checkNextIteration()

template<typename Real , typename Index >
__cuda_callable__ bool TNL::Solvers::ODE::StaticExplicitSolver< Real, Index >::checkNextIteration

Checks if the solver is allowed to do the next iteration.

Returns
true true if the solver is allowed to do the next iteration.
false if the solver is not allowed to do the next iteration. This may happen because the divergence occurred.

◆ setMaxTau()

template<typename Real , typename Index >
__cuda_callable__ void TNL::Solvers::ODE::StaticExplicitSolver< Real, Index >::setMaxTau ( const RealType maxTau)

Setter of maximal value of the time step.

If methods uses adaptive choice of the time step, this sets the upper limit.

◆ setTau()

template<typename Real , typename Index >
__cuda_callable__ void TNL::Solvers::ODE::StaticExplicitSolver< Real, Index >::setTau ( const RealType tau)

Setter of the time step used for the computation.

The time step can be changed by methods using adaptive choice of the time step.


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