SG++-Doxygen-Documentation
sgpp::solver::CrankNicolson Class Reference

This class implements the Crank-Nicolson method for solving ordinary partial equations. More...

#include <CrankNicolson.hpp>

Inheritance diagram for sgpp::solver::CrankNicolson:
sgpp::solver::ODESolver sgpp::solver::SGSolver

Public Member Functions

 CrankNicolson (size_t nTimesteps, double timestepSize, sgpp::base::ScreenOutput *screen=NULL)
 Std-Constructer. More...
 
virtual void solve (SLESolver &LinearSystemSolver, sgpp::solver::OperationParabolicPDESolverSystem &System, bool bIdentifyLastStep=false, bool verbose=false)
 Pure virtual Function that defines a solve method for an ODE solver. More...
 
virtual ~CrankNicolson ()
 Std-Destructor. More...
 
- Public Member Functions inherited from sgpp::solver::ODESolver
 ODESolver (size_t imax, double timestepSize)
 Std-Constructor. More...
 
virtual ~ODESolver ()
 Std-Destructor. More...
 
- Public Member Functions inherited from sgpp::solver::SGSolver
double getEpsilon ()
 gets the the epsilon, that is used in the SGSolver More...
 
size_t getNumberIterations ()
 function that returns the number of needed solve steps More...
 
double getResiduum ()
 function the returns the residuum (current or final), error of the solver More...
 
void setEpsilon (double eps)
 resets the epsilon, that is used in the SGSolver More...
 
void setMaxIterations (size_t nIterations)
 resets the number of maximum iterations More...
 
 SGSolver (size_t nMaximumIterations, double epsilon)
 Std-Constructor. More...
 
virtual ~SGSolver ()
 Std-Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::solver::SGSolver
double myEpsilon
 epsilon needed in the, e.g. final error in the iterative solver, or a timestep More...
 
size_t nIterations
 Number of Iterations needed for the solve. More...
 
size_t nMaxIterations
 Number of maximum iterations for cg. More...
 
double residuum
 residuum More...
 

Detailed Description

This class implements the Crank-Nicolson method for solving ordinary partial equations.

For solving the system of linear equations the already implemented CG-method is used

Constructor & Destructor Documentation

◆ CrankNicolson()

sgpp::solver::CrankNicolson::CrankNicolson ( size_t  nTimesteps,
double  timestepSize,
sgpp::base::ScreenOutput screen = NULL 
)

Std-Constructer.

Parameters
nTimestepsnumber of maximum executed iterations
timestepSizethe size of one timestep
screenpossible pointer to a sgpp::base::ScreenOutput object

References sgpp::solver::SGSolver::residuum.

◆ ~CrankNicolson()

sgpp::solver::CrankNicolson::~CrankNicolson ( )
virtual

Std-Destructor.

Member Function Documentation

◆ solve()

void sgpp::solver::CrankNicolson::solve ( SLESolver LinearSystemSolver,
sgpp::solver::OperationParabolicPDESolverSystem System,
bool  bIdentifyLastStep = false,
bool  verbose = false 
)
virtual

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