IFEM  90A354
PETScPCPerm.h
1 // $Id
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef PCPERM_H_IS_INCLUDED
15 #define PCPERM_H_IS_INCLUDED
16 
17 #include "petscksp.h"
18 
19 
21 typedef struct {
22  IS *order;
23  Mat Aperm;
24  PC pc;
25  PetscBool identity;
26 } PCPerm;
27 
30 extern PetscErrorCode PCPermCreate(PCPerm** pc);
31 
37 extern PetscErrorCode PCPermSetUp(PC pc, IS *perm, Mat A, const char* type);
38 
43 extern PetscErrorCode PCPermApply(PC pc, Vec x, Vec y);
44 
47 extern PetscErrorCode PCPermDestroy(PC pc);
48 
49 #endif
PetscErrorCode PCPermSetUp(PC pc, IS *perm, Mat A, const char *type)
Configure the permutated preconditioner.
Definition: PETScPCPerm.C:38
PetscErrorCode PCPermApply(PC pc, Vec x, Vec y)
Apply the permutated preconditioner.
Definition: PETScPCPerm.C:68
PetscErrorCode PCPermDestroy(PC pc)
Destroy a permutated preconditioner.
Definition: PETScPCPerm.C:83
PetscErrorCode PCPermCreate(PCPerm **pcperm)
Create the permutated preconditioner.
Definition: PETScPCPerm.C:22
int IS
To avoid compilation failures.
Definition: PETScSupport.h:51
Define context for user-defined preconditioner.
Definition: PETScPCPerm.h:21
IS * order
The index set describing the ordering.
Definition: PETScPCPerm.h:22
PetscBool identity
true if the permutation is identity matrix
Definition: PETScPCPerm.h:25
PC pc
Preconditioner definition.
Definition: PETScPCPerm.h:24
Mat Aperm
Permutated matrix.
Definition: PETScPCPerm.h:23