コード例 #1
0
ファイル: TestEqKinSrc.py プロジェクト: youngsolar/pylith
 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
ファイル: TestEqKinSrc.py プロジェクト: youngsolar/pylith
  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
コード例 #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