From 07e099065fb554c9ff3b215b9c5d7f69e307da3b Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 26 Jun 2024 10:20:46 +0100 Subject: [PATCH] ... --- docs/src/SLEPcEPS/poisson.py.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/SLEPcEPS/poisson.py.rst b/docs/src/SLEPcEPS/poisson.py.rst index 23ddea3..fd1eac1 100644 --- a/docs/src/SLEPcEPS/poisson.py.rst +++ b/docs/src/SLEPcEPS/poisson.py.rst @@ -1,8 +1,8 @@ Solving the Laplace eigenvalue problem using SLEPc EPS ======================================================= -In this tutorial, we explore using `SLEPc EPS` to solve the Laplace eigenvalue problem in different formulations. -We begin considering the Poisson eigenvalue problem in primal form, i.e. +In this tutorial, we explore using `SLEPc EPS` to solve the Laplace eigenvalue problem in primal and mixed formulations. +We begin by considering the Poisson eigenvalue problem in primal form, i.e. .. math:: @@ -27,9 +27,9 @@ Such a discretisation can easily be constructed using NGSolve as follows: :: m = BilinearForm(-1*u*v*dx, symmetric=True) m.Assemble() -We then proceed to solve the eigenvalue problem using `SLEPc EPS` which is wrapped by ngsPETSc's :code:`EigenSolver` class. -In particular, we will use SLEPc implementation of a locally optimal block preconditioned conjugate gradient. -Notice that we have assembled the mass matrix so that it is symmetric negative definite, this is because ngsPETSc :code:`Eigensolver` requires all eigenvalue problems to be written as a polynomial eigenvalue problem, i.e. +We then proceed to solve the eigenvalue problem using `SLEPc EPS` which is wrapped by ngsPETSc's :code:`EigenSolver` class. +In particular, we will use the SLEPc implementation of locally optimal block preconditioned conjugate gradient. +Notice that we have assembled the mass matrix so that it is symmetric negative definite; this is because ngsPETSc :code:`Eigensolver` requires all eigenvalue problems to be written as a polynomial eigenvalue problem, i.e. .. math:: A\vec{U} - \lambda M\vec{U} = 0 @@ -70,10 +70,10 @@ We can discretise this problem using NGSolve as follows: :: m = BilinearForm(1*u*v*dx) m.Assemble() -We can then solve the eigenvalue problem using ngsPETSc's `EigenSolver` class. +We can again solve the eigenvalue problem using ngsPETSc's `EigenSolver` class. The mass matrix now has a large kernel, hence is no longer symmetric positive definite, therefore we can not use LOBPCG as a solver. Instead, we will use a Krylov-Schur solver with a shift-and-invert spectral transformation to target the smallest eigenvalues. -Notice that because we are using a shift-and-invert spectral transformation we only need to invert the stiffness matrix which has a trivial kernel since we are using an inf-sup discretisation. +Notice that because we are using a shift-and-invert spectral transformation we only need to invert the stiffness matrix which has a trivial kernel since we are using an inf-sup stable discretisation. If we tried to use a simple shift transformation to target the largest eigenvalues we would have run into the error of trying to invert a singular matrix.:: solver = EigenSolver((m, a), W, 10,