OGS
LisOption.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include <string>
18 #include <map>
19 
20 #include "BaseLib/Logging.h"
21 
22 #include "BaseLib/ConfigTree.h"
24 
25 namespace MathLib
26 {
40 struct LisOption final
41 {
42  explicit LisOption(BaseLib::ConfigTree const* const options)
43  {
44  if (options) {
45  ignoreOtherLinearSolvers(*options, "lis");
47  if (auto s = options->getConfigParameterOptional<std::string>("lis")) {
48  if (!s->empty()) {
49  option_string_ += " " + *s;
50  INFO("Lis options: '{:s}'", option_string_);
51  }
52  }
53  }
54  }
55 
56  std::string option_string_ = "-initx_zeros 0";
57 };
58 }
void INFO(char const *fmt, Args const &... args)
Definition: Logging.h:32
std::optional< T > getConfigParameterOptional(std::string const &param) const
void ignoreOtherLinearSolvers(const BaseLib::ConfigTree &config, const std::string &solver_name)
LisOption(BaseLib::ConfigTree const *const options)
Definition: LisOption.h:42
std::string option_string_
Definition: LisOption.h:56