[cig-commits] [commit] next: DM: Turn on viewing by options (5df3a1d)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Jan 14 07:52:56 PST 2015


Repository : https://github.com/geodynamics/pylith

On branch  : next
Link       : https://github.com/geodynamics/pylith/compare/c123763d436f8c5aef87fd3db587aa91f85d692a...af3aa353d3c5d366db820bb47495c339157af164

>---------------------------------------------------------------

commit 5df3a1d01eb6603245496d03d6d708cdbd11262c
Author: Matthew G. Knepley <knepley at gmail.com>
Date:   Wed Jan 14 09:51:29 2015 -0600

    DM: Turn on viewing by options


>---------------------------------------------------------------

5df3a1d01eb6603245496d03d6d708cdbd11262c
 libsrc/pylith/meshio/MeshIO.cc    | 2 ++
 libsrc/pylith/topology/MeshOps.cc | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/libsrc/pylith/meshio/MeshIO.cc b/libsrc/pylith/meshio/MeshIO.cc
index 0ff3501..9c1422d 100644
--- a/libsrc/pylith/meshio/MeshIO.cc
+++ b/libsrc/pylith/meshio/MeshIO.cc
@@ -80,6 +80,8 @@ pylith::meshio::MeshIO::read(topology::Mesh* mesh)
 
   // Check mesh consistency
   topology::MeshOps::checkTopology(*_mesh);
+  // Respond to PETSc diagnostic output
+  PetscErrorCode err = DMViewFromOptions(_mesh->dmMesh(), "pylith_", "-dm_view");PYLITH_CHECK_ERROR(err);
 
   _mesh = 0;
 
diff --git a/libsrc/pylith/topology/MeshOps.cc b/libsrc/pylith/topology/MeshOps.cc
index 93d01eb..c83c38f 100644
--- a/libsrc/pylith/topology/MeshOps.cc
+++ b/libsrc/pylith/topology/MeshOps.cc
@@ -71,6 +71,7 @@ pylith::topology::MeshOps::nondimensionalize(Mesh* const mesh,
   // There does not seem to be an advantage to calling nondimensionalize()
   err = VecScale(coordVec, 1.0/lengthScale);PYLITH_CHECK_ERROR(err);
   err = DMPlexSetScale(dmMesh, PETSC_UNIT_LENGTH, lengthScale);PYLITH_CHECK_ERROR(err);
+  err = DMViewFromOptions(dmMesh, "pylith_final_", "-dm_view");PYLITH_CHECK_ERROR(err);
 
   PYLITH_METHOD_END;
 } // nondimensionalize
@@ -95,6 +96,7 @@ pylith::topology::MeshOps::checkTopology(const Mesh& mesh)
   PetscInt cellHeight = subpointMap ? 1 : 0;
 
   PetscErrorCode err;
+  err = DMViewFromOptions(dmMesh, "pylith_check_", "-dm_view");PYLITH_CHECK_ERROR(err);
   err = DMPlexCheckSymmetry(dmMesh);PYLITH_CHECK_ERROR_MSG(err, "Error in topology of mesh associated with symmetry of adjacency information.");
 
   err = DMPlexCheckSkeleton(dmMesh, isSimplexMesh, cellHeight);PYLITH_CHECK_ERROR_MSG(err, "Error in topology of mesh cells.");



More information about the CIG-COMMITS mailing list