[cig-commits] r7297 - in short/3D/PyLith/trunk: pylith/bc pylith/faults pylith/feassemble/quadrature pylith/materials pylith/meshio pylith/solver pylith/topology unittests/pytests/bc unittests/pytests/faults unittests/pytests/feassemble unittests/pytests/materials unittests/pytests/meshio unittests/pytests/topology

brad at geodynamics.org brad at geodynamics.org
Tue Jun 19 00:05:30 PDT 2007


Author: brad
Date: 2007-06-19 00:05:27 -0700 (Tue, 19 Jun 2007)
New Revision: 7297

Modified:
   short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py
   short/3D/PyLith/trunk/pylith/bc/Dirichlet.py
   short/3D/PyLith/trunk/pylith/faults/BruneSlipFn.py
   short/3D/PyLith/trunk/pylith/faults/EqKinSrc.py
   short/3D/PyLith/trunk/pylith/faults/Fault.py
   short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature0D.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1D.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din2D.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din3D.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2D.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2Din3D.py
   short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature3D.py
   short/3D/PyLith/trunk/pylith/materials/ElasticIsotropic3D.py
   short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py
   short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStress.py
   short/3D/PyLith/trunk/pylith/materials/ElasticStrain1D.py
   short/3D/PyLith/trunk/pylith/materials/ElasticStress1D.py
   short/3D/PyLith/trunk/pylith/materials/Material.py
   short/3D/PyLith/trunk/pylith/materials/MaxwellIsotropic3D.py
   short/3D/PyLith/trunk/pylith/meshio/MeshIOAscii.py
   short/3D/PyLith/trunk/pylith/meshio/MeshIOCubit.py
   short/3D/PyLith/trunk/pylith/meshio/MeshIOLagrit.py
   short/3D/PyLith/trunk/pylith/meshio/SolutionIO.py
   short/3D/PyLith/trunk/pylith/meshio/SolutionIOVTK.py
   short/3D/PyLith/trunk/pylith/solver/SolverLinear.py
   short/3D/PyLith/trunk/pylith/topology/Distributor.py
   short/3D/PyLith/trunk/pylith/topology/Mesh.py
   short/3D/PyLith/trunk/pylith/topology/MeshGenSimple.py
   short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestBruneSlipFn.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestEqKinSrc.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestQuadrature.py
   short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticIsotropic3D.py
   short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStrain.py
   short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStress.py
   short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStrain1D.py
   short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStress1D.py
   short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py
   short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py
   short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOCubit.py
   short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOLagrit.py
   short/3D/PyLith/trunk/unittests/pytests/topology/TestMesh.py
Log:
Moved creation of C++ handles out of __init__ for configurable (Pyre) objects. This prevents creation of C++ objects during configuration. Updated Python unit tests to account for change.

Modified: short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -81,7 +81,8 @@
     """
     Initialize boundary condition.
     """
-    assert(None != self.cppHandle)
+    self._createCppHandle()
+    
     self.db.initialize()
     self.cppHandle.id = self.id
     self.cppHandle.label = self.label
@@ -103,5 +104,13 @@
     self.db = self.inventory.db
     return
 
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    raise NotImplementedError("Please implement _createCppHandle() in " \
+                              "derived class.")
   
+  
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/bc/Dirichlet.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/Dirichlet.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/bc/Dirichlet.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -78,8 +78,6 @@
     BoundaryCondition.__init__(self, name)
     Constraint.__init__(self)
     self.fixedDOF = []
-    import pylith.bc.bc as bindings
-    self.cppHandle = bindings.Dirichlet()
     return
 
 
@@ -87,7 +85,8 @@
     """
     Initialize Dirichlet boundary condition.
     """
-    assert(None != self.cppHandle)
+    self._createCppHandle()
+
     self.cppHandle.fixedDOF = self.fixedDOF    
     BoundaryCondition.initialize(self, mesh)
     return
@@ -104,6 +103,16 @@
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.bc.bc as bindings
+      self.cppHandle = bindings.Dirichlet()    
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def boundary_condition():

