[cig-commits] r17917 - in short/3D/PyLith/trunk: libsrc/meshio libsrc/topology pylith/perf tests/topology
brad at geodynamics.org
brad at geodynamics.org
Sat Feb 19 22:38:23 PST 2011
Author: brad
Date: 2011-02-19 22:38:23 -0800 (Sat, 19 Feb 2011)
New Revision: 17917
Modified:
short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
short/3D/PyLith/trunk/libsrc/topology/Distributor.cc
short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc
short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py
short/3D/PyLith/trunk/tests/topology/test_meshmem.py
Log:
Fixed inconsistency in stages for memory model.
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2011-02-20 05:31:15 UTC (rev 17916)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2011-02-20 06:38:23 UTC (rev 17917)
@@ -213,7 +213,7 @@
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
///logger.setDebug(2);
- logger.stagePush("Labels");
+ logger.stagePush("MeshLabels");
const ALE::Obj<SieveMesh::label_type>& labelMaterials =
sieveMesh->createLabel("material-id");
if (!sieveMesh->commRank()) {
@@ -311,7 +311,7 @@
} // if
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- logger.stagePush("IntSections");
+ logger.stagePush("MeshIntSections");
const ALE::Obj<IntSection>& groupField = sieveMesh->getIntSection(name);
assert(!groupField.isNull());
Modified: short/3D/PyLith/trunk/libsrc/topology/Distributor.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Distributor.cc 2011-02-20 05:31:15 UTC (rev 17916)
+++ short/3D/PyLith/trunk/libsrc/topology/Distributor.cc 2011-02-20 06:38:23 UTC (rev 17917)
@@ -268,7 +268,7 @@
}
logger.stagePop();
- logger.stagePush("IntSections");
+ logger.stagePush("MeshIntSections");
if (origSieveMesh->getIntSections()->size() > 0) {
ALE::Obj<std::set<std::string> > names = origSieveMesh->getIntSections();
@@ -305,7 +305,7 @@
throw std::logic_error("Need to distribute more arrow sections");
logger.stagePop();
- logger.stagePush("Labels");
+ logger.stagePush("MeshLabels");
// Distribute labels
info << journal::at(__HERE__)
Modified: short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc 2011-02-20 05:31:15 UTC (rev 17916)
+++ short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc 2011-02-20 06:38:23 UTC (rev 17917)
@@ -205,12 +205,12 @@
_calcNewOverlap(newMesh, mesh, refiner);
logger.stagePop();
- logger.stagePush("IntSections");
+ logger.stagePush("MeshIntSections");
_createIntSections(newMesh, mesh, refiner);
logger.stagePop();
- logger.stagePush("Labels");
+ logger.stagePush("MeshLabels");
_createLabels(newMesh, mesh, refiner);
Modified: short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py 2011-02-20 05:31:15 UTC (rev 17916)
+++ short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py 2011-02-20 06:38:23 UTC (rev 17917)
@@ -75,7 +75,7 @@
mesh.numVertices(), mesh.numCells())
meshModel.tabulate(self.memory[stage])
for group, nvertices in mesh.groupSizes():
- self.logVertexGroup('IntSections', group, nvertices, mesh.numVertices())
+ self.logVertexGroup(stage, group, nvertices, mesh.numVertices())
return
@@ -85,10 +85,13 @@
"""
import pylith.perf.VertexGroup
- if not stage in self.memory: self.memory[stage] = {}
+ if not stage in self.memory:
+ self.memory[stage] = {}
+ if not 'IntSections' in self.memory[stage]:
+ self.memory[stage]['IntSections'] = {}
groupModel = pylith.perf.VertexGroup.VertexGroup(label, nvertices,
nMeshVertices)
- groupModel.tabulate(self.memory[stage])
+ groupModel.tabulate(self.memory[stage]['IntSections'])
return
@@ -98,10 +101,13 @@
"""
import pylith.perf.Material
- if not stage in self.memory: self.memory[stage] = {}
+ if not stage in self.memory:
+ self.memory[stage] = {}
+ if not 'Labels' in self.memory[stage]:
+ self.memory[stage]['Labels'] = {}
materialModel = pylith.perf.Material.Material(material.label(),
material.ncells)
- materialModel.tabulate(self.memory[stage])
+ materialModel.tabulate(self.memory[stage]['Labels'])
return
Modified: short/3D/PyLith/trunk/tests/topology/test_meshmem.py
===================================================================
--- short/3D/PyLith/trunk/tests/topology/test_meshmem.py 2011-02-20 05:31:15 UTC (rev 17916)
+++ short/3D/PyLith/trunk/tests/topology/test_meshmem.py 2011-02-20 06:38:23 UTC (rev 17917)
@@ -92,7 +92,7 @@
self.logger.logMesh("Mesh", mesh)
material.ncells = MeshOps_numMaterialCells(mesh, material.id())
- self.logger.logMaterial("Labels", material)
+ self.logger.logMaterial("Mesh", material)
self._showStatus("After reading mesh")
@@ -122,7 +122,7 @@
self.logger.logMesh("Mesh", dmesh)
material.ncells = MeshOps_numMaterialCells(dmesh, material.id())
- self.logger.logMaterial("Labels", material)
+ self.logger.logMaterial("Mesh", material)
self._showStatus("After distributing mesh")
@@ -138,7 +138,7 @@
self.logger.logMesh("Mesh", rmesh)
material.ncells = MeshOps_numMaterialCells(rmesh, material.id())
- self.logger.logMaterial("Labels", material)
+ self.logger.logMaterial("Mesh", material)
self._showStatus("After refining mesh")
More information about the CIG-COMMITS
mailing list