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 };