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
21typedef struct {
23 Mat Aperm;
24 PC pc;
25 PetscBool identity;
26} PCPerm;
27
30extern PetscErrorCode PCPermCreate(PCPerm** pc);
31
37extern PetscErrorCode PCPermSetUp(PC pc, IS *perm, Mat A, const char* type);
38
43extern PetscErrorCode PCPermApply(PC pc, Vec x, Vec y);
44
47extern 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