OGS
LinearSolverOptionsParser.cpp
Go to the documentation of this file.
1
11#pragma once
12
14
15#include "BaseLib/ConfigTree.h"
16#include "BaseLib/Logging.h"
18
19namespace MathLib
20{
21std::tuple<std::string, std::string>
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
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:35
std::optional< T > getConfigParameterOptional(std::string const &param) const
static const double s
void ignoreOtherLinearSolvers(const BaseLib::ConfigTree &config, const std::string &solver_name)