IFEM  90A354
Macros | Functions
PETScPCPerm.C File Reference

Permutation for PETSc preconditioners. More...

#include "PETScPCPerm.h"
#include <iostream>
Include dependency graph for PETScPCPerm.C:

Macros

#define PetscCall(x)   if (x) std::cerr <<"PetscFree failed "<< x << std::endl;
 Workaround for nonexisting macro in older PETSc versions.
 

Functions

PetscErrorCode PCPermCreate (PCPerm **pcperm)
 Create the permutated preconditioner. More...
 
PetscErrorCode PCPermSetUp (PC pc, IS *perm, Mat A, const char *type)
 Configure the permutated preconditioner. More...
 
PetscErrorCode PCPermApply (PC pc, Vec x, Vec y)
 Apply the permutated preconditioner. More...
 
PetscErrorCode PCPermDestroy (PC pc)
 Destroy a permutated preconditioner. More...
 

Detailed Description

Permutation for PETSc preconditioners.

Date
Jan 15 2010
Author
Runar Holdahl / SINTEF

Function Documentation

◆ PCPermApply()

PetscErrorCode PCPermApply ( PC  pc,
Vec  x,
Vec  y 
)

Apply the permutated preconditioner.

Parameters
pcPreconditioner to apply
[in]xVector to apply preconditioner to
[out]yThe evaluate preconditioner value

References PCPerm::identity, PCPerm::order, and PCPerm::pc.

Referenced by PETScSolParams::addDirSmoother().

◆ PCPermCreate()

PetscErrorCode PCPermCreate ( PCPerm **  pc)

Create the permutated preconditioner.

Parameters
[out]pcPointer to the preconditioner to create.

References PCPerm::order.

Referenced by PETScSolParams::addDirSmoother().

◆ PCPermDestroy()

PetscErrorCode PCPermDestroy ( PC  pc)

Destroy a permutated preconditioner.

Parameters
pcPreconditioner to destroy

References PCPerm::pc, and PetscCall.

Referenced by PETScSolParams::addDirSmoother().

◆ PCPermSetUp()

PetscErrorCode PCPermSetUp ( PC  pc,
IS perm,
Mat  A,
const char *  type 
)

Configure the permutated preconditioner.

Parameters
[out]pcPreconditioner to create
permThe index set describing the ordering
AThe matrix to permutate
typetype for preconditioner to create

References PCPerm::Aperm, PCPerm::identity, PCPerm::order, and PCPerm::pc.

Referenced by PETScSolParams::addDirSmoother().