14 std::string
const& prefix,
28 "OGS was compiled with Eigen but the config section in the "
29 "project file seems to be invalid");
34 if (
auto solver_type =
36 config->getConfigParameterOptional<std::string>(
"solver_type"))
40 if (
auto precon_type =
42 config->getConfigParameterOptional<std::string>(
"precon_type"))
46 if (
auto error_tolerance =
48 config->getConfigParameterOptional<
double>(
"error_tolerance"))
52 if (
auto max_iteration_step =
54 config->getConfigParameterOptional<
int>(
"max_iteration_step"))
58 if (
auto triangular_matrix_type =
60 config->getConfigParameterOptional<std::string>(
"triangular_matrix"))
64 *triangular_matrix_type);
68 config->getConfigParameterOptional<
bool>(
"scaling"))
70#ifdef USE_EIGEN_UNSUPPORTED
71 options.scaling = *scaling;
74 "The code is not compiled with the Eigen unsupported modules. "
75 "scaling is not available.");
80 config->getConfigParameterOptional<
int>(
"restart"))
82#ifdef USE_EIGEN_UNSUPPORTED
83 options.restart = *restart;
86 "The code is not compiled with the Eigen unsupported modules. "
87 "GMRES/GMRES option restart is not available.");
92 config->getConfigParameterOptional<
int>(
"l"))
94#ifdef USE_EIGEN_UNSUPPORTED
98 "The code is not compiled with the Eigen unsupported modules.");
103 config->getConfigParameterOptional<
int>(
"s"))
105#ifdef USE_EIGEN_UNSUPPORTED
109 "The code is not compiled with the Eigen unsupported modules.");
114 config->getConfigParameterOptional<
int>(
"smoothing"))
116#ifdef USE_EIGEN_UNSUPPORTED
117 options.smoothing = *smoothing;
120 "The code is not compiled with the Eigen unsupported modules.");
125 config->getConfigParameterOptional<
int>(
"angle"))
127#ifdef USE_EIGEN_UNSUPPORTED
128 options.angle = *angle;
131 "The code is not compiled with the Eigen unsupported modules.");
134 if (
auto residualupdate =
136 config->getConfigParameterOptional<
int>(
"residual_update"))
138#ifdef USE_EIGEN_UNSUPPORTED
139 options.residualupdate = *residualupdate;
142 "The code is not compiled with the Eigen unsupported modules.");
145 return {prefix, options};