SG++-Doxygen-Documentation
|
This class implements the ParabolicPDESolverSystem for the Heat Equation. More...
#include <HeatEquationParabolicPDESolverSystemParallelOMP.hpp>
Public Member Functions | |
virtual void | coarsenAndRefine (bool isLastTimestep=false) |
virtual void | finishTimestep () |
performs some action that might be needed after a timestep has be finished in the ODE Solver, e.g. More... | |
virtual sgpp::base::DataVector * | generateRHS () |
generates the right hand side of the system More... | |
HeatEquationParabolicPDESolverSystemParallelOMP (sgpp::base::Grid &SparseGrid, sgpp::base::DataVector &alpha, double a, double TimestepSize, std::string OperationMode="ExEul") | |
Std-Constructor. More... | |
virtual void | mult (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result) |
Multiplicates a vector with the matrix. More... | |
virtual void | startTimestep () |
Implements some start jobs of every timestep, e.g.discounting boundaries. More... | |
virtual | ~HeatEquationParabolicPDESolverSystemParallelOMP () |
Std-Destructor. More... | |
Public Member Functions inherited from sgpp::pde::OperationParabolicPDESolverSystemDirichlet | |
virtual sgpp::base::DataVector * | getGridCoefficientsForCG () |
gets a pointer to the sparse grids coefficients used in the CG method to solve one timestep. More... | |
OperationParabolicPDESolverSystemDirichlet () | |
Constructor. More... | |
virtual | ~OperationParabolicPDESolverSystemDirichlet () |
Destructor. More... | |
Public Member Functions inherited from sgpp::solver::OperationParabolicPDESolverSystem | |
void | abortTimestep () |
aborts the current timestep execution More... | |
sgpp::base::Grid * | getGrid () |
get the pointer to the underlying grid object More... | |
sgpp::base::DataVector * | getGridCoefficients () |
gets a pointer to the sparse grids coefficients with evtl. More... | |
void | getGridCoefficientsForSC (sgpp::base::DataVector &Values) |
stores the values of the (dehierarchized) grid in the sgpp::base::DataVector Values used by time step size control methods More... | |
sgpp::base::GridStorage * | getGridStorage () |
std::string | getODESolver () |
Returns the specified ODE solver for this instance. More... | |
sgpp::base::GridStorage * | getOldGridStorage () |
sgpp::base::GridStorage * | getSecondGridStorage () |
size_t | getSumGridPointsComplete () |
Returns the number of average grid points for the complete grid. More... | |
size_t | getSumGridPointsInner () |
Returns the number of average grid points for the inner grid. More... | |
OperationParabolicPDESolverSystem () | |
Constructor. More... | |
void | saveAlpha () |
stores the current alpha_complete into alpha_complete_old to be available in the next timestep More... | |
void | setODESolver (std::string ode) |
defines the used ODE Solver for this instance, this is important because the implementation of mult and generateRHS depends on the used ODE solver More... | |
void | setTimestepSize (double newTimestepSize) |
set the size of the new timestep More... | |
virtual | ~OperationParabolicPDESolverSystem () |
Destructor. More... | |
Public Member Functions inherited from sgpp::base::OperationMatrix | |
OperationMatrix () | |
Constructor. More... | |
virtual | ~OperationMatrix () |
Destructor. More... | |
Protected Member Functions | |
void | applyLOperatorComplete (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result) |
applies the PDE's system matrix, on complete grid - with boundaries More... | |
void | applyLOperatorInner (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result) |
applies the PDE's system matrix, on inner grid only More... | |
void | applyMassMatrixComplete (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result) |
applies the PDE's mass matrix, on complete grid - with boundaries More... | |
void | applyMassMatrixInner (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result) |
applies the PDE's mass matrix, on inner grid only More... | |
Protected Attributes | |
double | a |
the heat coefficient More... | |
sgpp::base::OperationMatrix * | OpLaplaceBound |
the Laplace Operation (Stiffness Matrix), on boundary grid More... | |
sgpp::base::OperationMatrix * | OpLaplaceInner |
the Laplace Operation (Stiffness Matrix), on inner grid More... | |
sgpp::base::OperationMatrix * | OpMassBound |
the LTwoDotProduct Operation (Mass Matrix), on boundary grid More... | |
sgpp::base::OperationMatrix * | OpMassInner |
the LTwoDotProduct Operation (Mass Matrix), on inner grid More... | |
Protected Attributes inherited from sgpp::pde::OperationParabolicPDESolverSystemDirichlet | |
sgpp::base::DataVector * | alpha_inner |
Pointer to the alphas (ansatzfunctions' coefficients; inner points only) More... | |
sgpp::base::DirichletUpdateVector * | BoundaryUpdate |
Routine to modify the boundaries/inner points of the grid. More... | |
sgpp::base::DirichletGridConverter * | GridConverter |
Class that allows a simple conversion between a grid with and a without boundary points. More... | |
sgpp::base::Grid * | InnerGrid |
Pointer to the inner grid object. More... | |
Protected Attributes inherited from sgpp::solver::OperationParabolicPDESolverSystem | |
sgpp::base::DataVector * | alpha_complete |
Pointer to the alphas (ansatzfunctions' coefficients) More... | |
sgpp::base::DataVector * | alpha_complete_old |
Pointer to the alphas from the last timestep, needed when using variable timestep sizes. More... | |
sgpp::base::DataVector * | alpha_complete_tmp |
Pointer to temporary alphas, needed when using variable timestep sizes. More... | |
bool | bnewODESolver |
checks whether a new ODE solver has been selected after creation More... | |
sgpp::base::Grid * | BoundGrid |
Pointer to the grid object. More... | |
size_t | numSumGridpointsComplete |
Stores number of average gridpoints, complete grid. More... | |
size_t | numSumGridpointsInner |
Stores number of average gridpoints, inner grid. More... | |
sgpp::base::GridStorage * | oldGridStorage |
Pointer to the grid from the last iteration. More... | |
sgpp::base::DataVector * | rhs |
sgpp::base::GridStorage * | secondGridStorage |
Pointer to the grid from the last aborted iteration. More... | |
double | TimestepSize |
the size of one timestep used in the ODE Solver More... | |
double | TimestepSize_old |
the size of the last timestep More... | |
std::string | tOperationMode |
specifies in which solver this matrix is used, valid values are: ExEul for explicit Euler ImEul for implicit Euler CrNic for Crank Nicolson solver More... | |
This class implements the ParabolicPDESolverSystem for the Heat Equation.
sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP::HeatEquationParabolicPDESolverSystemParallelOMP | ( | sgpp::base::Grid & | SparseGrid, |
sgpp::base::DataVector & | alpha, | ||
double | a, | ||
double | TimestepSize, | ||
std::string | OperationMode = "ExEul" |
||
) |
Std-Constructor.
SparseGrid | reference to the sparse grid |
alpha | the sparse grid's coefficients |
a | the heat coefficient |
TimestepSize | the size of one timestep used in the ODE Solver |
OperationMode | specifies in which solver this matrix is used, valid values are: ExEul for explicit Euler, ImEul for implicit Euler, CrNic for Crank Nicolson solver |
References a, alpha, sgpp::solver::OperationParabolicPDESolverSystem::alpha_complete, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::alpha_inner, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::BoundaryUpdate, sgpp::solver::OperationParabolicPDESolverSystem::BoundGrid, sgpp::op_factory::createOperationLaplace(), sgpp::op_factory::createOperationLTwoDotProduct(), sgpp::base::Grid::getStorage(), sgpp::pde::OperationParabolicPDESolverSystemDirichlet::GridConverter, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::InnerGrid, OpLaplaceBound, OpLaplaceInner, OpMassBound, OpMassInner, sgpp::solver::OperationParabolicPDESolverSystem::rhs, sgpp::solver::OperationParabolicPDESolverSystem::TimestepSize, sgpp::solver::OperationParabolicPDESolverSystem::tOperationMode, and ~HeatEquationParabolicPDESolverSystemParallelOMP().
|
virtual |
Std-Destructor.
References sgpp::pde::OperationParabolicPDESolverSystemDirichlet::alpha_inner, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::BoundaryUpdate, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::GridConverter, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::InnerGrid, OpLaplaceBound, OpLaplaceInner, OpMassBound, OpMassInner, and sgpp::solver::OperationParabolicPDESolverSystem::rhs.
Referenced by HeatEquationParabolicPDESolverSystemParallelOMP().
|
protectedvirtual |
applies the PDE's system matrix, on complete grid - with boundaries
alpha | the coefficients of the sparse grid's ansatzfunctions |
result | reference to the sgpp::base::DataVector into which the result is written |
discuss methods in order to avoid this cast
Implements sgpp::pde::OperationParabolicPDESolverSystemDirichlet.
References a, sgpp::base::DataVector::axpy(), sgpp::base::HashGridStorage::getAlgorithmicDimensions(), sgpp::base::DataVector::getSize(), sgpp::base::Grid::getStorage(), python.statsfileInfo::i, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::InnerGrid, OpLaplaceBound, and sgpp::base::DataVector::setAll().
Referenced by generateRHS().
|
protectedvirtual |
applies the PDE's system matrix, on inner grid only
alpha | the coefficients of the sparse grid's ansatzfunctions |
result | reference to the sgpp::base::DataVector into which the result is written |
discuss methods in order to avoid this cast
Implements sgpp::pde::OperationParabolicPDESolverSystemDirichlet.
References a, sgpp::base::DataVector::axpy(), sgpp::base::HashGridStorage::getAlgorithmicDimensions(), sgpp::base::DataVector::getSize(), sgpp::base::Grid::getStorage(), python.statsfileInfo::i, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::InnerGrid, OpLaplaceInner, and sgpp::base::DataVector::setAll().
Referenced by mult().
|
protectedvirtual |
applies the PDE's mass matrix, on complete grid - with boundaries
alpha | the coefficients of the sparse grid's ansatzfunctions |
result | reference to the sgpp::base::DataVector into which the result is written |
Implements sgpp::pde::OperationParabolicPDESolverSystemDirichlet.
References sgpp::base::DataVector::add(), sgpp::base::DataVector::getSize(), OpMassBound, and sgpp::base::DataVector::setAll().
Referenced by generateRHS().
|
protectedvirtual |
applies the PDE's mass matrix, on inner grid only
alpha | the coefficients of the sparse grid's ansatzfunctions |
result | reference to the sgpp::base::DataVector into which the result is written |
Implements sgpp::pde::OperationParabolicPDESolverSystemDirichlet.
References sgpp::base::DataVector::add(), sgpp::base::DataVector::getSize(), OpMassInner, and sgpp::base::DataVector::setAll().
Referenced by mult().
|
virtual |
Implements sgpp::solver::OperationParabolicPDESolverSystem.
|
virtual |
performs some action that might be needed after a timestep has be finished in the ODE Solver, e.g.
some boundary adjustments.
Implements sgpp::solver::OperationParabolicPDESolverSystem.
References sgpp::solver::OperationParabolicPDESolverSystem::alpha_complete, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::alpha_inner, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::GridConverter, and sgpp::base::DirichletGridConverter::updateBoundaryCoefs().
|
virtual |
generates the right hand side of the system
Reimplemented from sgpp::pde::OperationParabolicPDESolverSystemDirichlet.
References sgpp::solver::OperationParabolicPDESolverSystem::alpha_complete, sgpp::pde::OperationParabolicPDESolverSystemDirichlet::alpha_inner, applyLOperatorComplete(), applyMassMatrixComplete(), sgpp::pde::OperationParabolicPDESolverSystemDirichlet::BoundaryUpdate, sgpp::base::DirichletGridConverter::calcInnerCoefs(), sgpp::base::DataVector::getSize(), sgpp::pde::OperationParabolicPDESolverSystemDirichlet::GridConverter, sgpp::solver::OperationParabolicPDESolverSystem::rhs, sgpp::base::DataVector::setAll(), sgpp::base::DirichletUpdateVector::setInnerPointsToZero(), startTimestep(), sgpp::solver::OperationParabolicPDESolverSystem::TimestepSize, and sgpp::solver::OperationParabolicPDESolverSystem::tOperationMode.
|
virtual |
Multiplicates a vector with the matrix.
alpha | sgpp::base::DataVector that contains the ansatzfunctions' coefficients |
result | sgpp::base::DataVector into which the result of the space discretization operation is stored |
Reimplemented from sgpp::pde::OperationParabolicPDESolverSystemDirichlet.
References sgpp::base::DataVector::add(), applyLOperatorInner(), applyMassMatrixInner(), sgpp::base::DataVector::axpy(), sgpp::base::DataVector::getSize(), sgpp::base::DataVector::setAll(), sgpp::solver::OperationParabolicPDESolverSystem::TimestepSize, and sgpp::solver::OperationParabolicPDESolverSystem::tOperationMode.
|
virtual |
Implements some start jobs of every timestep, e.g.discounting boundaries.
Implements sgpp::solver::OperationParabolicPDESolverSystem.
Referenced by generateRHS().
|
protected |
the heat coefficient
Referenced by applyLOperatorComplete(), applyLOperatorInner(), and HeatEquationParabolicPDESolverSystemParallelOMP().
|
protected |
the Laplace Operation (Stiffness Matrix), on boundary grid
Referenced by applyLOperatorComplete(), HeatEquationParabolicPDESolverSystemParallelOMP(), and ~HeatEquationParabolicPDESolverSystemParallelOMP().
|
protected |
the Laplace Operation (Stiffness Matrix), on inner grid
Referenced by applyLOperatorInner(), HeatEquationParabolicPDESolverSystemParallelOMP(), and ~HeatEquationParabolicPDESolverSystemParallelOMP().
|
protected |
the LTwoDotProduct Operation (Mass Matrix), on boundary grid
Referenced by applyMassMatrixComplete(), HeatEquationParabolicPDESolverSystemParallelOMP(), and ~HeatEquationParabolicPDESolverSystemParallelOMP().
|
protected |
the LTwoDotProduct Operation (Mass Matrix), on inner grid
Referenced by applyMassMatrixInner(), HeatEquationParabolicPDESolverSystemParallelOMP(), and ~HeatEquationParabolicPDESolverSystemParallelOMP().