Modified: short/3D/PyLith/trunk/pylith/faults/BruneSlipFn.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/BruneSlipFn.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/faults/BruneSlipFn.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -79,9 +79,8 @@
     """
     Initialize.
     """
-    import pylith.faults.faults as bindings
-    self.cppHandle = bindings.BruneSlipFn()
-
+    self._createCppHandle()
+      
     SlipTimeFn.initialize(self)
 
     self.slip.initialize()
@@ -107,7 +106,17 @@
     self.slipRate = self.inventory.slipRate
     return
 
+
+  def _createCppHandle(self):
+    """
+    Create handle to C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.faults.faults as bindings
+      self.cppHandle = bindings.BruneSlipFn()
+    return
   
+  
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def slip_time_fn():

Modified: short/3D/PyLith/trunk/pylith/faults/EqKinSrc.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/EqKinSrc.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/faults/EqKinSrc.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -62,8 +62,7 @@
     Constructor.
     """
     Component.__init__(self, name, facility="eqkinsrc")
-    import pylith.faults.faults as bindings
-    self.cppHandle = bindings.EqKinSrc()
+    self.cppHandle = None
     return
 
 
@@ -71,7 +70,7 @@
     """
     Initialize.
     """
-    assert(None != self.cppHandle)
+    self._createCppHandle()
     self.slipfn.initialize()
     self.cppHandle.slipfn = self.slipfn.cppHandle
     return
@@ -88,6 +87,16 @@
     return
 
   
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.faults.faults as bindings
+      self.cppHandle = bindings.EqKinSrc()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def eq_kinematic_src():

Modified: short/3D/PyLith/trunk/pylith/faults/Fault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/Fault.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/faults/Fault.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -129,7 +129,8 @@
     Initialize fault.
     """
     self._info.log("Initializing fault '%s'." % self.label)
-
+    self._createCppHandle()
+    
     self.quadrature.initialize()
 
     faultDim = mesh.dimension() - 1
@@ -163,4 +164,12 @@
     return
 
   
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    raise NotImplementedError("Please implement _createCppHandle() in " \
+                              "derived class.")
+  
+  
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -55,12 +55,11 @@
 
   # PUBLIC METHODS /////////////////////////////////////////////////////
 
-  def _init(self):
+  def __init__(self, name="faultcohesivekin"):
     """
-    
+    Initialize configuration.
     """
-    self.name = "faultcohesivekin"
-    FaultCohesive._init(self)
+    FaultCohesive.__init__(self, name)
     return
 
 
@@ -69,6 +68,8 @@
     Initialize cohesive elements.
     """
     self._info.log("Initializing fault '%s'." % self.label)
+    self._createCppHandle
+    
     self.mesh = mesh
     assert(None != self.cppHandle)
     self.eqsrc.initialize()
@@ -81,7 +82,7 @@
     """
     Set time step for advancing from time t to time t+dt.
     """
-    assert(None != self.cppHandle)
+    self._createCppHandle()
     self.cppHandle.timeStep = dt.value
     return
 
@@ -111,7 +112,7 @@
     Returns true if we need to recompute Jacobian matrix for operator,
     false otherwise.
     """
-    assert(None != self.cppHandle)
+    self._createCppHandle()
     return self.cppHandle.needNewJacobian
 
 
@@ -158,8 +159,9 @@
     """
     Create handle to C++ FaultCohesiveKin.
     """
-    import pylith.faults.faults as bindings
-    self.cppHandle = bindings.FaultCohesiveKin()
+    if None == self.cppHandle:
+      import pylith.faults.faults as bindings
+      self.cppHandle = bindings.FaultCohesiveKin()
     return
     
   

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -71,8 +71,7 @@
     """
     Initialize C++ quadrature object.
     """
-    if self.cppHandle is None:
-      raise ValueError("C++ handle not set.")
+    self._createCppHandle()
     
     self.cppHandle.minJacobian = self.minJacobian
 
@@ -108,4 +107,12 @@
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    raise NotImplementedError("Please implement _createCppHandle() in " \
+                              "derived class.")
+  
+  
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature0D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature0D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature0D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature0D()
     self.spaceDim = 1
     self.cellDim = 0
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature0D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature1D()
     self.spaceDim = 1
     self.cellDim = 1
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature1D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din2D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din2D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din2D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature1Din2D()
     self.spaceDim = 2
     self.cellDim = 1
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature1Din2D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature1Din3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature1Din3D()
     self.spaceDim = 3
     self.cellDim = 1
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature1Din3D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature2D()
     self.spaceDim = 2
     self.cellDim = 2
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature2D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2Din3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2Din3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature2Din3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature2Din3D()
     self.spaceDim = 3
     self.cellDim = 2
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature2Din3D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/feassemble/quadrature/Quadrature3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,13 +33,23 @@
     Constructor.
     """
     Quadrature.__init__(self, name)
