diff --git a/opm/autodiff/NewtonIterationBlackoilCPR.cpp b/opm/autodiff/NewtonIterationBlackoilCPR.cpp index 80933b2b7..de76309a0 100644 --- a/opm/autodiff/NewtonIterationBlackoilCPR.cpp +++ b/opm/autodiff/NewtonIterationBlackoilCPR.cpp @@ -234,6 +234,10 @@ namespace Opm return dx; } + const boost::any& NewtonIterationBlackoilCPR::parallelInformation() const + { + return parallelInformation_; + } diff --git a/opm/autodiff/NewtonIterationBlackoilCPR.hpp b/opm/autodiff/NewtonIterationBlackoilCPR.hpp index 58a19989d..e97a56408 100644 --- a/opm/autodiff/NewtonIterationBlackoilCPR.hpp +++ b/opm/autodiff/NewtonIterationBlackoilCPR.hpp @@ -71,6 +71,11 @@ namespace Opm /// \copydoc NewtonIterationBlackoilInterface::iterations virtual int iterations () const { return iterations_; } + /// \copydoc NewtonIterationBlackoilInterface::parallelInformation + virtual const boost::any& parallelInformation() const; + + private: + /// \brief construct the CPR preconditioner and the solver. /// \tparam P The type of the parallel information. /// \param parallelInformation the information about the parallelization. @@ -99,7 +104,6 @@ namespace Opm linsolve.apply(x, istlb, result); } - private: mutable int iterations_; double cpr_relax_; unsigned int cpr_ilu_n_; diff --git a/opm/autodiff/NewtonIterationBlackoilInterface.hpp b/opm/autodiff/NewtonIterationBlackoilInterface.hpp index 2e26db07e..ffe886153 100644 --- a/opm/autodiff/NewtonIterationBlackoilInterface.hpp +++ b/opm/autodiff/NewtonIterationBlackoilInterface.hpp @@ -23,6 +23,7 @@ #include +#include namespace Opm { @@ -42,6 +43,10 @@ namespace Opm /// \return number of linear iterations used during last call of computeNewtonIncrement virtual int iterations () const = 0; + + + /// \brief Get the information about the parallelization of the grid. + virtual const boost::any& parallelInformation() const = 0; }; } // namespace Opm diff --git a/opm/autodiff/NewtonIterationBlackoilSimple.cpp b/opm/autodiff/NewtonIterationBlackoilSimple.cpp index b976680b4..3817d94b9 100644 --- a/opm/autodiff/NewtonIterationBlackoilSimple.cpp +++ b/opm/autodiff/NewtonIterationBlackoilSimple.cpp @@ -74,5 +74,9 @@ namespace Opm return dx; } + const boost::any& NewtonIterationBlackoilSimple::parallelInformation() const + { + return parallelInformation_; + } } // namespace Opm diff --git a/opm/autodiff/NewtonIterationBlackoilSimple.hpp b/opm/autodiff/NewtonIterationBlackoilSimple.hpp index 20cd484c4..5f530f10c 100644 --- a/opm/autodiff/NewtonIterationBlackoilSimple.hpp +++ b/opm/autodiff/NewtonIterationBlackoilSimple.hpp @@ -55,6 +55,9 @@ namespace Opm /// \copydoc NewtonIterationBlackoilInterface::iterations virtual int iterations () const { return iterations_; } + /// \copydoc NewtonIterationBlackoilInterface::parallelInformation + virtual const boost::any& parallelInformation() const; + private: std::unique_ptr linsolver_; mutable int iterations_;