[cig-commits] r13977 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Jan 28 09:05:03 PST 2009


Author: luis
Date: 2009-01-28 09:05:03 -0800 (Wed, 28 Jan 2009)
New Revision: 13977

Modified:
   cs/cigma/trunk/src/core_writers.cpp
   cs/cigma/trunk/src/core_writers.h
Log:
Added overwrite mode to WriteMeshPart

Modified: cs/cigma/trunk/src/core_writers.cpp
===================================================================
--- cs/cigma/trunk/src/core_writers.cpp	2009-01-28 17:05:02 UTC (rev 13976)
+++ cs/cigma/trunk/src/core_writers.cpp	2009-01-28 17:05:03 UTC (rev 13977)
@@ -81,7 +81,7 @@
     throw cigma::Exception("WriteElementBlock", "Need implementation");
 }
 
-void cigma::WriteMeshPart(const DataPath& path, shared_ptr<MeshPart> M)
+void cigma::WriteMeshPart(const DataPath& path, shared_ptr<MeshPart> M, bool overwrite)
 {
     TRI_LOG_STR("cigma::WriteMeshPart()");
     TRI_LOG(path);
@@ -95,7 +95,7 @@
         int status;
 
         HDF5_Writer *h5 = static_cast<HDF5_Writer*>(&(*writer));
-        h5->setOverwriteMode(false);
+        h5->setOverwriteMode(overwrite);
 
         string loc;
         if (location == "") { loc = "/mesh"; }

Modified: cs/cigma/trunk/src/core_writers.h
===================================================================
--- cs/cigma/trunk/src/core_writers.h	2009-01-28 17:05:02 UTC (rev 13976)
+++ cs/cigma/trunk/src/core_writers.h	2009-01-28 17:05:03 UTC (rev 13977)
@@ -17,7 +17,7 @@
     void WriteArray(const DataPath& path, const cigma::array<double>& x, bool overwrite=false);
     void WriteNodeCoordinates(const DataPath& path, boost::shared_ptr<NodeCoordinates> nc);
     void WriteElementBlock(const DataPath& path, boost::shared_ptr<ElementBlock> eb);
-    void WriteMeshPart(const DataPath& path, boost::shared_ptr<MeshPart> M);
+    void WriteMeshPart(const DataPath& path, boost::shared_ptr<MeshPart> M, bool overwrite=false);
     void WriteQuadrature(const DataPath& path, boost::shared_ptr<Quadrature> Q, bool overwrite=false);
     void WriteQPoints(const DataPath& path, const cigma::array<double>& w, const cigma::array<double>& x, bool overwrite=false);
     void WriteDofs(const DataPath& path, boost::shared_ptr<DofHandler> dofs);



More information about the CIG-COMMITS mailing list