-    import pylith.feassemble.feassemble as bindings
-    self.cppHandle = bindings.Quadrature3D()
     self.spaceDim = 3
     self.cellDim = 3
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.feassemble.feassemble as bindings
+      self.cppHandle = bindings.Quadrature3D()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def quadrature():

Modified: short/3D/PyLith/trunk/pylith/materials/ElasticIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticIsotropic3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticIsotropic3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,12 +33,20 @@
     Constructor.
     """
     ElasticMaterial.__init__(self, name)
-    import pylith.materials.materials as bindings
-    self.cppHandle = bindings.ElasticIsotropic3D()
-    self.dimension = self.cppHandle.dimension
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.materials.materials as bindings
+      self.cppHandle = bindings.ElasticIsotropic3D()
+      self.dimension = self.cppHandle.dimension
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def material():

Modified: short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -35,12 +35,20 @@
     Constructor.
     """
     ElasticMaterial.__init__(self, name)
-    import pylith.materials.materials as bindings
-    self.cppHandle = bindings.ElasticPlaneStrain()
-    self.dimension = self.cppHandle.dimension
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.materials.materials as bindings
+      self.cppHandle = bindings.ElasticPlaneStrain()
+      self.dimension = self.cppHandle.dimension
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def material():

Modified: short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStress.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStress.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStress.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -35,12 +35,20 @@
     Constructor.
     """
     ElasticMaterial.__init__(self, name)
-    import pylith.materials.materials as bindings
-    self.cppHandle = bindings.ElasticPlaneStress()
-    self.dimension = self.cppHandle.dimension
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.materials.materials as bindings
+      self.cppHandle = bindings.ElasticPlaneStress()
+      self.dimension = self.cppHandle.dimension
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def material():

Modified: short/3D/PyLith/trunk/pylith/materials/ElasticStrain1D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticStrain1D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticStrain1D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -34,12 +34,20 @@
     Constructor.
     """
     ElasticMaterial.__init__(self, name)
-    import pylith.materials.materials as bindings
-    self.cppHandle = bindings.ElasticStrain1D()
-    self.dimension = self.cppHandle.dimension
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.materials.materials as bindings
+      self.cppHandle = bindings.ElasticStrain1D()
+      self.dimension = self.cppHandle.dimension
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def material():

Modified: short/3D/PyLith/trunk/pylith/materials/ElasticStress1D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticStress1D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticStress1D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -34,12 +34,20 @@
     Constructor.
     """
     ElasticMaterial.__init__(self, name)
-    import pylith.materials.materials as bindings
-    self.cppHandle = bindings.ElasticStress1D()
-    self.dimension = self.cppHandle.dimension
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.materials.materials as bindings
+      self.cppHandle = bindings.ElasticStress1D()
+      self.dimension = self.cppHandle.dimension
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def material():

Modified: short/3D/PyLith/trunk/pylith/materials/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Material.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/Material.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -91,6 +91,7 @@
     Initialize material property manager.
     """
     self._info.log("Initializing material '%s'." % self.label)
