Пример #1
0
 def test_configure(self):
   """
   Test _configure().
   """
   fault = FaultCohesiveImpulses()
   fault.inventory.faultLabel = "fault group"
   fault._configure()
   return
Пример #2
0
  def test_useFaultMesh(self):
    """
    Test useFaultMesh().
    """
    fault = FaultCohesiveImpulses()
    fault.inventory.faultLabel = "fault group"
    fault._configure()

    fault.useFaultMesh(True);

    # No test of result
    return
Пример #3
0
  def test_adjustTopology(self):
    """
    Test adjustTopology().

    WARNING: This is not a rigorous test of adjustTopology() because we
    neither set the input fields or verify the results.
    """
    cs = CSCart()
    cs.inventory.spaceDim = 2
    cs._configure()
    
    from spatialdata.units.Nondimensional import Nondimensional
    normalizer = Nondimensional()
    normalizer._configure()

    from pylith.meshio.MeshIOAscii import MeshIOAscii
    importer = MeshIOAscii()
    importer.inventory.filename = "data/tri3.mesh"
    importer.inventory.coordsys = cs
    importer._configure()
    mesh = importer.read(debug=False, interpolate=False)

    fault = FaultCohesiveImpulses()
    fault.inventory.matId = 10
    fault.inventory.faultLabel = "fault"
    fault._configure()

    nvertices = fault.numVerticesNoMesh(mesh)
    firstFaultVertex = 0
    firstLagrangeVertex = nvertices
    firstFaultCell      = 2*nvertices
    fault.adjustTopology(mesh, firstFaultVertex, firstLagrangeVertex,
                         firstFaultCell)

    # We should really add something here to check to make sure things
    # actually initialized correctly    
    return