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
This commit is contained in:
akva
2011-05-31 13:25:10 +00:00
committed by Knut Morten Okstad
parent 7c115ebb26
commit feb5548931
2 changed files with 6 additions and 3 deletions

View File

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

View File

@@ -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