![]() |
SG++-Doxygen-Documentation
|
This class implements a step size control using Adams-Bashforth and Crank-Nicolson for solving ordinary partial equations. More...
#include <StepsizeControl.hpp>
Public Member Functions | |
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. | |
StepsizeControl (size_t imax, double timestepSize, double eps, double sc, sgpp::base::ScreenOutput *screen=nullptr, double gamma=0.5) | |
Std-Constructer. | |
virtual | ~StepsizeControl () |
Std-Destructor. | |
![]() | |
ODESolver (size_t imax, double timestepSize) | |
Std-Constructor. | |
virtual | ~ODESolver () |
Std-Destructor. | |
![]() | |
double | getEpsilon () |
gets the the epsilon, that is used in the SGSolver | |
size_t | getNumberIterations () |
function that returns the number of needed solve steps | |
double | getResiduum () |
function the returns the residuum (current or final), error of the solver | |
void | setEpsilon (double eps) |
resets the epsilon, that is used in the SGSolver | |
void | setMaxIterations (size_t nIterations) |
resets the number of maximum iterations | |
SGSolver (size_t nMaximumIterations, double epsilon) | |
Std-Constructor. | |
virtual | ~SGSolver () |
Std-Destructor. | |
Protected Member Functions | |
virtual void | corrector (SLESolver &LinearSystemSolver, sgpp::solver::OperationParabolicPDESolverSystem &System, double tmp_timestepsize, sgpp::base::DataVector &dv, sgpp::base::DataVector *rhs)=0 |
double | maxNorm (sgpp::solver::OperationParabolicPDESolverSystem &System, sgpp::base::DataVector &dv1, sgpp::base::DataVector &dv2) |
virtual double | nextTimestep (double tmp_timestepsize, double tmp_timestepsize_old, double norm, double epsilon)=0 |
virtual double | norm (sgpp::solver::OperationParabolicPDESolverSystem &System, sgpp::base::DataVector &dv1, sgpp::base::DataVector &dv2) |
virtual void | predictor (SLESolver &LinearSystemSolver, sgpp::solver::OperationParabolicPDESolverSystem &System, double tmp_timestepsize, sgpp::base::DataVector &dv, sgpp::base::DataVector &corr, sgpp::base::DataVector *rhs)=0 |
double | twoNorm (sgpp::solver::OperationParabolicPDESolverSystem &System, sgpp::base::DataVector &dv1, sgpp::base::DataVector &dv2) |
Protected Attributes | |
double | _gamma |
damping factor | |
std::string | filename |
double | myEps |
epsilon for the step size control | |
double | mySC |
temp. Stepsize Control | |
sgpp::base::ScreenOutput * | myScreen |
Pointer to sgpp::base::ScreenOutput object. | |
![]() | |
double | myEpsilon |
epsilon needed in the, e.g. final error in the iterative solver, or a timestep | |
size_t | nIterations |
Number of Iterations needed for the solve. | |
size_t | nMaxIterations |
Number of maximum iterations for cg. | |
double | residuum |
residuum | |
This class implements a step size control using Adams-Bashforth and Crank-Nicolson for solving ordinary partial equations.
sgpp::solver::StepsizeControl::StepsizeControl | ( | size_t | imax, |
double | timestepSize, | ||
double | eps, | ||
double | sc, | ||
sgpp::base::ScreenOutput * | screen = nullptr , |
||
double | gamma = 0.5 |
||
) |
Std-Constructer.
sc | step size |
imax | number of maximum executed iterations |
timestepSize | the size of one timestep |
eps | the epsilon for the step size control |
screen | possible pointer to a sgpp::base::ScreenOutput object |
gamma | damping factor |
References myEps, mySC, and sgpp::solver::SGSolver::residuum.
|
virtual |
Std-Destructor.
|
protectedpure virtual |
|
protected |
References sgpp::base::HashGridStorage::begin(), sgpp::base::HashGridStorage::end(), sgpp::base::HashGridStorage::find(), sgpp::solver::OperationParabolicPDESolverSystem::getGridCoefficientsForCG(), sgpp::solver::OperationParabolicPDESolverSystem::getGridStorage(), sgpp::solver::OperationParabolicPDESolverSystem::getOldGridStorage(), sgpp::base::DataVector::getPointer(), and mySC.
|
protectedpure virtual |
Implemented in sgpp::solver::StepsizeControlBDF, sgpp::solver::StepsizeControlMC, and sgpp::solver::VarTimestep.
Referenced by solve().
|
protectedvirtual |
References twoNorm().
Referenced by corrector(), python.uq.dists.MultivariateNormal.MultivariateNormal::pdf(), and solve().
|
protectedpure virtual |
Implemented in sgpp::solver::VarTimestep.
Referenced by solve().
|
virtual |
Pure virtual Function that defines a solve method for an ODE solver.
LinearSystemSolver | reference to an instance of a linear system solver that is used by this ODE solver |
System | reference to an sgpp::base::OperationMatrix Object that implements the matrix vector multiplication |
bIdentifyLastStep | set this to true to tell System the last step |
verbose | prints information during execution of the solver |
Implements sgpp::solver::ODESolver.
References _gamma, sgpp::solver::OperationParabolicPDESolverSystem::abortTimestep(), sgpp::solver::OperationParabolicPDESolverSystem::coarsenAndRefine(), corrector(), filename, sgpp::solver::OperationParabolicPDESolverSystem::getGridCoefficients(), sgpp::solver::OperationParabolicPDESolverSystem::getGridCoefficientsForSC(), sgpp::solver::SGSolver::getNumberIterations(), sgpp::solver::SGSolver::getResiduum(), sgpp::base::DataVector::getSize(), myEps, sgpp::solver::SGSolver::myEpsilon, myScreen, nextTimestep(), sgpp::solver::SGSolver::nMaxIterations, norm(), predictor(), sgpp::solver::OperationParabolicPDESolverSystem::saveAlpha(), sgpp::base::ScreenOutput::update(), and sgpp::base::ScreenOutput::writeEmptyLines().
|
protected |
References sgpp::base::DataVector::dotProduct(), and sgpp::base::DataVector::sub().
Referenced by norm().
|
protected |
damping factor
Referenced by solve().
|
protected |
Referenced by python.data.DataSpecification.DataSpecification::__init__(), python.controller.InfoToFile.InfoToFile::__init__(), python.data.ARFFAdapter.ARFFAdapter::__init__(), python.data.CSVAdapter.CSVAdapter::__init__(), python.data.DataSpecification.DataSpecification::getFilename(), python.controller.InfoToFile.InfoToFile::handleLearningEvent(), python.controller.InfoToFile.InfoToFile::handleSolvingEvent(), python.data.ARFFAdapter.ARFFAdapter::loadData(), python.data.CSVAdapter.CSVAdapter::loadData(), python.data.ARFFAdapter.ARFFAdapter::loadSpecification(), python.data.CSVAdapter.CSVAdapter::loadSpecification(), python.data.ARFFAdapter.ARFFAdapter::save(), python.data.CSVAdapter.CSVAdapter::save(), python.data.DataSpecification.DataSpecification::setFilename(), solve(), sgpp::solver::StepsizeControlBDF::StepsizeControlBDF(), sgpp::solver::StepsizeControlEJ::StepsizeControlEJ(), sgpp::solver::StepsizeControlH::StepsizeControlH(), sgpp::solver::StepsizeControlMC::StepsizeControlMC(), python.controller.InfoToFile.InfoToFile::toString(), and sgpp::solver::VarTimestep::VarTimestep().
|
protected |
epsilon for the step size control
Referenced by solve(), StepsizeControl(), sgpp::solver::StepsizeControlBDF::StepsizeControlBDF(), sgpp::solver::StepsizeControlEJ::StepsizeControlEJ(), and sgpp::solver::StepsizeControlH::StepsizeControlH().
|
protected |
temp. Stepsize Control
Referenced by maxNorm(), StepsizeControl(), and sgpp::solver::StepsizeControlEJ::StepsizeControlEJ().
|
protected |
Pointer to sgpp::base::ScreenOutput object.
Referenced by solve().