compiling error when using BiCGSTAB with a SparseMatrix of std::complex<mpreal>
I get a compiling error when using Eigen::BiCGSTAB with a Eigen::SparseMatrix of std::complex< mpfr::mpreal >
/nobackup/Build/eigen/include/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h:54:19: error: conversion from ‘int’ to non-scalar type ‘Scalar’ {aka ‘std::complex<mpfr::mpreal>’} requested
54 | Scalar rho = 1;
| ^
/nobackup/Build/eigen/include/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h:55:19: error: conversion from ‘int’ to non-scalar type ‘Scalar’ {aka ‘std::complex<mpfr::mpreal>’} requested
55 | Scalar alpha = 1;
| ^
/nobackup/Build/eigen/include/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h:56:19: error: conversion from ‘int’ to non-scalar type ‘Scalar’ {aka ‘std::complex<mpfr::mpreal>’} requested
56 | Scalar w = 1;
| ^
This can be fixed by rewriting the above mentioned lines as such:
Scalar rho (1);
Scalar alpha(1);
Scalar w(1);