From 09cf9dc93b65ca08b566f5b0008feb004d3732f2 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 5 Jan 2015 16:45:43 +0100 Subject: [PATCH] fix the quadruple precision stuff this also fixes the SuperLU backend with __float128 on Dune 2.4. The problem is that due to some hacks within dune-istl, the AMG solver can't be used because it calls the direct solver directly without an option to disable this. (This could be fixed in a similar fashion as the SuperLU backend by copying everything into data structures which use 'double' before calling into ISTL, but this is a thing for another time.) --- examples/co2injection_flash_ecfv.cpp | 4 ++++ examples/co2injection_flash_ni_ecfv.cpp | 4 ++++ examples/co2injection_flash_ni_vcfv.cpp | 4 ++++ examples/co2injection_flash_vcfv.cpp | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/examples/co2injection_flash_ecfv.cpp b/examples/co2injection_flash_ecfv.cpp index 2f0564657..3fd5e8cb5 100644 --- a/examples/co2injection_flash_ecfv.cpp +++ b/examples/co2injection_flash_ecfv.cpp @@ -50,6 +50,10 @@ SET_TYPE_PROP( // else we increase the tolerance of the Newton solver #if HAVE_QUAD SET_TYPE_PROP(Co2InjectionFlashEcfvProblem, Scalar, quad); + +// the default linear solver used for this problem (-> AMG) cannot be used with quadruple +// precision scalars... (this seems to only apply to Dune >= 2.4) +SET_TAG_PROP(Co2InjectionFlashEcfvProblem, LinearSolverSplice, ParallelIterativeLinearSolver); #else SET_SCALAR_PROP(Co2InjectionFlashEcfvProblem, NewtonRawTolerance, 1e-5); #endif diff --git a/examples/co2injection_flash_ni_ecfv.cpp b/examples/co2injection_flash_ni_ecfv.cpp index 972a2bdf2..b30946b71 100644 --- a/examples/co2injection_flash_ni_ecfv.cpp +++ b/examples/co2injection_flash_ni_ecfv.cpp @@ -49,6 +49,10 @@ SET_TYPE_PROP( // else we increase the tolerance of the Newton solver #if HAVE_QUAD SET_TYPE_PROP(Co2InjectionFlashNiEcfvProblem, Scalar, quad); + +// the default linear solver used for this problem (-> AMG) cannot be used with quadruple +// precision scalars... (this seems to only apply to Dune >= 2.4) +SET_TAG_PROP(Co2InjectionFlashNiEcfvProblem, LinearSolverSplice, ParallelIterativeLinearSolver); #else SET_SCALAR_PROP(Co2InjectionFlashNiEcfvProblem, NewtonRawTolerance, 1e-5); #endif diff --git a/examples/co2injection_flash_ni_vcfv.cpp b/examples/co2injection_flash_ni_vcfv.cpp index ed9b720a5..6e62c282e 100644 --- a/examples/co2injection_flash_ni_vcfv.cpp +++ b/examples/co2injection_flash_ni_vcfv.cpp @@ -49,6 +49,10 @@ SET_TYPE_PROP( // else we increase the tolerance of the Newton solver #if HAVE_QUAD SET_TYPE_PROP(Co2InjectionFlashNiVcfvProblem, Scalar, quad); + +// the default linear solver used for this problem (-> AMG) cannot be used with quadruple +// precision scalars... (this seems to only apply to Dune >= 2.4) +SET_TAG_PROP(Co2InjectionFlashNiVcfvProblem, LinearSolverSplice, ParallelIterativeLinearSolver); #else SET_SCALAR_PROP(Co2InjectionFlashNiVcfvProblem, NewtonRawTolerance, 1e-5); #endif diff --git a/examples/co2injection_flash_vcfv.cpp b/examples/co2injection_flash_vcfv.cpp index a39f4996d..70af65c32 100644 --- a/examples/co2injection_flash_vcfv.cpp +++ b/examples/co2injection_flash_vcfv.cpp @@ -50,6 +50,10 @@ SET_TYPE_PROP( // else we increase the tolerance of the Newton solver #if HAVE_QUAD SET_TYPE_PROP(Co2InjectionFlashVcfvProblem, Scalar, quad); + +// the default linear solver used for this problem (-> AMG) cannot be used with quadruple +// precision scalars... (this seems to only apply to Dune >= 2.4) +SET_TAG_PROP(Co2InjectionFlashVcfvProblem, LinearSolverSplice, ParallelIterativeLinearSolver); #else SET_SCALAR_PROP(Co2InjectionFlashVcfvProblem, NewtonRawTolerance, 1e-5); #endif