+    self._createCppHandle()
 
     if self.dimension != self.quadrature.cell.cellDim:
       raise ValueError, \
@@ -104,7 +105,6 @@
             (mesh.dimension(), self.dimension)
 
     self.db.initialize()
-    assert(None != self.cppHandle)
     self.cppHandle.id = self.id
     self.cppHandle.label = self.label
     self.cppHandle.db = self.db.cppHandle
@@ -127,4 +127,12 @@
     return
 
   
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    raise NotImplementedError("Please implement _createCppHandle() in " \
+                              "derived class.")
+  
+  
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/materials/MaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/MaxwellIsotropic3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/materials/MaxwellIsotropic3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -33,12 +33,20 @@
     Constructor.
     """
     ElasticMaterial.__init__(self, name)
-    import pylith.materials.materials as bindings
-    self.cppHandle = bindings.MaxwellIsotropic3D()
-    self.dimension = self.cppHandle.dimension
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.materials.materials as bindings
+      self.cppHandle = bindings.MaxwellIsotropic3D()
+      self.dimension = self.cppHandle.dimension
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def material():

Modified: short/3D/PyLith/trunk/pylith/meshio/MeshIOAscii.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/MeshIOAscii.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/meshio/MeshIOAscii.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -62,8 +62,6 @@
     Constructor.
     """
     MeshIO.__init__(self, name)
-    import pylith.meshio.meshio as bindings
-    self.cppHandle = bindings.MeshIOAscii()
     return
 
 
@@ -83,6 +81,10 @@
     """
     Force synchronization between Python and C++.
     """
+    if None == self.cppHandle:
+      import pylith.meshio.meshio as bindings
+      self.cppHandle = bindings.MeshIOAscii()
+    
     MeshIO._sync(self)
     self.cppHandle.filename = self.filename
     return

Modified: short/3D/PyLith/trunk/pylith/meshio/MeshIOCubit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/MeshIOCubit.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/meshio/MeshIOCubit.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -61,8 +61,6 @@
     Constructor.
     """
     MeshIO.__init__(self, name)
-    import pylith.meshio.meshio as bindings
-    self.cppHandle = bindings.MeshIOCubit()
     return
 
 
@@ -82,6 +80,10 @@
     """
     Force synchronization between Python and C++.
     """
+    if None == self.cppHandle:
+      import pylith.meshio.meshio as bindings
+      self.cppHandle = bindings.MeshIOCubit()
+
     MeshIO._sync(self)
     self.cppHandle.filename = self.filename
     return

Modified: short/3D/PyLith/trunk/pylith/meshio/MeshIOLagrit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/MeshIOLagrit.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/meshio/MeshIOLagrit.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -70,8 +70,6 @@
     Constructor.
     """
     MeshIO.__init__(self, name)
-    import pylith.meshio.meshio as bindings
-    self.cppHandle = bindings.MeshIOLagrit()
     return
 
 
@@ -92,6 +90,10 @@
     """
     Force synchronization between Python and C++.
     """
+    if None == self.cppHandle:
+      import pylith.meshio.meshio as bindings
+      self.cppHandle = bindings.MeshIOLagrit()
+    
     MeshIO._sync(self)
     self.cppHandle.filenameGmv = self.filenameGmv
     self.cppHandle.filenamePset = self.filenamePset

Modified: short/3D/PyLith/trunk/pylith/meshio/SolutionIO.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/SolutionIO.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/meshio/SolutionIO.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -168,8 +168,17 @@
     """
     Force synchronization between Python and C++.
     """
+    self._createCppHandle()
     self.cppHandle.coordsys = self.coordsys.cppHandle
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    raise NotImplementedError("Please implement _createCppHandle() in " \
+                              "derived class.")
+  
+  
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/meshio/SolutionIOVTK.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/SolutionIOVTK.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/meshio/SolutionIOVTK.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -56,8 +56,6 @@
     Constructor.
     """
     SolutionIO.__init__(self, name)
-    import pylith.meshio.meshio as bindings
-    self.cppHandle = bindings.SolutionIOVTK()
     return
 
 
@@ -81,6 +79,16 @@
     return
   
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.meshio.meshio as bindings
+      self.cppHandle = bindings.SolutionIOVTK()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def solution_io():

Modified: short/3D/PyLith/trunk/pylith/solver/SolverLinear.py
===================================================================
--- short/3D/PyLith/trunk/pylith/solver/SolverLinear.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/solver/SolverLinear.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -48,7 +48,6 @@
     Constructor.
     """
     Solver.__init__(self, name)
