Overture  Version 25
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PETScSolver Class Reference

#include <PETScSolver.h>

Inheritance diagram for PETScSolver:
Inheritance graph
[legend]
Collaboration diagram for PETScSolver:
Collaboration graph
[legend]

Public Types

enum  SingularProblemEnum { notSingular =0, specifyConstantNullVector, specifyNullVector, addExtraEquation }
 

Public Member Functions

 PETScSolver (Oges &oges_)
 
virtual ~PETScSolver ()
 
virtual int solve (realCompositeGridFunction &u, realCompositeGridFunction &f)
 
int destroy ()
 
int buildGlobalIndexing (CompositeGrid &cg, realCompositeGridFunction &uu)
 
int getGlobalIndex (int n, int *iv, int grid, int p) const
 
int getGlobalIndex (int n, int *iv, int grid, realArray &ug) const
 
real getMaximumResidual ()
 
int buildMatrix (realCompositeGridFunction &coeff, realCompositeGridFunction &u)
 
virtual int printStatistics (FILE *file=stdout) const
 
int setProblemIsSingular (SingularProblemEnum singularOption=specifyConstantNullVector)
 
int buildSolver ()
 
int fillInterpolationCoefficients (realCompositeGridFunction &uu)
 
virtual int setExtraEquationValues (realCompositeGridFunction &f, real *value)
 
virtual int getExtraEquationValues (const realCompositeGridFunction &u, real *value)
 
virtual int evaluateExtraEquation (const realCompositeGridFunction &u, real &value, int extraEquation=0)
 
virtual int evaluateExtraEquation (const realCompositeGridFunction &u, real &value, real &sumOfExtraEquationCoefficients, int extraEquation=0)
 
virtual real sizeOf (FILE *file=NULL)
 
int setPetscParameters ()
 
int setPetscRunTimeParameters ()
 
int initializePETSc ()
 
int finalizePETSc ()
 
- Public Member Functions inherited from EquationSolver
 EquationSolver (Oges &oges_)
 
virtual ~EquationSolver ()
 
virtual int saveBinaryMatrix (aString filename00, realCompositeGridFunction &u, realCompositeGridFunction &f)
 
virtual int setCoefficientsAndBoundaryConditions (realCompositeGridFunction &coeff, const IntegerArray &boundaryConditions, const RealArray &bcData)
 
virtual int setCoefficientArray (realCompositeGridFunction &coeff, const IntegerArray &boundaryConditions=Overture::nullIntArray(), const RealArray &bcData=Overture::nullRealArray())
 
virtual int setEquationAndBoundaryConditions (OgesParameters::EquationEnum equation, CompositeGridOperators &op, const IntegerArray &boundaryConditions, const RealArray &bcData, RealArray &constantCoeff=Overture::nullRealArray(), realCompositeGridFunction *variableCoeff=NULL)
 
virtual int setGrid (CompositeGrid &cg)
 
virtual int set (MultigridCompositeGrid &mgcg)
 
const aStringgetName () const
 
virtual int allocateMatrix (int, int, int, int)
 
virtual int setMatrixElement (int, int, int, real)
 
virtual int displayMatrix ()
 

Static Public Member Functions

static real getCurrentMemoryUsage ()
 

Public Attributes

Vec x
 
Vec b
 
Mat A
 
KSP ksp
 
PC pc
 
MatNullSpace nsp
 
Vec * nullVector
 
PetscInt i
 
PetscInt j
 
PetscInt I
 
PetscInt J
 
PetscInt Istart
 
PetscInt Iend
 
PetscErrorCode ierr
 
PetscTruth flg
 
PetscScalar v
 
bool turnOnPETScMemoryTracing
 
real relativeTol
 
int numberOfProcessors
 
int numberOfGridPoints
 
int numberOfGridPointsThisProcessor
 
int numberOfUnknowns
 
int numberOfUnknownsThisProcessor
 
int * pnab
 
int * pnoffset
 
int numberOfComponents
 
realCompositeGridFunctionpCoeff
 
realCompositeGridFunctiondiagonalScale
 
SingularProblemEnum problemIsSingular
 
bool initialized
 
bool reInitialize
 
bool useDiagonalScaling
 
bool adjustPeriodicCoefficients
 

Static Public Attributes

static int debug
 
static int instancesOfPETSc
 

Additional Inherited Members

- Protected Attributes inherited from EquationSolver
Ogesoges
 
