[cig-commits] r18009 - in short/3D/PyLith/trunk: libsrc/topology pylith/feassemble pylith/materials
brad at geodynamics.org
brad at geodynamics.org
Wed Mar 2 17:47:07 PST 2011
Author: brad
Date: 2011-03-02 17:47:07 -0800 (Wed, 02 Mar 2011)
New Revision: 18009
Modified:
short/3D/PyLith/trunk/libsrc/topology/MeshOps.cc
short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py
short/3D/PyLith/trunk/pylith/materials/Material.py
Log:
Merge from trunk.
Modified: short/3D/PyLith/trunk/libsrc/topology/MeshOps.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/MeshOps.cc 2011-03-03 01:45:04 UTC (rev 18008)
+++ short/3D/PyLith/trunk/libsrc/topology/MeshOps.cc 2011-03-03 01:47:07 UTC (rev 18009)
@@ -33,7 +33,8 @@
// ----------------------------------------------------------------------
int
-pylith::topology::MeshOps::numMaterialCells(const Mesh& mesh, int materialId)
+pylith::topology::MeshOps::numMaterialCells(const Mesh& mesh,
+ int materialId)
{ // numMaterialCells
int ncells = 0;
@@ -47,6 +48,7 @@
} // numMaterialCells
+// ----------------------------------------------------------------------
void
pylith::topology::MeshOps::checkMaterialIds(const Mesh& mesh,
int* const materialIds,
Modified: short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py 2011-03-03 01:45:04 UTC (rev 18008)
+++ short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py 2011-03-03 01:47:07 UTC (rev 18009)
@@ -76,6 +76,7 @@
self._eventLogger.eventBegin(logEvent)
Integrator.verifyConfiguration(self)
+ self.materialObj.verifyConfiguration()
if self.mesh.dimension() != self.materialObj.dimension():
raise ValueError("Mesh dimension is '%d' but material '%s' of type " \
Modified: short/3D/PyLith/trunk/pylith/materials/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Material.py 2011-03-03 01:45:04 UTC (rev 18008)
+++ short/3D/PyLith/trunk/pylith/materials/Material.py 2011-03-03 01:47:07 UTC (rev 18009)
@@ -125,18 +125,25 @@
logEvent = "%sverify" % self._loggingPrefix
self._eventLogger.eventBegin(logEvent)
- if self.quadrature.cellDim != self.mesh.dimension() or \
- self.quadrature.spaceDim != self.mesh.coordsys.spaceDim():
+ print "REFERENCE CELL #corners: ", self.quadrature.cell.numCorners
+ print "MESH #corners: ", self.mesh.coneSize()
+ if self.quadrature.cellDim() != self.mesh.dimension() or \
+ self.quadrature.spaceDim() != self.mesh.coordsys().spaceDim() or \
+ self.quadrature.cell.numCorners != self.mesh.coneSize():
raise ValueError, \
"Quadrature scheme for material '%s' and mesh are incompatible.\n" \
- "Quadrature cell dimension: %d\n" \
- "Quadrature spatial dimension: %d\n" \
- "Mesh cell dimension: %d\n" \
- "Mesh spatial dimension: %d" % \
+ " Quadrature reference cell:\n" \
+ " dimension: %d\n" \
+ " spatial dimension: %d\n" \
+ " number of corners: %d\n" \
+ " Mesh cells:\n" \
+ " dimension: %d\n" \
+ " spatial dimension: %d\n" \
+ " number of corners: %d" % \
(self.label(),
- self.quadrature.cellDim, self.quadrature.spaceDim,
- self.mesh.dimension(), self.mesh.coordsys().spaceDim())
-
+ self.quadrature.cellDim(), self.quadrature.spaceDim(),
+ self.mesh.dimension(), self.mesh.coordsys().spaceDim(),
+ self.quadrature.cell.numCorners, self.mesh.coneSize())
self._eventLogger.eventEnd(logEvent)
return
More information about the CIG-COMMITS
mailing list