-    self.cppHandle = None
     return
 
 
@@ -56,8 +55,7 @@
     """
     Initialize solver.
     """
-    import pylith.solver.solver as bindings
-    self.cppHandle = bindings.SolverLinear()
+    self._createCppHandle()
     self.cppHandle.initialize(mesh.cppHandle, field)
     return
 
@@ -82,4 +80,14 @@
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.solver.solver as bindings
+      self.cppHandle = bindings.SolverLinear()
+    return
+  
+
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/topology/Distributor.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/Distributor.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/topology/Distributor.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -57,8 +57,7 @@
     Constructor.
     """
     Component.__init__(self, name, facility="partitioner")
-    import pylith.topology.topology as bindings
-    self.cppHandle = bindings.Distributor()
+    self.cppHandle = None
     return
 
 
@@ -66,6 +65,8 @@
     """
     Distribute a Mesh
     """
+    self._createCppHandle()
+    
     from Mesh import Mesh
     newMesh = Mesh()
     newMesh.cppHandle = self.cppHandle.distribute(mesh.cppHandle,
@@ -85,6 +86,16 @@
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.topology.topology as bindings
+      self.cppHandle = bindings.Distributor()
+    return
+  
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def mesh_partitioner():

Modified: short/3D/PyLith/trunk/pylith/topology/Mesh.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/Mesh.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/topology/Mesh.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -31,8 +31,7 @@
     Constructor.
     """
     Component.__init__(self, name, facility="finite_element_mesh")
-    import pylith.topology.topology as bindings
-    self.cppHandle = bindings.Mesh()
+    self.cppHandle = None
     self.coordsys = None
     self.debug = False
     return
@@ -42,6 +41,7 @@
     """
     Initialize mesh.
     """
+    self._createCppHandle()
     self.coordsys = coordsys
     return
 
@@ -117,7 +117,17 @@
     """
     Component._configure(self)
     return
+
   
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.topology.topology as bindings
+      self.cppHandle = bindings.Mesh()
+    return
+  
 
 # FACTORIES ////////////////////////////////////////////////////////////
 

Modified: short/3D/PyLith/trunk/pylith/topology/MeshGenSimple.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/MeshGenSimple.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/pylith/topology/MeshGenSimple.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -34,8 +34,7 @@
     Constructor.
     """
     MeshGenerator.__init__(self, name)
-    import pylith.topology.topology as bindings
-    self.cppHandle = bindings.MeshGenSimple()
+    self.cppHandle = None
     return
 
 
@@ -44,6 +43,7 @@
     Generate a Mesh from a boundary
     """
     mesh = Mesh()
+    self._createCppHandle()
     mesh.cppHandle = self.cppHandle.generate(self.boundary.cppHandle)
     return mesh
 
@@ -61,6 +61,7 @@
     Returns a Mesh that is the boundary of the unit cube
     """
     mesh = Mesh()
+    self._createCppHandle()
     mesh.cppHandle = self.cppHandle.createCubeBoundary(self.debug)
     return mesh
 
@@ -75,4 +76,14 @@
     return
 
 
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    if None == self.cppHandle:
+      import pylith.topology.topology as bindings
+      self.cppHandle = bindings.MeshGenSimple()
+    return
+  
+
 # End of file 

Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichlet.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -40,8 +40,6 @@
     """
     from pylith.bc.Dirichlet import Dirichlet
     bc = Dirichlet()
-
-    self.assertNotEqual(None, bc.cppHandle)
     return
 
 
@@ -53,8 +51,10 @@
     don't verify the results.
     """
 