OgesParametersparameters
 
aString name
 
int numberOfEquations
 
int numberOfNonzeros
 
real maximumResidual
 
int numberOfIterations
 
int solverMethod
 
int preconditioner
 
int matrixOrdering
 
int numberOfIncompleteLULevels
 
int gmresRestartLength
 

Member Enumeration Documentation

Enumerator
notSingular 
specifyConstantNullVector 
specifyNullVector 
addExtraEquation 

Constructor & Destructor Documentation

PETScSolver::PETScSolver ( Oges oges_)
virtual PETScSolver::~PETScSolver ( )
virtual

Member Function Documentation

int PETScSolver::buildGlobalIndexing ( CompositeGrid cg,
realCompositeGridFunction uu 
)
int PETScSolver::buildMatrix ( realCompositeGridFunction coeff,
realCompositeGridFunction u 
)
int PETScSolver::buildSolver ( )
int PETScSolver::destroy ( )
virtual int PETScSolver::evaluateExtraEquation ( const realCompositeGridFunction u,
real value,
int  extraEquation = 0 
)
virtual

Reimplemented from EquationSolver.

virtual int PETScSolver::evaluateExtraEquation ( const realCompositeGridFunction u,
real value,
real sumOfExtraEquationCoefficients,
int  extraEquation = 0 
)
virtual

Reimplemented from EquationSolver.

int PETScSolver::fillInterpolationCoefficients ( realCompositeGridFunction uu)
int PETScSolver::finalizePETSc ( )
static real PETScSolver::getCurrentMemoryUsage ( )
static
virtual int PETScSolver::getExtraEquationValues ( const realCompositeGridFunction u,
real value 
)
virtual

Reimplemented from EquationSolver.

int PETScSolver::getGlobalIndex ( int  n,
int *  iv,
int  grid,
int  p 
) const
inline
int PETScSolver::getGlobalIndex ( int  n,
int *  iv,
int  grid,
realArray ug 
) const
real PETScSolver::getMaximumResidual ( )
virtual

Reimplemented from EquationSolver.

int PETScSolver::initializePETSc ( )
virtual int PETScSolver::printStatistics ( FILE *  file = stdout) const
virtual

Reimplemented from EquationSolver.

virtual int PETScSolver::setExtraEquationValues ( realCompositeGridFunction f,
real value 
)
virtual

Reimplemented from EquationSolver.

int PETScSolver::setPetscParameters ( )
int PETScSolver::setPetscRunTimeParameters ( )
int PETScSolver::setProblemIsSingular ( SingularProblemEnum  singularOption = specifyConstantNullVector)
virtual real PETScSolver::sizeOf ( FILE *  file = NULL)
virtual

Reimplemented from EquationSolver.

virtual int PETScSolver::solve ( realCompositeGridFunction u,
realCompositeGridFunction f 
)
virtual

Implements EquationSolver.

Member Data Documentation

Mat PETScSolver::A
bool PETScSolver::adjustPeriodicCoefficients
Vec PETScSolver::b
int PETScSolver::debug
static
realCompositeGridFunction* PETScSolver::diagonalScale
PetscTruth PETScSolver::flg
PetscInt PETScSolver::i
PetscInt PETScSolver::I
PetscInt PETScSolver::Iend
PetscErrorCode PETScSolver::ierr
bool PETScSolver::initialized
int PETScSolver::instancesOfPETSc
static
PetscInt PETScSolver::Istart
PetscInt PETScSolver::j
PetscInt PETScSolver::J
KSP PETScSolver::ksp
MatNullSpace PETScSolver::nsp
Vec* PETScSolver::nullVector
int PETScSolver::numberOfComponents
int PETScSolver::numberOfGridPoints
int PETScSolver::numberOfGridPointsThisProcessor
int PETScSolver::numberOfProcessors
int PETScSolver::numberOfUnknowns
int PETScSolver::numberOfUnknownsThisProcessor
PC PETScSolver::pc
realCompositeGridFunction* PETScSolver::pCoeff
int* PETScSolver::pnab
int * PETScSolver::pnoffset
SingularProblemEnum PETScSolver::problemIsSingular
bool PETScSolver::reInitialize
real PETScSolver::relativeTol
bool PETScSolver::turnOnPETScMemoryTracing
bool PETScSolver::useDiagonalScaling
PetscScalar PETScSolver::v
Vec PETScSolver::x

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