PCLDUFactorisation Class Reference

#include <PCLDUFactorisation.hpp>

Collaboration diagram for PCLDUFactorisation:
Collaboration graph
[legend]

List of all members.

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 purpouse-build 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 throw the following error:

[0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Unknown type. Check for miss-spelling or missing external package needed for type! [0]PETSC ERROR: Unable to find requested PC type hypre!

and will approximate the inverse of the subblocks with PETSc's default preconditioner (bjacobi at the time of writing this).

Definition at line 98 of file PCLDUFactorisation.hpp.


Constructor & Destructor Documentation

PCLDUFactorisation::PCLDUFactorisation ( KSP &  rKspObject  ) 

Constructor

Parameters:
rKspObject KSP object where we want to install the block diagonal preconditioner.

Definition at line 32 of file PCLDUFactorisation.cpp.

References PCLDUFactorisationCreate(), and PCLDUFactorisationSetUp().


Member Function Documentation

void PCLDUFactorisation::PCLDUFactorisationCreate ( KSP &  rKspObject  )  [private]

Creates all the state data required by the preconditioner

Parameters:
rKspObject KSP object where we want to install the block diagonal preconditioner.

Definition at line 57 of file PCLDUFactorisation.cpp.

References PetscTools::CreateVec(), mPCContext, and mPetscPCObject.

Referenced by PCLDUFactorisation().

void PCLDUFactorisation::PCLDUFactorisationSetUp (  )  [private]

Member Data Documentation

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

Definition at line 118 of file PCLDUFactorisation.hpp.

Referenced by PCLDUFactorisationCreate(), and PCLDUFactorisationSetUp().

Generic PETSc preconditioner object

Definition at line 119 of file PCLDUFactorisation.hpp.

Referenced by PCLDUFactorisationCreate().


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

Generated by  doxygen 1.6.2