MathLib::LinearSolverOptionsParser< EigenLisLinearSolver > Struct Referencefinal

Detailed Description

Definition at line 23 of file LinearSolverOptionsParser.h.

#include <LinearSolverOptionsParser.h>

Public Member Functions

std::tuple< std::string, std::string > parseNameAndOptions (std::string const &prefix, BaseLib::ConfigTree const *const config) const

Member Function Documentation

◆ parseNameAndOptions()

std::tuple< std::string, std::string > MathLib::LinearSolverOptionsParser< EigenLisLinearSolver >::parseNameAndOptions ( std::string const & prefix,
BaseLib::ConfigTree const *const config ) const

The method parses the linear solver options for LIS.

prefixthe prefix for the linear solver to distinguish different linear solvers for instance in the staggered schema
configthe part of the property tree (usually created from the linear solver section in the project file)
the first item of the returned tuple is the solver prefix as string, the second item are all the options as a string that will be passed to LIS via lis_solver_set_options()
Input File Parameter

Definition at line 22 of file LinearSolverOptionsParser.cpp.

25 std::string lis_options = "-initx_zeros 0";
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};
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:35
static const double s
void ignoreOtherLinearSolvers(const BaseLib::ConfigTree &config, const std::string &solver_name)

References BaseLib::ConfigTree::getConfigParameterOptional(), MathLib::ignoreOtherLinearSolvers(), INFO(), and MathLib::s.

The documentation for this struct was generated from the following files: