Skip to content
Snippets Groups Projects
Commit 2b4aeee1 authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[eigen-solver/matrixinverter] fix headercheck

parent 5aeae643
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ public:
using ComplexMatrixType = ComplexMatrixImp;
EigenSolverBase(const MatrixType& matrix, const std::string& type = "")
: EigenSolverBase(matrix, EigenSolverOptions<MatrixType>::options(type))
: EigenSolverBase(matrix, EigenSolverOptions<MatrixType, true>::options(type))
{
}
......@@ -309,9 +309,10 @@ protected:
DUNE_THROW(Exceptions::eigen_solver_failed_bc_it_was_not_set_up_correctly,
"Missing 'type' in given options:\n\n"
<< *options_);
internal::ensure_eigen_solver_type(options_->get<std::string>("type"), EigenSolverOptions<MatrixType>::types());
internal::ensure_eigen_solver_type(options_->get<std::string>("type"),
EigenSolverOptions<MatrixType, true>::types());
const Common::Configuration default_opts =
EigenSolverOptions<MatrixType>::options(options_->get<std::string>("type"));
EigenSolverOptions<MatrixType, true>::options(options_->get<std::string>("type"));
for (const std::string& default_key : default_opts.getValueKeys()) {
if (!options_->has_key(default_key))
(*options_)[default_key] = default_opts.get<std::string>(default_key);
......
......@@ -73,7 +73,7 @@ public:
*/
MatrixInverterBase(const MatrixType& matrix, const std::string& type = "")
: matrix_(matrix)
, options_(MatrixInverterOptions<MatrixType>::options(type))
, options_(MatrixInverterOptions<MatrixType, true>::options(type))
, inverse_(nullptr)
{
pre_checks();
......@@ -138,9 +138,9 @@ protected:
<< "\n\nThese were the given options:\n\n"
<< options_);
internal::ensure_matrix_inverter_type(options_.get<std::string>("type"),
MatrixInverterOptions<MatrixType>::types());
MatrixInverterOptions<MatrixType, true>::types());
const Common::Configuration default_opts =
MatrixInverterOptions<MatrixType>::options(options_.get<std::string>("type"));
MatrixInverterOptions<MatrixType, true>::options(options_.get<std::string>("type"));
// check matrix
if (options_.get("check_for_inf_nan", default_opts.get<bool>("check_for_inf_nan"))) {
if (contains_inf_or_nan(matrix_))
......@@ -159,7 +159,7 @@ protected:
if (!inverse_)
DUNE_THROW(Common::Exceptions::internal_error, "The inverse_ member is not filled after calling compute()!");
const Common::Configuration default_opts =
MatrixInverterOptions<MatrixType>::options(options_.get<std::string>("type"));
MatrixInverterOptions<MatrixType, true>::options(options_.get<std::string>("type"));
if (options_.get("check_for_inf_nan", default_opts.get<bool>("check_for_inf_nan"))) {
if (contains_inf_or_nan(*inverse_))
DUNE_THROW(Exceptions::matrix_invert_failed_bc_result_contained_inf_or_nan,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment