OGS
LinearSolverOptionsParser.cpp
Go to the documentation of this file.
1
11
#pragma once
12
13
#include "
LinearSolverOptionsParser.h
"
14
15
#include "
BaseLib/ConfigTree.h
"
16
#include "
BaseLib/Logging.h
"
17
#include "
MathLib/LinAlg/LinearSolverOptions.h
"
18
19
namespace
MathLib
20
{
21
std::tuple<std::string, std::string>
22
LinearSolverOptionsParser<EigenLisLinearSolver>::parseNameAndOptions
(
23
std::string
const
& prefix,
BaseLib::ConfigTree
const
*
const
config)
const
24
{
25
std::string lis_options =
"-initx_zeros 0"
;
26
27
if
(config)
28
{
29
ignoreOtherLinearSolvers
(*config,
"lis"
);
31
if
(
auto
s
= config->
getConfigParameterOptional
<std::string>(
"lis"
))
32
{
33
if
(!
s
->empty())
34
{
35
lis_options +=
" "
+ *
s
;
36
INFO
(
"Lis options: '{:s}'"
, lis_options);
37
}
38
}
39
}
40
return
{prefix, lis_options};
41
}
42
}
// namespace MathLib
ConfigTree.h
LinearSolverOptionsParser.h
LinearSolverOptions.h
Logging.h
INFO
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition
Logging.h:35
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameterOptional
std::optional< T > getConfigParameterOptional(std::string const ¶m) const
Definition
ConfigTree-impl.h:64
MathLib
Definition
CreateComponent.h:32
MathLib::s
static const double s
Definition
GaussLegendreTet.cpp:102
MathLib::ignoreOtherLinearSolvers
void ignoreOtherLinearSolvers(const BaseLib::ConfigTree &config, const std::string &solver_name)
Definition
LinearSolverOptions.cpp:23
MathLib::LinearSolverOptionsParser
Definition
LinearSolverOptionsParser.h:16
MathLib
LinAlg
EigenLis
LinearSolverOptionsParser.cpp
Generated by
1.10.0