-    self._initialize()
+    (mesh, bc) = self._initialize()
 
+    self.assertNotEqual(None, bc.cppHandle)
+
     # We should really add something here to check to make sure things
     # actually initialized correctly    
     return

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestBruneSlipFn.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestBruneSlipFn.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestBruneSlipFn.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,6 +29,7 @@
     Test constructor.
     """
     slipFn = BruneSlipFn()
+    slipFn._createCppHandle()
     self.failIfEqual(None, slipFn.cppHandle)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestEqKinSrc.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestEqKinSrc.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestEqKinSrc.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,6 +29,7 @@
     Test constructor.
     """
     eqsrc = EqKinSrc()
+    eqsrc._createCppHandle()
     self.failIfEqual(None, eqsrc.cppHandle)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -42,6 +42,7 @@
     Test constructor.
     """
     fault = FaultCohesiveKin()
+    fault._createCppHandle()
     self.failIfEqual(None, fault.cppHandle)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/feassemble/TestQuadrature.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestQuadrature.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestQuadrature.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -124,36 +124,43 @@
     Test constructors for quadrature objects.
     """
     q = Quadrature0D()
+    q._createCppHandle()
     self.assertEqual(1, q.spaceDim)
     self.assertEqual(0, q.cellDim)
     self.failIfEqual(None, q.cppHandle)
     
     q = Quadrature1D()
+    q._createCppHandle()
     self.assertEqual(1, q.spaceDim)
     self.assertEqual(1, q.cellDim)
     self.failIfEqual(None, q.cppHandle)
     
     q = Quadrature1Din2D()
+    q._createCppHandle()
     self.assertEqual(2, q.spaceDim)
     self.assertEqual(1, q.cellDim)
     self.failIfEqual(None, q.cppHandle)
     
     q = Quadrature1Din3D()
+    q._createCppHandle()
     self.assertEqual(3, q.spaceDim)
     self.assertEqual(1, q.cellDim)
     self.failIfEqual(None, q.cppHandle)
     
     q = Quadrature2D()
+    q._createCppHandle()
     self.assertEqual(2, q.spaceDim)
     self.assertEqual(2, q.cellDim)
     self.failIfEqual(None, q.cppHandle)
     
     q = Quadrature2Din3D()
+    q._createCppHandle()
     self.assertEqual(3, q.spaceDim)
     self.assertEqual(2, q.cellDim)
     self.failIfEqual(None, q.cppHandle)
     
     q = Quadrature3D()
+    q._createCppHandle()
     self.assertEqual(3, q.spaceDim)
     self.assertEqual(3, q.cellDim)
     self.failIfEqual(None, q.cppHandle)

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticIsotropic3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticIsotropic3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -30,7 +30,7 @@
     """
     from pylith.materials.ElasticIsotropic3D import ElasticIsotropic3D
     material = ElasticIsotropic3D()
-
+    material._createCppHandle()
     self.assertNotEqual(None, material.cppHandle)
     return
 
@@ -40,6 +40,7 @@
     Test dimension().
     """
     material = ElasticIsotropic3D()
+    material._createCppHandle()
     self.assertEqual(3, material.dimension)
     return
 
@@ -49,6 +50,7 @@
     Test useElasticBehavior().
     """
     material = ElasticIsotropic3D()
+    material._createCppHandle()
     material.useElasticBehavior(False)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStrain.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStrain.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,7 +29,7 @@
     Test constructor.
     """
     material = ElasticPlaneStrain()
-
+    material._createCppHandle()
     self.assertNotEqual(None, material.cppHandle)
     return
 
@@ -39,6 +39,7 @@
     Test dimension().
     """
     material = ElasticPlaneStrain()
+    material._createCppHandle()
     self.assertEqual(2, material.dimension)
     return
 
@@ -48,6 +49,7 @@
     Test useElasticBehavior().
     """
     material = ElasticPlaneStrain()
