[cig-commits] r17273 - short/3D/PyLith/trunk/libsrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Thu Oct 14 12:52:43 PDT 2010
Author: brad
Date: 2010-10-14 12:52:43 -0700 (Thu, 14 Oct 2010)
New Revision: 17273
Modified:
short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc
Log:
Added some debugging output.
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc 2010-10-14 16:44:32 UTC (rev 17272)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc 2010-10-14 19:52:43 UTC (rev 17273)
@@ -109,7 +109,6 @@
typedef ALE::OrientedConeSectionV<typename mesh_type::SieveMesh::sieve_type> oriented_cones_wrapper_type;
Obj<oriented_cones_wrapper_type> cones = new oriented_cones_wrapper_type(sieveMesh->getSieve());
-#if 1
// Hack right now, move to HDF5 Section viewer
err = PetscMalloc(sizeof(PetscScalar)*cones->size(), &tmpVertices);CHECK_PETSC_ERROR(err);
for(int p = sieveMesh->getSieve()->getChart().min(), i = 0; p < sieveMesh->getSieve()->getChart().max(); ++p) {
@@ -124,7 +123,6 @@
err = VecView(elemVec, _viewer);CHECK_PETSC_ERROR(err);
err = VecDestroy(elemVec);CHECK_PETSC_ERROR(err);
err = PetscFree(tmpVertices);CHECK_PETSC_ERROR(err);
-#endif
} catch (const std::exception& err) {
std::ostringstream msg;
msg << "Error while preparing for writing data to HDF5 file "
@@ -209,7 +207,18 @@
field.createVector();
vector = field.vector();
}
- // TODO: Create scatter if necessary
+
+#if 1 // TEMPORARY DEBUGGING
+ field.view("CELL FIELD");
+ const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = field.mesh().sieveMesh();
+ assert(!sieveMesh.isNull());
+ const ALE::Obj<typename mesh_type::RealSection>& section = field.section();
+ assert(!section.isNull());
+ const ALE::Obj<typename mesh_type::SieveMesh::order_type>& globalOrder = sieveMesh->getFactory()->getGlobalOrder(sieveMesh, section->getName(), section);
+ std::cout << "GLOBAL ORDER LOCAL SIZE: " << globalOrder->getLocalSize() << std::endl;
+
+#endif
+ // TODO: Create scatter only if necessary
field.createScatter();
field.scatterSectionToVector();
More information about the CIG-COMMITS
mailing list