From feb5548931cc8f0674aecde8d9d30411de7b170b Mon Sep 17 00:00:00 2001 From: akva Date: Tue, 31 May 2011 13:25:10 +0000 Subject: [PATCH] added: ability to specify which patch to dump the basis for will be useful when storing the geometry within the HDF5 file git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1018 e10b68d5-8a6e-419e-a041-bce267b0401d --- src/SIM/SIMbase.C | 6 ++++-- src/SIM/SIMbase.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SIM/SIMbase.C b/src/SIM/SIMbase.C index 42b6b952..821e7520 100644 --- a/src/SIM/SIMbase.C +++ b/src/SIM/SIMbase.C @@ -1364,9 +1364,11 @@ bool SIMbase::dumpGeometry (std::ostream& os) const } -bool SIMbase::dumpBasis (std::ostream& os, int basis) const +bool SIMbase::dumpBasis (std::ostream& os, int basis, size_t patch) const { - for (size_t i = 0; i < myModel.size(); i++) + size_t start = patch?patch-1:0; + size_t end = patch?start+1:myModel.size(); + for (size_t i = start; i < end; i++) if (!myModel[i]->empty()) if (!myModel[i]->write(os,basis)) return false; diff --git a/src/SIM/SIMbase.h b/src/SIM/SIMbase.h index 717d1984..40e358c7 100644 --- a/src/SIM/SIMbase.h +++ b/src/SIM/SIMbase.h @@ -344,7 +344,8 @@ public: //! \brief Dumps the (possibly refined) spline basis in g2-format. //! \param os Output stream to write the spline data to //! \param[in] basis Which basis to dump for mixed methods (0 = geometry) - bool dumpBasis(std::ostream& os, int basis = 0) const; + //! \param[in] patch Which patch to dump for (0 = all) + bool dumpBasis(std::ostream& os, int basis = 0, size_t patch=0) const; //! \brief Dumps the entire solution in ASCII format. //! \param[in] psol Primary solution vector to derive other quantities from //! \param os Output stream to write the solution data to