21 std::string
const& prefix,
35 "OGS was compiled with Eigen but the config section in the "
36 "project file seems to be invalid");
41 if (
auto solver_type =
43 config->getConfigParameterOptional<std::string>(
"solver_type"))
47 if (
auto precon_type =
49 config->getConfigParameterOptional<std::string>(
"precon_type"))
53 if (
auto error_tolerance =
55 config->getConfigParameterOptional<
double>(
"error_tolerance"))
59 if (
auto max_iteration_step =
61 config->getConfigParameterOptional<
int>(
"max_iteration_step"))
67 config->getConfigParameterOptional<
bool>(
"scaling"))
69#ifdef USE_EIGEN_UNSUPPORTED
70 options.scaling = *scaling;
73 "The code is not compiled with the Eigen unsupported modules. "
74 "scaling is not available.");
79 config->getConfigParameterOptional<
int>(
"restart"))
81#ifdef USE_EIGEN_UNSUPPORTED
82 options.restart = *restart;
85 "The code is not compiled with the Eigen unsupported modules. "
86 "GMRES/GMRES option restart is not available.");
91 config->getConfigParameterOptional<
int>(
"l"))
93#ifdef USE_EIGEN_UNSUPPORTED
97 "The code is not compiled with the Eigen unsupported modules.");
102 config->getConfigParameterOptional<
int>(
"s"))
104#ifdef USE_EIGEN_UNSUPPORTED
108 "The code is not compiled with the Eigen unsupported modules.");
113 config->getConfigParameterOptional<
int>(
"smoothing"))
115#ifdef USE_EIGEN_UNSUPPORTED
116 options.smoothing = *smoothing;
119 "The code is not compiled with the Eigen unsupported modules.");
124 config->getConfigParameterOptional<
int>(
"angle"))
126#ifdef USE_EIGEN_UNSUPPORTED
127 options.angle = *angle;
130 "The code is not compiled with the Eigen unsupported modules.");
133 if (
auto residualupdate =
135 config->getConfigParameterOptional<
int>(
"residual_update"))
137#ifdef USE_EIGEN_UNSUPPORTED
138 options.residualupdate = *residualupdate;
141 "The code is not compiled with the Eigen unsupported modules.");
144 return {prefix, options};