[cig-commits] [commit] knepley/upgrade-petsc-interface: VTK: Did not clear label before writing (99cb2e2)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Nov 8 15:00:52 PST 2013
Repository : ssh://geoshell/pylith
On branch : knepley/upgrade-petsc-interface
Link : https://github.com/geodynamics/pylith/compare/38bd3211afca7b7cd3c34e27e582f695f98327b9...44a899ad4662f73e26966c1cf40ca2eb5790ee6e
>---------------------------------------------------------------
commit 99cb2e225b7e4d518846cab0b5b766901f8ac966
Author: Matthew G. Knepley <knepley at gmail.com>
Date: Fri Nov 8 17:02:01 2013 -0600
VTK: Did not clear label before writing
>---------------------------------------------------------------
99cb2e225b7e4d518846cab0b5b766901f8ac966
libsrc/pylith/meshio/DataWriterVTK.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libsrc/pylith/meshio/DataWriterVTK.cc b/libsrc/pylith/meshio/DataWriterVTK.cc
index 2743b27..b828bd7 100644
--- a/libsrc/pylith/meshio/DataWriterVTK.cc
+++ b/libsrc/pylith/meshio/DataWriterVTK.cc
@@ -204,9 +204,13 @@ pylith::meshio::DataWriterVTK::openTimeStep(const PylithScalar t,
topology::StratumIS cellsIS(_dm, label, labelId);
const PetscInt ncells = cellsIS.size();
const PetscInt* cells = cellsIS.points();
+ DMLabel label;
+ err = DMPlexCreateLabel(_dm, "vtk");PYLITH_CHECK_ERROR(err);
+ err = DMPlexGetLabel(_dm, "vtk", &label);PYLITH_CHECK_ERROR(err);
+ err = DMLabelClearStratum(label, 1);PYLITH_CHECK_ERROR(err);
for (PetscInt c=0; c < ncells; ++c) {
- err = DMPlexSetLabelValue(_dm, "vtk", cells[c], 1);PYLITH_CHECK_ERROR(err);
+ err = DMLabelSetValue(label, cells[c], 1);PYLITH_CHECK_ERROR(err);
} // for
} // if
More information about the CIG-COMMITS
mailing list