16 #ifndef _PETSC_SOL_PARAMS_H
17 #define _PETSC_SOL_PARAMS_H
34 typedef std::vector<ISVec>
ISMat;
67 void setupPC(PC& pc,
size_t block,
68 const std::string& prefix,
69 const std::set<int>& blockEqs,
100 int iBlock,
const ISMat& dirIndexSet);
130 const ISMat& dirIndexSet,
131 const std::set<int>& blockEqs,
142 bool asmlu,
bool smoother,
143 const std::set<int>& blockEqs,
Linear solver parameters for PETSc matrices.
std::vector< ISVec > ISMat
Index set matrix.
Definition: PETScMatrix.h:30
std::vector< ISVec > ISMat
Index set matrix.
Definition: PETScSolParams.h:34
std::vector< StringVec > StringMat
String matrix.
Definition: PETScSolParams.h:32
std::vector< IntVec > IntMat
Integer matrix.
Definition: PETScSolParams.h:30
std::vector< std::string > StringVec
String vector.
Definition: PETScSolParams.h:31
std::vector< int > IntVec
Integer vector.
Definition: PETScSolParams.h:27
SchurPrec
Schur preconditioner methods.
Definition: PETScSolParams.h:37
std::vector< IS > ISVec
Index set vector.
Definition: PETScSolParams.h:33
Linear solver settings for a block of the linear system.
Definition: LinSolParams.h:80
Class for linear solver parameters.
Definition: LinSolParams.h:67
size_t getNoBlocks() const
Number of blocks in matrix system.
Definition: LinSolParams.h:103
const BlockParams & getBlock(size_t i) const
Obtain settings for a given block.
Definition: LinSolParams.h:106
LinAlg::LinearSystemType getLinSysType() const
Returns the linear system type.
Definition: LinSolParams.h:109
Class for PETSc solver parameters.
Definition: PETScSolParams.h:47
void setupAdditiveSchwarz(PC &pc, size_t block, bool asmlu, bool smoother, const std::set< int > &blockEqs, bool setup)
Setup an additive Schwarz preconditioner.
Definition: PETScSolParams.C:345
size_t getNoBlocks() const
Obtain number of blocks.
Definition: PETScSolParams.h:73
LinAlg::LinearSystemType getLinSysType() const
Returns the linear system type.
Definition: PETScSolParams.h:91
int getIntValue(const std::string &key) const
Get integer setting.
Definition: PETScSolParams.h:79
~PETScSolParams()
Destructor.
Definition: PETScSolParams.h:57
const LinSolParams::BlockParams & getBlock(size_t i) const
Obtain settings for a given block.
Definition: PETScSolParams.h:76
const ProcessAdm & adm
Reference to process administrator.
Definition: PETScSolParams.h:147
bool hasValue(const std::string &key) const
Get integer setting.
Definition: PETScSolParams.h:88
std::string getStringValue(const std::string &key) const
Get string setting.
Definition: PETScSolParams.h:85
bool addDirSmoother(PC pc, const Mat &P, int iBlock, const ISMat &dirIndexSet)
Set directional smoother.
Definition: PETScSolParams.C:94
double getDoubleValue(const std::string &key) const
Get integer setting.
Definition: PETScSolParams.h:82
void setHypreOptions(const std::string &prefix, const SettingMap &map)
Set Hypre options.
Definition: PETScSolParams.C:181
void setMLOptions(const std::string &prefix, const SettingMap &map)
Set ML options.
Definition: PETScSolParams.C:148
void setGAMGOptions(const std::string &prefix, const SettingMap &map)
Set GAMG options.
Definition: PETScSolParams.C:168
void setupSmoothers(PC &pc, size_t iBlock, const ISMat &dirIndexSet, const std::set< int > &blockEqs, bool setup)
Setup the smoothers in a multigrid.
Definition: PETScSolParams.C:268
PETScSolParams(const LinSolParams &spar, const ProcessAdm &padm)
Default constructor.
Definition: PETScSolParams.h:52
void setupCoarseSolver(PC &pc, const std::string &prefix, const SettingMap &map)
Setup the coarse solver in a multigrid.
Definition: PETScSolParams.C:196
const LinSolParams & params
Reference to linear solver parameters.
Definition: PETScSolParams.h:146
void setupPC(PC &pc, size_t block, const std::string &prefix, const std::set< int > &blockEqs, bool setup)
Set up preconditioner parameters for PC object.
Definition: PETScSolParams.C:20
Class for administration of MPI processes in IFEM library.
Definition: ProcessAdm.h:33
A key-value store for settings.
Definition: LinSolParams.h:32
bool hasValue(const std::string &key) const
Checks if the store holds a value for a key.
Definition: LinSolParams.C:56
std::string getStringValue(const std::string &key) const
Obtain a value as a string.
Definition: LinSolParams.C:26
int getIntValue(const std::string &key) const
Obtain a value as an integer.
Definition: LinSolParams.C:36
double getDoubleValue(const std::string &key) const
Obtain a value as an double.
Definition: LinSolParams.C:46
LinearSystemType
Enum defining linear system properties.
Definition: LinAlgenums.h:35