What's new?

Prerequisites

1 Problem statement

Within this exercise, we are going to investigate the discretization of a Poisson equation as a system. Obviously, it is possible to discretize the Poisson equation as a system of first-order-PDE's, introducing a vector field $\vec{\sigma}$: $$ \begin{align} \vec{\sigma} + \nabla u & = 0, & & \text{ in } \Omega \ \operatorname{div}(\vec{\sigma}) & = g_{\Omega}, & & \text{ in } \Omega \ u & = g_D, & & \text{ on } \Gamma_D \

2 Solution within the BoSSS framework

2.1 Tests on the divergence

Common base-class for $\text{div}$-implementations

We are going to implement two different formulations of the divergence-operator for which going to show equivalence. We implement a common base-class for both formulations:

Formulation (i): Central-difference-form of $\text{div}$

The implementation of the central-difference form is as follows:

Formulation (ii): 'Strong' form of $\text{div}$:

Here, we use the form $$ b(\vec{\sigma},v) = \oint_{\Gamma \backslash \GammaD} M(v) J(\vec{\sigma}) \cdot \vec{n}\Gamma

dA

\int_{\Omega} \text{div}(\vec{\sigma}) \cdot v dV $$ where M,J denote the mean and jump operator, respectively. This is actually the negative divergence, which will be more useful later on.

3 Equality test

We are going to test the equivalence of both formulationt on a 2D grid, using a DG basis of degree 1:

We create the matrix of the strong formulation and show that the matrices of both formulations are equal.

We use the \code{InfNorm(...)}-method to identify whether a matrix is (approximately) zero or not.

4 The gradient-operator

For the variational formulation of the gradient operator, a vector-valued test-function is required. Unfourtunately, this is not supported by BoSSS. Therefore we have to discretize the gradent component-wise, i.e. as $\partial_{x}$ and $\partial_y$.

A single derivative can obviously be expressed as a divergence by the identity $ \partial_{x_d} = \text{div}( \vec{e}_d u ) $.

Now, we are ready to assemble the full $\nabla$ operator as $\left[ \begin{array}{c} \partial_x \\ \partial_y \end{array} \right]$.

As an additional test, we create the gradient-matrix and verify that its transpose is equal to the negative MtxDiv-matrix:

5 The complete Poisson-system

Assembly of the system

We also need the identity-matrix in the top-left corner of the Poisson-system:

We are going to implement the linear Poisson-operator $$ \left[ \begin{array}{ccc} 1 & 0 & \partial_x \\ 0 & 1 & \partial_y \\ -\partial_x & -\partial_y & 0 \end{array} \right] \cdot

\left[ \begin{array}{c} \sigma_0 \\ \sigma_1 \\ u \end{array} \right]

\left[ \begin{array}{c} c_0 \\ c_1 \\ c_2 \end{array} \right] $$ The variables $c_0$, $c_1$ and $c_2$, which correspond to the test functions are also called co-domain variables of the operator. We are using the negative divergence, since this will lead to a symmetric matrix, instead of a anti-symmetric one. By doing so, we can e.g. use a Cholesky-factorization to determine whether the system is definite or not.

We create mappings $[\sigma_1, \sigma_2, u ]$: three different combinations of DG orders will be investigated:

We show that the matrices are symmetric (use e.g. SymmetryDeviation(...)), but indefinite (use e.g. IsDefinite(...)).

6 Advanced topics

Algebraic reduction

Since the top-left corner of our matrix $$ \left[ \begin{array}{cc} 1 & B \\ B^T & 0 \end{array} \right] $$ is actually very easy to eliminate the variable $\vec{\sigma}$ from our system algebraically. The matrix of the reduces system is obviously $B^T \cdot B$.

Extraction of sub-matrices and elimination

From the mapping, we can actually obtain index-lists for each variable, which can then be used to extract sub-matrices from MtxPoisson_Equal, MtxPoisson_Mixed, resp. MtxPoisson_Strng.

The extraction of the sub-matrix and the elimination, for the equal order:

Finally, we also create the reduced system for the mixed and the strange order, test for the definiteness of the reduced system.

Equal and mixed order are positive definite, while the strange order is indefinite - a clear indication that something ist wrong:

We compute the condition number of all three matrices; we observe that the mixed as well as the equal-order discretization result give rather moderate condition numbers.

For the strange orders, the condition number of the system is far to high: