Skip to content
Snippets Groups Projects
Commit 676d3a38 authored by Christian Engwer's avatar Christian Engwer
Browse files

Merge branch 'feature/fix-cgsolver-reduction' into 'master'

[preconditioners] fix type of CGSolver reduction parameter after recent updates

See merge request !132
parents 9a7e58fe 6e85bbd7
No related branches found
No related tags found
No related merge requests found
...@@ -259,6 +259,9 @@ namespace Dune { ...@@ -259,6 +259,9 @@ namespace Dune {
// copy base class constructors // copy base class constructors
using IterativeSolver<X,X>::IterativeSolver; using IterativeSolver<X,X>::IterativeSolver;
private:
using typename IterativeSolver<X,X>::scalar_real_type;
protected: protected:
using enableConditionEstimate_t = Dune::Std::bool_constant<(std::is_same<field_type,float>::value || std::is_same<field_type,double>::value)>; using enableConditionEstimate_t = Dune::Std::bool_constant<(std::is_same<field_type,float>::value || std::is_same<field_type,double>::value)>;
...@@ -273,7 +276,7 @@ namespace Dune { ...@@ -273,7 +276,7 @@ namespace Dune {
This is only supported for float and double field types. This is only supported for float and double field types.
*/ */
CGSolver (LinearOperator<X,X>& op, Preconditioner<X,X>& prec, CGSolver (LinearOperator<X,X>& op, Preconditioner<X,X>& prec,
real_type reduction, int maxit, int verbose, bool condition_estimate) : IterativeSolver<X,X>(op, prec, reduction, maxit, verbose), scalar_real_type reduction, int maxit, int verbose, bool condition_estimate) : IterativeSolver<X,X>(op, prec, reduction, maxit, verbose),
condition_estimate_(condition_estimate) condition_estimate_(condition_estimate)
{ {
if (condition_estimate && !(enableConditionEstimate_t{})) { if (condition_estimate && !(enableConditionEstimate_t{})) {
...@@ -290,7 +293,7 @@ namespace Dune { ...@@ -290,7 +293,7 @@ namespace Dune {
This is only supported for float and double field types. This is only supported for float and double field types.
*/ */
CGSolver (LinearOperator<X,X>& op, ScalarProduct<X>& sp, Preconditioner<X,X>& prec, CGSolver (LinearOperator<X,X>& op, ScalarProduct<X>& sp, Preconditioner<X,X>& prec,
real_type reduction, int maxit, int verbose, bool condition_estimate) : IterativeSolver<X,X>(op, sp, prec, reduction, maxit, verbose), scalar_real_type reduction, int maxit, int verbose, bool condition_estimate) : IterativeSolver<X,X>(op, sp, prec, reduction, maxit, verbose),
condition_estimate_(condition_estimate) condition_estimate_(condition_estimate)
{ {
if (condition_estimate && !(std::is_same<field_type,float>::value || std::is_same<field_type,double>::value)) { if (condition_estimate && !(std::is_same<field_type,float>::value || std::is_same<field_type,double>::value)) {
......
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