16 #ifndef _LIN_SOL_PARAMS_H
17 #define _LIN_SOL_PARAMS_H
24 namespace tinyxml2 {
class XMLElement; }
37 void addValue(
const std::string& key,
const std::string& value);
53 bool hasValue(
const std::string& key)
const;
56 std::map<std::string,std::string>
values;
76 bool read(
const tinyxml2::XMLElement* elem);
95 bool read(
const tinyxml2::XMLElement* child,
const std::string& prefix =
"");
Various enums for linear algebra scope.
Linear solver settings for a block of the linear system.
Definition: LinSolParams.h:80
BlockParams()
Default constructor.
Definition: LinSolParams.C:62
size_t comps
Components from basis (1, 2, 3, 12, 13, 23, 123, ..., 0 = all)
Definition: LinSolParams.h:98
size_t basis
Basis for block.
Definition: LinSolParams.h:97
std::vector< DirSmoother > dirSmoother
Directional smoother data.
Definition: LinSolParams.h:99
bool read(const tinyxml2::XMLElement *child, const std::string &prefix="")
Read settings from XML block.
Definition: LinSolParams.C:86
Class for linear solver parameters.
Definition: LinSolParams.h:67
LinAlg::LinearSystemType linSys
Type of linear system matrix.
Definition: LinSolParams.h:113
bool read(const tinyxml2::XMLElement *elem)
Read linear solver parameters from XML document.
Definition: LinSolParams.C:158
size_t getNoBlocks() const
Number of blocks in matrix system.
Definition: LinSolParams.h:103
std::vector< BlockParams > blocks
Parameters for each block.
Definition: LinSolParams.h:112
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
LinSolParams(LinAlg::LinearSystemType ls=LinAlg::GENERAL_MATRIX)
Default constructor.
Definition: LinSolParams.C:68
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
void addValue(const std::string &key, const std::string &value)
Add a value to the store.
Definition: LinSolParams.C:20
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
std::map< std::string, std::string > values
Map of key-value pairs.
Definition: LinSolParams.h:56
LinearSystemType
Enum defining linear system properties.
Definition: LinAlgenums.h:35
@ GENERAL_MATRIX
General matrix.
Definition: LinAlgenums.h:36
Settings for a directional smoother.
Definition: LinSolParams.h:87
std::string type
Directional smoother types.
Definition: LinSolParams.h:89
int order
Ordering of DOFs.
Definition: LinSolParams.h:88