Overture  Version 25
Public Member Functions | Public Attributes | List of all members
PETScEquationSolver Class Reference

#include <PETScEquationSolver.h>

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

Public Member Functions

 PETScEquationSolver (Oges &oges_)
 
virtual ~PETScEquationSolver ()
 
virtual int solve (realCompositeGridFunction &u, realCompositeGridFunction &f)
 
virtual int saveBinaryMatrix (aString filename00, realCompositeGridFunction &u, realCompositeGridFunction &f)
 
virtual real sizeOf (FILE *file=NULL)
 
virtual real getMaximumResidual ()
 
int allocateMatrix (int, int, int, int)
 
int setMatrixElement (int, int, int, real)
 
int displayMatrix ()
 
int solvePETSc (realCompositeGridFunction &u, realCompositeGridFunction &f)
 
int initializePetscKSP ()
 
int setPetscParameters ()
 
int setPetscRunTimeParameters ()
 
int buildPetscMatrix ()
 
void preallocRowStorage (int blockSize)
 
void getCsortWorkspace (int nWorkSpace00)
 
void computeDiagScaling ()
 
int buildRhsAndSolVector (realCompositeGridFunction &u, realCompositeGridFunction &f)
 
int setupPreconditioner (KSP ksp, Vec brhs, Vec xsol)
 
void dh_initialize ()
 
void dh_setParameters ()
 
void dh_computeResidualReduction (double &residReduction)
 
- Public Member Functions inherited from EquationSolver
 EquationSolver (Oges &oges_)
 
virtual ~EquationSolver ()
 
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 printStatistics (FILE *file=stdout) const
 
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)
 

Public Attributes

MPI_Comm comm
 
KSP ksp
 
PC pc
 
Vec xsol
 
Vec brhs
 
Mat Amx
 
real timePrecond
 
real timeSolve
 
bool petscInitialized
 
int neqBuilt
 
realaval
 
int * ia_
 
int * ja_
 
int * iWorkRow
 
int nWorkRow
 
int * nzzAlloc
 
realdscale
 
bool isMatrixAllocated
 
bool shouldUpdateMatrix
 
bool copyOfSolutionNeeded
 
Oges::SparseStorageFormatEnum matrixFormat
 
bool turnOnPETScMemoryTracing
 
int solverMethod
 
int preconditioner
 
int matrixOrdering
 
int numberOfIncompleteLULevels
 
int gmresRestartLength
 
bool isDHPreconditioner
 
MyPcData * dh_ctx
 
double dh_setupTime
 
double dh_solveTime
 
aString dh_pcName
 

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
 

Constructor & Destructor Documentation

PETScEquationSolver::PETScEquationSolver ( Oges oges_)
virtual PETScEquationSolver::~PETScEquationSolver ( )
virtual

Member Function Documentation

int PETScEquationSolver::allocateMatrix ( int  ,
int  ,
int  ,
int   
)
virtual

Reimplemented from EquationSolver.

int PETScEquationSolver::buildPetscMatrix ( )
int PETScEquationSolver::buildRhsAndSolVector ( realCompositeGridFunction u,
realCompositeGridFunction f 
)
void PETScEquationSolver::computeDiagScaling ( )
void PETScEquationSolver::dh_computeResidualReduction ( double &  residReduction)
void PETScEquationSolver::dh_initialize ( )
void PETScEquationSolver::dh_setParameters ( )
int PETScEquationSolver::displayMatrix ( )
virtual

Reimplemented from EquationSolver.

void PETScEquationSolver::getCsortWorkspace ( int  nWorkSpace00)
virtual real PETScEquationSolver::getMaximumResidual ( )
virtual

Reimplemented from EquationSolver.

int PETScEquationSolver::initializePetscKSP ( )
void PETScEquationSolver::preallocRowStorage ( int  blockSize)
virtual int PETScEquationSolver::saveBinaryMatrix ( aString  filename00,
realCompositeGridFunction u,
realCompositeGridFunction f 
)
virtual

Reimplemented from EquationSolver.

int PETScEquationSolver::setMatrixElement ( int  ,
int  ,
int  ,
real   
)
virtual

Reimplemented from EquationSolver.

int PETScEquationSolver::setPetscParameters ( )
int PETScEquationSolver::setPetscRunTimeParameters ( )
int PETScEquationSolver::setupPreconditioner ( KSP  ksp,
Vec  brhs,
Vec  xsol 
)
virtual real PETScEquationSolver::sizeOf ( FILE *  file = NULL)
virtual

Reimplemented from EquationSolver.

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

Implements EquationSolver.

int PETScEquationSolver::solvePETSc ( realCompositeGridFunction u,
realCompositeGridFunction f 
)

Member Data Documentation

Mat PETScEquationSolver::Amx
real* PETScEquationSolver::aval
Vec PETScEquationSolver::brhs
MPI_Comm PETScEquationSolver::comm
bool PETScEquationSolver::copyOfSolutionNeeded
MyPcData* PETScEquationSolver::dh_ctx
aString PETScEquationSolver::dh_pcName
double PETScEquationSolver::dh_setupTime
double PETScEquationSolver::dh_solveTime
real* PETScEquationSolver::dscale
int PETScEquationSolver::gmresRestartLength
int* PETScEquationSolver::ia_
bool PETScEquationSolver::isDHPreconditioner
bool PETScEquationSolver::isMatrixAllocated
int* PETScEquationSolver::iWorkRow
int * PETScEquationSolver::ja_
KSP PETScEquationSolver::ksp
Oges::SparseStorageFormatEnum PETScEquationSolver::matrixFormat
int PETScEquationSolver::matrixOrdering
int PETScEquationSolver::neqBuilt
int PETScEquationSolver::numberOfIncompleteLULevels
int PETScEquationSolver::nWorkRow
int* PETScEquationSolver::nzzAlloc
PC PETScEquationSolver::pc
bool PETScEquationSolver::petscInitialized
int PETScEquationSolver::preconditioner
bool PETScEquationSolver::shouldUpdateMatrix
int PETScEquationSolver::solverMethod
real PETScEquationSolver::timePrecond
real PETScEquationSolver::timeSolve
bool PETScEquationSolver::turnOnPETScMemoryTracing
Vec PETScEquationSolver::xsol

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