Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
PCLDUFactorisation Class Reference

#include <PCLDUFactorisation.hpp>

+ Collaboration diagram for PCLDUFactorisation:

Classes

struct  PCLDUFactorisationContext
 

Public Member Functions

 PCLDUFactorisation (KSP &rKspObject)
 

Public Attributes

PCLDUFactorisationContext mPCContext
 
PC mPetscPCObject
 

Private Member Functions

void PCLDUFactorisationCreate (KSP &rKspObject)
 
void PCLDUFactorisationSetUp ()
 

Detailed Description

This class defines a PETSc-compliant purpose-built preconditioner.

Let A be a matrix arising in the FEM discretisation of the bidomain equations with the following block structure:

A = (A11 B') (B A22)

Let A=LDU be the following matrix factorisation

LDU = (I 0)(A11 0)(I inv(A11)B') (B*A11' I)(0 S)(0 I)

with I the identity matrix and S=A22-B*inv(A11)*B'

Let inv(A) be a preconditioner

inv(A) = inv(U)inv(D)inv(L) = (I -inv(A11)B')(inv(A11) 0)(I 0) (0 I)(0 inv(S))(-B*inv(A11) I)

This class implements an approximation of inv(A) where S=A22

inv(P) ~ inv(A)

inv(P) = (I -inv(A11)B')(inv(A11) 0)(I 0) (0 I)(0 inv(S=A22))(-B*inv(A11) I)

inv(P) = (inv(A11) -inv(A11)B'inv(S=A22))(I 0) (0 inv(S=A22))(-B*inv(A11) I)

In order to compute [y1 y2]' = inv(P)[x1 x2]' we do

z = inv(A11)*x1 y2 = inv(A22)*(x2 - B*z) y1 = z - inv(A11)(B*y2)

The inverses are approximate with one cycle of AMG.

Note: This class requires PETSc to be build including HYPRE library. If it's not available, it will show the following warning: Chaste warning: in file linalg/src/PCLDUFactorisation.cpp at line ???: PETSc HYPRE preconditioning library is not installed and will approximate the inverse of the subblocks with PETSc's default preconditioner (bjacobi at the time of writing this).

Definition at line 107 of file PCLDUFactorisation.hpp.

Constructor & Destructor Documentation

◆ PCLDUFactorisation()

PCLDUFactorisation::PCLDUFactorisation ( KSP &  rKspObject)

Constructor.

Parameters
rKspObjectKSP object where we want to install the block diagonal preconditioner.

Definition at line 47 of file PCLDUFactorisation.cpp.

References mPCContext, PCLDUFactorisationCreate(), and PCLDUFactorisationSetUp().

◆ ~PCLDUFactorisation()

PCLDUFactorisation::~PCLDUFactorisation ( )

Definition at line 60 of file PCLDUFactorisation.cpp.

Member Function Documentation

◆ PCLDUFactorisationCreate()

◆ PCLDUFactorisationSetUp()

Member Data Documentation

◆ mPCContext

PCLDUFactorisationContext PCLDUFactorisation::mPCContext

PC context, this will be passed to PCBlockDiagonalApply when PETSc returns control to our preconditioner subroutine. See PCShellSetContext().

Definition at line 138 of file PCLDUFactorisation.hpp.

Referenced by PCLDUFactorisation(), PCLDUFactorisationCreate(), and PCLDUFactorisationSetUp().

◆ mPetscPCObject

PC PCLDUFactorisation::mPetscPCObject

Generic PETSc preconditioner object

Definition at line 139 of file PCLDUFactorisation.hpp.

Referenced by PCLDUFactorisationCreate().


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