+    material._createCppHandle()
     material.useElasticBehavior(False)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStress.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStress.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticPlaneStress.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,7 +29,7 @@
     Test constructor.
     """
     material = ElasticPlaneStress()
-
+    material._createCppHandle()
     self.assertNotEqual(None, material.cppHandle)
     return
 
@@ -39,6 +39,7 @@
     Test dimension().
     """
     material = ElasticPlaneStress()
+    material._createCppHandle()
     self.assertEqual(2, material.dimension)
     return
 
@@ -48,6 +49,7 @@
     Test useElasticBehavior().
     """
     material = ElasticPlaneStress()
+    material._createCppHandle()
     material.useElasticBehavior(False)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStrain1D.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStrain1D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStrain1D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,7 +29,7 @@
     Test constructor.
     """
     material = ElasticStrain1D()
-
+    material._createCppHandle()
     self.assertNotEqual(None, material.cppHandle)
     return
 
@@ -39,6 +39,7 @@
     Test dimension().
     """
     material = ElasticStrain1D()
+    material._createCppHandle()
     self.assertEqual(1, material.dimension)
     return
 
@@ -48,6 +49,7 @@
     Test useElasticBehavior().
     """
     material = ElasticStrain1D()
+    material._createCppHandle()
     material.useElasticBehavior(False)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStress1D.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStress1D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestElasticStress1D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,7 +29,7 @@
     Test constructor.
     """
     material = ElasticStress1D()
-
+    material._createCppHandle()
     self.assertNotEqual(None, material.cppHandle)
     return
 
@@ -39,6 +39,7 @@
     Test dimension().
     """
     material = ElasticStress1D()
+    material._createCppHandle()
     self.assertEqual(1, material.dimension)
     return
 
@@ -48,6 +49,7 @@
     Test useElasticBehavior().
     """
     material = ElasticStress1D()
+    material._createCppHandle()
     material.useElasticBehavior(False)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -30,7 +30,7 @@
     """
     from pylith.materials.MaxwellIsotropic3D import MaxwellIsotropic3D
     material = MaxwellIsotropic3D()
-
+    material._createCppHandle()
     self.assertNotEqual(None, material.cppHandle)
     return
 
@@ -40,6 +40,7 @@
     Test dimension().
     """
     material = MaxwellIsotropic3D()
+    material._createCppHandle()
     self.assertEqual(3, material.dimension)
     return
 
@@ -49,6 +50,7 @@
     Test useMaxwellBehavior().
     """
     material = MaxwellIsotropic3D()
+    material._createCppHandle()
     material.useElasticBehavior(False)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,6 +29,8 @@
     Test constructor.
     """
     iohandler = MeshIOAscii()
+    iohandler._configure()
+    iohandler._sync()
     self.assertNotEqual(None, iohandler.cppHandle)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOCubit.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOCubit.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOCubit.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -30,6 +30,8 @@
     Test constructor.
     """
     iohandler = MeshIOCubit()
+    iohandler._configure()
+    iohandler._sync()
     self.assertNotEqual(None, iohandler.cppHandle)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOLagrit.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOLagrit.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOLagrit.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -30,6 +30,8 @@
     Test constructor.
     """
     iohandler = MeshIOLagrit()
+    iohandler._configure()
+    iohandler._sync()
     self.assertNotEqual(None, iohandler.cppHandle)
     return
 

Modified: short/3D/PyLith/trunk/unittests/pytests/topology/TestMesh.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/topology/TestMesh.py	2007-06-19 03:46:16 UTC (rev 7296)
+++ short/3D/PyLith/trunk/unittests/pytests/topology/TestMesh.py	2007-06-19 07:05:27 UTC (rev 7297)
@@ -29,7 +29,6 @@
     Test constructor.
     """
     mesh = Mesh()
-    self.assertNotEqual(None, mesh.cppHandle)
     return
 
 
@@ -42,6 +41,7 @@
 
     mesh = Mesh()
     mesh.initialize(cs)
+    self.assertNotEqual(None, mesh.cppHandle)
     self.assertEqual(cs, mesh.coordsys)
     return
 



More information about the cig-commits mailing list