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

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

#include <OperationEllipticPDESolverSystemDirichlet.hpp>

Inheritance diagram for sgpp::pde::OperationEllipticPDESolverSystemDirichlet:
sgpp::pde::OperationEllipticPDESolverSystem sgpp::base::OperationMatrix sgpp::pde::PoissonEquationEllipticPDESolverSystemDirichlet

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 getSolutionBoundGrid (sgpp::base::DataVector &Solution, sgpp::base::DataVector &SolutionInner)
 Gets the solution for the complete grid. More...
 
virtual void mult (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)
 Multiplicates a vector with the matrix \( L \). More...
 
 OperationEllipticPDESolverSystemDirichlet (sgpp::base::Grid &SparseGrid, sgpp::base::DataVector &rhs)
 Constructor. More...
 
virtual ~OperationEllipticPDESolverSystemDirichlet ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::pde::OperationEllipticPDESolverSystem
size_t getNumGridPointsComplete ()
 Returns the number of grid points for the complete grid. More...
 
size_t getNumGridPointsInner ()
 Returns the number of grid points for the inner grid. More...
 
 OperationEllipticPDESolverSystem (sgpp::base::Grid &SparseGrid, sgpp::base::DataVector &rhs)
 Constructor. More...
 
virtual ~OperationEllipticPDESolverSystem ()
 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...
 

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...
 
sgpp::base::DataVectorrhs_inner
 rhs for the inner grid More...
 
- Protected Attributes inherited from sgpp::pde::OperationEllipticPDESolverSystem
sgpp::base::GridBoundGrid
 Pointer to the grid object. More...
 
size_t numGridpointsComplete
 Stores number of gridpoints, complete grid. More...
 
size_t numGridpointsInner
 Stores number of gridpoints, inner grid. More...
 
sgpp::base::DataVectorrhs
 the right hand side of the system More...
 

Detailed Description

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

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

\(L \vec{u} = rhs\)

L: space discretization (L-Operator) rhs: right hand side

This class is a specialized version of OperationEllipticPDESolverSystem which exploits Dirichlet boundary conditions. Since 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.

The inner grid is constructed during the constructor call!

Constructor & Destructor Documentation

◆ OperationEllipticPDESolverSystemDirichlet()

sgpp::pde::OperationEllipticPDESolverSystemDirichlet::OperationEllipticPDESolverSystemDirichlet ( sgpp::base::Grid SparseGrid,
sgpp::base::DataVector rhs 
)

Constructor.

Parameters
SparseGridthe grid, for which the system should be solved
rhsthe right hand side of the corresponding system

References alpha_inner, BoundaryUpdate, sgpp::pde::OperationEllipticPDESolverSystem::BoundGrid, sgpp::base::Grid::getSize(), sgpp::base::Grid::getStorage(), GridConverter, InnerGrid, sgpp::pde::OperationEllipticPDESolverSystem::numGridpointsInner, and rhs_inner.

◆ ~OperationEllipticPDESolverSystemDirichlet()

sgpp::pde::OperationEllipticPDESolverSystemDirichlet::~OperationEllipticPDESolverSystemDirichlet ( )
virtual

Destructor.

References alpha_inner, BoundaryUpdate, GridConverter, InnerGrid, and rhs_inner.

Member Function Documentation

◆ applyLOperatorComplete()

virtual void sgpp::pde::OperationEllipticPDESolverSystemDirichlet::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::PoissonEquationEllipticPDESolverSystemDirichlet.

Referenced by generateRHS().

◆ applyLOperatorInner()

virtual void sgpp::pde::OperationEllipticPDESolverSystemDirichlet::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::PoissonEquationEllipticPDESolverSystemDirichlet.

Referenced by mult().

◆ generateRHS()

◆ getGridCoefficientsForCG()

sgpp::base::DataVector * sgpp::pde::OperationEllipticPDESolverSystemDirichlet::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

References alpha_inner, sgpp::base::Grid::getSize(), InnerGrid, and sgpp::base::DataVector::setAll().

Referenced by sgpp::pde::PoissonEquationSolver::solvePDE(), and sgpp::pde::PoissonEquationSolver::storeInnerSolution().

◆ getSolutionBoundGrid()

void sgpp::pde::OperationEllipticPDESolverSystemDirichlet::getSolutionBoundGrid ( sgpp::base::DataVector Solution,
sgpp::base::DataVector SolutionInner 
)
virtual

Gets the solution for the complete grid.

Parameters
Solutionsgpp::base::DataVector that must have a dimension equal to the bound's grid dimension, the result is written to Solution
SolutionInnerSolution on the inner grid

References GridConverter, sgpp::pde::OperationEllipticPDESolverSystem::rhs, and sgpp::base::DirichletGridConverter::updateBoundaryCoefs().

Referenced by sgpp::pde::PoissonEquationSolver::solvePDE().

◆ mult()

void sgpp::pde::OperationEllipticPDESolverSystemDirichlet::mult ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)
virtual

Multiplicates a vector with the matrix \( L \).

Parameters
alphasgpp::base::DataVector that contains the ansatzfunctions' coefficients
resultsgpp::base::DataVector into which the result of the space discretization operation is stored

Implements sgpp::pde::OperationEllipticPDESolverSystem.

References applyLOperatorInner().

Member Data Documentation

◆ alpha_inner

sgpp::base::DataVector* sgpp::pde::OperationEllipticPDESolverSystemDirichlet::alpha_inner
protected

Pointer to the alphas (ansatzfunctions' coefficients; inner points only)

Referenced by getGridCoefficientsForCG(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().

◆ BoundaryUpdate

sgpp::base::DirichletUpdateVector* sgpp::pde::OperationEllipticPDESolverSystemDirichlet::BoundaryUpdate
protected

Routine to modify the boundaries/inner points of the grid.

Referenced by generateRHS(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().

◆ GridConverter

sgpp::base::DirichletGridConverter* sgpp::pde::OperationEllipticPDESolverSystemDirichlet::GridConverter
protected

Class that allows a simple conversion between a grid with and a without boundary points.

Referenced by generateRHS(), getSolutionBoundGrid(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().

◆ InnerGrid

◆ rhs_inner

sgpp::base::DataVector* sgpp::pde::OperationEllipticPDESolverSystemDirichlet::rhs_inner
protected

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