From 16eada702871cbf0dc33d984d619fb9a0e7cf237 Mon Sep 17 00:00:00 2001 From: akva Date: Fri, 25 Feb 2011 10:37:30 +0000 Subject: [PATCH] fixed: encapsulate LinSolParams git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@844 e10b68d5-8a6e-419e-a041-bce267b0401d --- src/SIM/SIMbase.C | 6 ++++++ src/SIM/SIMbase.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/SIM/SIMbase.C b/src/SIM/SIMbase.C index ead47ead..61f45ed1 100644 --- a/src/SIM/SIMbase.C +++ b/src/SIM/SIMbase.C @@ -1257,3 +1257,9 @@ bool SIMbase::dumpSolution (const Vector& psol, std::ostream& os) const return true; } + +void SIMbase::readLinSolParams(std::istream& is, int npar) +{ + if (!mySolParams) mySolParams = new LinSolParams(); + mySolParams->read(is,npar); +} diff --git a/src/SIM/SIMbase.h b/src/SIM/SIMbase.h index 1ca6c589..6a6173e3 100644 --- a/src/SIM/SIMbase.h +++ b/src/SIM/SIMbase.h @@ -329,6 +329,9 @@ protected: //! \param[in] sol Global primary solution vectors in DOF-order void extractPatchSolution(const ASMbase* patch, const Vectors& sol); + //! \brief Read a LinSolParams from the given stream. + //! This method helps with encapsulating PETSc in libIFEM + void readLinSolParams(std::istream& is, int npar); public: //! \brief Enum defining the available discretization methods. enum Discretization { Spline, Lagrange, Spectral };