SG++-Doxygen-Documentation
sgpp::pde::OperationParabolicPDESolverSystemDirichlet Class Referenceabstract

Defines a System that is used to solve parabolic partial differential equations. More...

#include <OperationParabolicPDESolverSystemDirichlet.hpp>

Inheritance diagram for sgpp::pde::OperationParabolicPDESolverSystemDirichlet:
sgpp::solver::OperationParabolicPDESolverSystem sgpp::base::OperationMatrix sgpp::pde::HeatEquationParabolicPDESolverSystem sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP

Public Member Functions

virtual sgpp::base::DataVectorgenerateRHS ()
 generates the right hand side of the system More...
 
virtual sgpp::base::DataVectorgetGridCoefficientsForCG ()
 gets a pointer to the sparse grids coefficients used in the CG method to solve one timestep. More...
 
virtual void mult (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)
 Multiplicates a vector with the matrix. More...
 
 OperationParabolicPDESolverSystemDirichlet ()
 Constructor. More...
 
virtual ~OperationParabolicPDESolverSystemDirichlet ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::solver::OperationParabolicPDESolverSystem
void abortTimestep ()
 aborts the current timestep execution More...
 
virtual void coarsenAndRefine (bool isLastTimestep=false)=0
 
virtual void finishTimestep ()=0
 performs some action that might be needed after a timestep has be finished in the ODE Solver, e.g. More...
 
sgpp::base::GridgetGrid ()
 get the pointer to the underlying grid object More...
 
sgpp::base::DataVectorgetGridCoefficients ()
 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::GridStoragegetGridStorage ()
 
std::string getODESolver ()
 Returns the specified ODE solver for this instance. More...
 
sgpp::base::GridStoragegetOldGridStorage ()
 
sgpp::base::GridStoragegetSecondGridStorage ()
 
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 void startTimestep ()=0
 Implements some start jobs of every timestep, e.g.discounting boundaries. More...
 
virtual ~OperationParabolicPDESolverSystem ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::base::OperationMatrix
 OperationMatrix ()
 Constructor. More...
 
virtual ~OperationMatrix ()
 Destructor. More...
 

Protected Member Functions

virtual void applyLOperatorComplete (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)=0
 applies the PDE's system matrix, on complete grid - with boundaries More...
 
virtual void applyLOperatorInner (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)=0
 applies the PDE's system matrix, on inner grid only More...
 
virtual void applyMassMatrixComplete (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)=0
 applies the PDE's mass matrix, on complete grid - with boundaries More...
 
virtual void applyMassMatrixInner (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)=0
 applies the PDE's mass matrix, on inner grid only More...
 

Protected Attributes

sgpp::base::DataVectoralpha_inner
 Pointer to the alphas (ansatzfunctions' coefficients; inner points only) More...
 
sgpp::base::DirichletUpdateVectorBoundaryUpdate
 Routine to modify the boundaries/inner points of the grid. More...
 
sgpp::base::DirichletGridConverterGridConverter
 Class that allows a simple conversion between a grid with and a without boundary points. More...
 
sgpp::base::GridInnerGrid
 Pointer to the inner grid object. More...
 
- Protected Attributes inherited from sgpp::solver::OperationParabolicPDESolverSystem
sgpp::base::DataVectoralpha_complete
 Pointer to the alphas (ansatzfunctions' coefficients) More...
 
sgpp::base::DataVectoralpha_complete_old
 Pointer to the alphas from the last timestep, needed when using variable timestep sizes. More...
 
sgpp::base::DataVectoralpha_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::GridBoundGrid
 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::GridStorageoldGridStorage
 Pointer to the grid from the last iteration. More...
 
sgpp::base::DataVectorrhs
 
sgpp::base::GridStoragesecondGridStorage
 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...
 

Detailed Description

Defines a System that is used to solve parabolic partial differential equations.

So an instance of this class has to pass to any ODE Solver used in SGpp.

\(A \dot{u} = L \vec{u}\)

A: mass matrix L: space discretization (L-Operator)

This class defines an elliptic problem in every timestep which is solved using an iterative SLE solver, that solving step is integrated in the ODE Solver.

This class is a specialized version of OperationParabolicPDESolverSystem which exploit Dirichlet boundary conditions. Hence there are no degrees of freedom on on the boundaries the iterative solver (CG or BiCGSTAB) has only to take inner grid points into account.

Constructor & Destructor Documentation

◆ OperationParabolicPDESolverSystemDirichlet()

sgpp::pde::OperationParabolicPDESolverSystemDirichlet::OperationParabolicPDESolverSystemDirichlet ( )

◆ ~OperationParabolicPDESolverSystemDirichlet()

sgpp::pde::OperationParabolicPDESolverSystemDirichlet::~OperationParabolicPDESolverSystemDirichlet ( )
virtual

Destructor.

Member Function Documentation

◆ applyLOperatorComplete()

virtual void sgpp::pde::OperationParabolicPDESolverSystemDirichlet::applyLOperatorComplete ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)
protectedpure virtual

applies the PDE's system matrix, on complete grid - with boundaries

Parameters
alphathe coefficients of the sparse grid's ansatzfunctions
resultreference to the sgpp::base::DataVector into which the result is written

Implemented in sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP.

Referenced by generateRHS().

◆ applyLOperatorInner()

virtual void sgpp::pde::OperationParabolicPDESolverSystemDirichlet::applyLOperatorInner ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)
protectedpure virtual

applies the PDE's system matrix, on inner grid only

Parameters
alphathe coefficients of the sparse grid's ansatzfunctions
resultreference to the sgpp::base::DataVector into which the result is written

Implemented in sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP.

Referenced by mult().

◆ applyMassMatrixComplete()

virtual void sgpp::pde::OperationParabolicPDESolverSystemDirichlet::applyMassMatrixComplete ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)
protectedpure virtual

applies the PDE's mass matrix, on complete grid - with boundaries

Parameters
alphathe coefficients of the sparse grid's ansatzfunctions
resultreference to the sgpp::base::DataVector into which the result is written

Implemented in sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP.

Referenced by generateRHS().

◆ applyMassMatrixInner()

virtual void sgpp::pde::OperationParabolicPDESolverSystemDirichlet::applyMassMatrixInner ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)
protectedpure virtual

applies the PDE's mass matrix, on inner grid only

Parameters
alphathe coefficients of the sparse grid's ansatzfunctions
resultreference to the sgpp::base::DataVector into which the result is written

Implemented in sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP.

Referenced by mult().

◆ generateRHS()

◆ getGridCoefficientsForCG()

sgpp::base::DataVector * sgpp::pde::OperationParabolicPDESolverSystemDirichlet::getGridCoefficientsForCG ( )
virtual

gets a pointer to the sparse grids coefficients used in the CG method to solve one timestep.

This is useful because (direchlet) boundaries can be skipped when solving the system.

Returns
alpha vector for CG method

Implements sgpp::solver::OperationParabolicPDESolverSystem.

References sgpp::solver::OperationParabolicPDESolverSystem::alpha_complete, alpha_inner, sgpp::base::DirichletGridConverter::calcInnerCoefs(), and GridConverter.

Referenced by sgpp::pde::HeatEquationSolver::storeInnerSolution().

◆ mult()

Member Data Documentation

◆ alpha_inner

◆ BoundaryUpdate

◆ GridConverter

◆ InnerGrid


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