|LaplaceDG2DP1 (Mesh &ms, Vect< real_t > &f, Vect< real_t > &Dbc, Vect< real_t > &Nbc, Vect< real_t > &u)|
|Constructor with mesh and vector data. More...|
|void||set (real_t sigma, real_t eps)|
|Set parameters for the DG method. More...|
|void||set (const LocalMatrix< real_t, 2, 2 > &K)|
|Set diffusivity matrix. More...|
|Build global matrix and right-hand side. More...|
|void||Smooth (Vect< real_t > &u)|
|Perform post calculations. More...|
|Build and solve the linear system of equations using an iterative method. More...|
|Set matrix graph. |
To build and solve the linear system for the Poisson problem using the DG P1 2-D triangle element.
This class build the linear system of equations for a standard elliptic equation using the Discontinuous Galerkin P1 finite element method.
Constructor & Destructor Documentation
|Vect< real_t > &||f,|
|Vect< real_t > &||Dbc,|
|Vect< real_t > &||Nbc,|
|Vect< real_t > &||u|
Constructor with mesh and vector data.
[in] ms Mesh instance [in] f Vector containing the right-hand side of the elliptic equation at triangle vertices [in] Dbc Vector containing prescribed values of the solution (Dirichlet boundary condition) at nodes having a positive code [in] Nbc Vector containing prescribed values of the flux (Neumann boundary condition) at each side having a positive code [in] u Vector where the solution is stored once the linear system is solved
Member Function Documentation
Set parameters for the DG method.
[in] sigma Penalty parameters to enforce continuity at nodes (Must be positive) [Default:
[in] eps Epsilon value of the DG method to choose among the values:
- 0 Incomplete Interior Penalty Galerkin method (IIPG)
- -1 Symmetric Interior Penalty Galerkin method (SIPG)
- 1 Non symmetric interior penalty Galerkin method (NIPG)
sigma>100which leads to a symmetric positive definite matrix [Default:
Set diffusivity matrix.
This function provides the diffusivity matrix as instance of class LocalMatrix. The default diffusivity matrix is the identity matrix
[in] K Diffusivity matrix
Build global matrix and right-hand side.
The problem matrix and right-hand side are the ones used in the constructor. They are updated in this member function.
Perform post calculations.
This function gives an averaged solution given at mesh nodes (triangle vertices) by a standard L2-projection method.
[in] u Solution at nodes
Build and solve the linear system of equations using an iterative method.
The matrix is preconditioned by the diagonal ILU method. The linear system is solved either by the Conjugate Gradient method if the matrix is symmetric positive definite (
eps=-1) or the GMRES method if not. The solution is stored in the vector
u given in the constructor.
- Number of performed iterations. Note that the maximal number is 1000 and the tolerance is 1.e-8