SG++-Doxygen-Documentation
|
Defines a System that is used to solve elliptic partial differential equations. More...
#include <OperationEllipticPDESolverSystemDirichlet.hpp>
Public Member Functions | |
virtual sgpp::base::DataVector * | generateRHS () |
generates the right hand side of the system More... | |
virtual sgpp::base::DataVector * | getGridCoefficientsForCG () |
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::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... | |
sgpp::base::DataVector * | rhs_inner |
rhs for the inner grid More... | |
Protected Attributes inherited from sgpp::pde::OperationEllipticPDESolverSystem | |
sgpp::base::Grid * | BoundGrid |
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::DataVector * | rhs |
the right hand side of the system More... | |
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!
sgpp::pde::OperationEllipticPDESolverSystemDirichlet::OperationEllipticPDESolverSystemDirichlet | ( | sgpp::base::Grid & | SparseGrid, |
sgpp::base::DataVector & | rhs | ||
) |
Constructor.
SparseGrid | the grid, for which the system should be solved |
rhs | the 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.
|
virtual |
Destructor.
References alpha_inner, BoundaryUpdate, GridConverter, InnerGrid, and rhs_inner.
|
protectedpure virtual |
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 |
Implemented in sgpp::pde::PoissonEquationEllipticPDESolverSystemDirichlet.
Referenced by generateRHS().
|
protectedpure virtual |
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 |
Implemented in sgpp::pde::PoissonEquationEllipticPDESolverSystemDirichlet.
Referenced by mult().
|
virtual |
generates the right hand side of the system
Implements sgpp::pde::OperationEllipticPDESolverSystem.
References applyLOperatorComplete(), BoundaryUpdate, sgpp::base::DirichletGridConverter::calcInnerCoefs(), GridConverter, InnerGrid, sgpp::base::DataVector::mult(), sgpp::pde::OperationEllipticPDESolverSystem::rhs, rhs_inner, and sgpp::base::DirichletUpdateVector::setInnerPointsToZero().
Referenced by sgpp::pde::PoissonEquationSolver::solvePDE(), sgpp::pde::PoissonEquationSolver::storeInnerRHS(), and sgpp::pde::PoissonEquationSolver::storeInnerSolution().
|
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.
References alpha_inner, sgpp::base::Grid::getSize(), InnerGrid, and sgpp::base::DataVector::setAll().
Referenced by sgpp::pde::PoissonEquationSolver::solvePDE(), and sgpp::pde::PoissonEquationSolver::storeInnerSolution().
|
virtual |
Gets the solution for the complete grid.
Solution | sgpp::base::DataVector that must have a dimension equal to the bound's grid dimension, the result is written to Solution |
SolutionInner | Solution on the inner grid |
References GridConverter, sgpp::pde::OperationEllipticPDESolverSystem::rhs, and sgpp::base::DirichletGridConverter::updateBoundaryCoefs().
Referenced by sgpp::pde::PoissonEquationSolver::solvePDE().
|
virtual |
Multiplicates a vector with the matrix \( L \).
alpha | sgpp::base::DataVector that contains the ansatzfunctions' coefficients |
result | sgpp::base::DataVector into which the result of the space discretization operation is stored |
Implements sgpp::pde::OperationEllipticPDESolverSystem.
References applyLOperatorInner().
|
protected |
Pointer to the alphas (ansatzfunctions' coefficients; inner points only)
Referenced by getGridCoefficientsForCG(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().
|
protected |
Routine to modify the boundaries/inner points of the grid.
Referenced by generateRHS(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().
|
protected |
Class that allows a simple conversion between a grid with and a without boundary points.
Referenced by generateRHS(), getSolutionBoundGrid(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().
|
protected |
Pointer to the inner grid object.
Referenced by generateRHS(), getGridCoefficientsForCG(), OperationEllipticPDESolverSystemDirichlet(), sgpp::pde::PoissonEquationEllipticPDESolverSystemDirichlet::PoissonEquationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().
|
protected |
rhs for the inner grid
Referenced by generateRHS(), OperationEllipticPDESolverSystemDirichlet(), and ~OperationEllipticPDESolverSystemDirichlet().