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. More... | |
StepsizeControl (size_t imax, double timestepSize, double eps, double sc, sgpp::base::ScreenOutput *screen=NULL, double gamma=0.5) | |
Std-Constructer. More... | |
virtual | ~StepsizeControl () |
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... | |
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 More... | |
std::string | filename |
double | myEps |
epsilon for the step size control More... | |
double | mySC |
temp. Stepsize Control More... | |
sgpp::base::ScreenOutput * | myScreen |
Pointer to sgpp::base::ScreenOutput object. More... | |
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... | |
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 = NULL , |
||
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 friedman::eps, myEps, mySC, and sgpp::solver::SGSolver::residuum.
|
virtual |
Std-Destructor.
|
protectedpure virtual |
Implemented in sgpp::solver::VarTimestep.
Referenced by solve().
|
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(), sgpp::base::DataVector::getSize(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, mySC, and friedman::p.
Referenced by sgpp::solver::StepsizeControlEJ::~StepsizeControlEJ().
|
protectedpure virtual |
Implemented in sgpp::solver::VarTimestep, sgpp::solver::StepsizeControlBDF, and sgpp::solver::StepsizeControlMC.
Referenced by solve().
|
protectedvirtual |
References twoNorm().
Referenced by sgpp::solver::StepsizeControlMC::nextTimestep(), solve(), and sgpp::solver::StepsizeControlH::~StepsizeControlH().
|
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(), python.statsfileInfo::i, myEps, sgpp::solver::SGSolver::myEpsilon, myScreen, nextTimestep(), sgpp::solver::SGSolver::nMaxIterations, norm(), predictor(), sgpp::solver::OperationParabolicPDESolverSystem::saveAlpha(), analyse_erg::tmp, 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 |
|
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().