Пример #1
0
 def test_configure(self):
   """
   Test constructor.
   """
   eqsrc = EqKinSrc()
   eqsrc._configure()
   return
Пример #2
0
 def test_configure(self):
     """
 Test constructor.
 """
     eqsrc = EqKinSrc()
     eqsrc._configure()
     return
Пример #3
0
 def test_configure(self):
     """
 Test _configure().
 """
     from pylith.faults.SingleRupture import SingleRupture
     faults = SingleRupture()
     from pylith.faults.EqKinSrc import EqKinSrc
     faults.inventory.rupture = EqKinSrc()
     faults._configure()
     self.assertEqual(1, len(faults.components()))
     return
Пример #4
0
    def test_initialize(self):
        """
    Test initialize().
    """
        from spatialdata.spatialdb.SimpleDB import SimpleDB
        from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
        from pyre.units.time import second

        ioFinalSlip = SimpleIOAscii()
        ioFinalSlip.inventory.filename = "finalslip.spatialdb"
        ioFinalSlip._configure()
        dbFinalSlip = SimpleDB()
        dbFinalSlip.inventory.iohandler = ioFinalSlip
        dbFinalSlip.inventory.label = "final slip"
        dbFinalSlip._configure()

        ioSlipTime = SimpleIOAscii()
        ioSlipTime.inventory.filename = "sliptime.spatialdb"
        ioSlipTime._configure()
        dbSlipTime = SimpleDB()
        dbSlipTime.inventory.iohandler = ioSlipTime
        dbSlipTime.inventory.label = "slip time"
        dbSlipTime._configure()

        from pylith.faults.StepSlipFn import StepSlipFn
        slipfn = StepSlipFn()
        slipfn.inventory.dbSlip = dbFinalSlip
        slipfn.inventory.dbSlipTime = dbSlipTime
        slipfn._configure()

        eqsrc = EqKinSrc()
        eqsrc.inventory.originTime = 5.3 * second
        eqsrc.inventory.slipfn = slipfn
        eqsrc._configure()
        eqsrc.preinitialize()
        eqsrc.verifyConfiguration()
        eqsrc.initialize()
        return
Пример #5
0
  def test_initialize(self):
    """
    Test initialize().
    """
    from spatialdata.spatialdb.SimpleDB import SimpleDB
    from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
    from pyre.units.time import second

    ioFinalSlip = SimpleIOAscii()
    ioFinalSlip.inventory.filename = "finalslip.spatialdb"
    ioFinalSlip._configure()
    dbFinalSlip = SimpleDB()
    dbFinalSlip.inventory.iohandler = ioFinalSlip
    dbFinalSlip.inventory.label = "final slip"
    dbFinalSlip._configure()
    
    ioSlipTime = SimpleIOAscii()
    ioSlipTime.inventory.filename = "sliptime.spatialdb"
    ioSlipTime._configure()
    dbSlipTime = SimpleDB()
    dbSlipTime.inventory.iohandler = ioSlipTime
    dbSlipTime.inventory.label = "slip time"
    dbSlipTime._configure()
    
    from pylith.faults.StepSlipFn import StepSlipFn
    slipfn = StepSlipFn()
    slipfn.inventory.dbSlip = dbFinalSlip
    slipfn.inventory.dbSlipTime = dbSlipTime
    slipfn._configure()

    eqsrc = EqKinSrc()
    eqsrc.inventory.originTime = 5.3*second
    eqsrc.inventory.slipfn = slipfn
    eqsrc._configure()
    eqsrc.preinitialize()
    eqsrc.verifyConfiguration()
    eqsrc.initialize()
    return
Пример #6
0
 def test_constructor(self):
     """
 Test constructor.
 """
     eqsrc = EqKinSrc()
     return