[cig-commits] r17966 - in short/3D/PyLith/branches/pylith-scecdynrup: . libsrc/meshio pylith/topology
brad at geodynamics.org
brad at geodynamics.org
Wed Feb 23 15:30:33 PST 2011
Author: brad
Date: 2011-02-23 15:30:32 -0800 (Wed, 23 Feb 2011)
New Revision: 17966
Modified:
short/3D/PyLith/branches/pylith-scecdynrup/configure.ac
short/3D/PyLith/branches/pylith-scecdynrup/libsrc/meshio/MeshIOCubit.cc
short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/Distributor.py
short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/MeshImporter.py
short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/RefineUniform.py
Log:
Merge from trunk.
Modified: short/3D/PyLith/branches/pylith-scecdynrup/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/configure.ac 2011-02-23 23:29:19 UTC (rev 17965)
+++ short/3D/PyLith/branches/pylith-scecdynrup/configure.ac 2011-02-23 23:30:32 UTC (rev 17966)
@@ -147,6 +147,9 @@
CIT_NUMPY_PYTHON_MODULE
CIT_NUMPY_INCDIR
+# FIAT
+CIT_PYTHON_MODULE([FIAT],[0.9.9])
+
# SWIG
if test "$enable_swig" = "yes" ; then
AC_PROG_SWIG(1.3.33)
Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/meshio/MeshIOCubit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/meshio/MeshIOCubit.cc 2011-02-23 23:29:19 UTC (rev 17965)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/meshio/MeshIOCubit.cc 2011-02-23 23:30:32 UTC (rev 17966)
@@ -63,7 +63,8 @@
void
pylith::meshio::MeshIOCubit::_read(void)
{ // _read
- MPI_Comm comm = _mesh->comm();
+ assert(_mesh);
+
int rank = 0;
int meshDim = 0;
int spaceDim = 0;
@@ -74,7 +75,7 @@
int_array cells;
int_array materialIds;
- MPI_Comm_rank(comm, &rank);
+ MPI_Comm_rank(_mesh->comm(), &rank);
if (0 == rank) {
try {
NcFile ncfile(_filename.c_str());
Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/Distributor.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/Distributor.py 2011-02-23 23:29:19 UTC (rev 17965)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/Distributor.py 2011-02-23 23:30:32 UTC (rev 17966)
@@ -81,6 +81,7 @@
from pylith.topology.Mesh import Mesh
newMesh = Mesh(mesh.dimension())
ModuleDistributor.distribute(newMesh, mesh, self.partitioner)
+ mesh.deallocate()
if self.writePartition:
self.dataWriter.initialize(normalizer)
Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/MeshImporter.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/MeshImporter.py 2011-02-23 23:29:19 UTC (rev 17965)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/MeshImporter.py 2011-02-23 23:30:32 UTC (rev 17966)
@@ -123,13 +123,15 @@
mesh.view("Distributed mesh.")
# Refine mesh (if necessary)
- mesh = self.refiner.refine(mesh)
+ newMesh = self.refiner.refine(mesh)
+ if not newMesh == mesh:
+ mesh.deallocate()
# Nondimensionalize mesh (coordinates of vertices).
- mesh.nondimensionalize(normalizer)
+ newMesh.nondimensionalize(normalizer)
self._eventLogger.eventEnd(logEvent)
- return mesh
+ return newMesh
# PRIVATE METHODS ////////////////////////////////////////////////////
Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/RefineUniform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/RefineUniform.py 2011-02-23 23:29:19 UTC (rev 17965)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/topology/RefineUniform.py 2011-02-23 23:30:32 UTC (rev 17966)
@@ -67,10 +67,9 @@
newMesh.debug(mesh.debug())
newMesh.coordsys(mesh.coordsys())
ModuleRefineUniform.refine(self, newMesh, mesh, self.levels)
+ if not newMesh == mesh:
+ mesh.deallocate()
- if mesh != newMesh:
- mesh.deallocate();
-
self._eventLogger.eventEnd(logEvent)
return newMesh
More information about the CIG-COMMITS
mailing list