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

This class implements the explicit and implicit Euler method for solving ordinary partial equations. More...

#include <Euler.hpp>

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

Public Member Functions

 Euler (std::string Mode, size_t imax, double timestepSize, bool generateAnimation=false, 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 ~Euler ()
 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 explicit and implicit Euler method for solving ordinary partial equations.

Constructor & Destructor Documentation

◆ Euler()

sgpp::solver::Euler::Euler ( std::string  Mode,
size_t  imax,
double  timestepSize,
bool  generateAnimation = false,
sgpp::base::ScreenOutput screen = NULL 
)

Std-Constructer.

Parameters
Modethe mode of the euler that should be executed, must be ExEul or ImEul
imaxnumber of maximum executed iterations
timestepSizethe size of one timestep
generateAnimationset this, if you want to create a grid evaluation in every time step, in order to create an animation
screenpossible pointer to a sgpp::base::ScreenOutput object

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

◆ ~Euler()

sgpp::solver::Euler::~Euler ( )
virtual

Std-Destructor.

Member Function Documentation

◆ solve()

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

Pure virtual Function that defines a solve method for an ODE solver.

Parameters
LinearSystemSolverreference to an instance of a linear system solver that is used by this ODE solver
Systemreference to an sgpp::base::OperationMatrix Object that implements the matrix vector multiplication
bIdentifyLastStepset this to true to tell System the last step
verboseprints information during execution of the solver

Implements sgpp::solver::ODESolver.

References sgpp::solver::OperationParabolicPDESolverSystem::coarsenAndRefine(), sgpp::solver::OperationParabolicPDESolverSystem::finishTimestep(), sgpp::solver::OperationParabolicPDESolverSystem::generateRHS(), sgpp::solver::OperationParabolicPDESolverSystem::getGrid(), sgpp::solver::OperationParabolicPDESolverSystem::getGridCoefficients(), sgpp::solver::OperationParabolicPDESolverSystem::getGridCoefficientsForCG(), sgpp::solver::SGSolver::getNumberIterations(), sgpp::solver::SGSolver::getResiduum(), python.statsfileInfo::i, sgpp::solver::SGSolver::nIterations, sgpp::solver::SGSolver::nMaxIterations, sgpp::base::GridPrinter::printSparseGrid(), sgpp::solver::SLESolver::solve(), sgpp::base::ScreenOutput::update(), and sgpp::base::ScreenOutput::writeEmptyLines().

Referenced by sgpp::pde::HeatEquationSolver::solveCrankNicolson(), sgpp::pde::HeatEquationSolverWithStretching::solveCrankNicolson(), sgpp::pde::HeatEquationSolver::solveExplicitEuler(), sgpp::pde::HeatEquationSolverWithStretching::solveExplicitEuler(), sgpp::pde::HeatEquationSolver::solveImplicitEuler(), sgpp::pde::HeatEquationSolverWithStretching::solveImplicitEuler(), and sgpp::pde::HeatEquationSolver::storeInnerSolution().


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