當前位置: 首頁>>代碼示例>>Python>>正文


Python EventLogger.EventLogger類代碼示例

本文整理匯總了Python中pylith.utils.EventLogger.EventLogger的典型用法代碼示例。如果您正苦於以下問題:Python EventLogger類的具體用法?Python EventLogger怎麽用?Python EventLogger使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了EventLogger類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_initialize

 def test_initialize(self):
   """
   Test initialize().
   """
   from pylith.utils.EventLogger import EventLogger
   logger = EventLogger()
   logger.className("logging A")
   logger.initialize()
   return
開發者ID:geodynamics,項目名稱:pylith,代碼行數:9,代碼來源:TestEventLogger.py

示例2: test_className

 def test_className(self):
   """
   Test className().
   """
   from pylith.utils.EventLogger import EventLogger
   logger = EventLogger()
   name = "my class"
   logger.className(name)
   self.assertEqual(name, logger.className())
   return
開發者ID:geodynamics,項目名稱:pylith,代碼行數:10,代碼來源:TestEventLogger.py

示例3: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if not "_loggingPrefix" in dir(self):
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("PDE Formulation")
    logger.initialize()

    events = ["preinit",
              "verify",
              "init",
              "timestep",
              "prestep",
              "step",
              "poststep",
              "write",
              "finalize"]
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    stages = ["Reform Jacobian",
              "Reform Residual",
              "Solve"]
    for stage in stages:
      logger.registerStage(stage)

    self._eventLogger = logger
    return
開發者ID:youngsolar,項目名稱:pylith,代碼行數:32,代碼來源:Formulation.py

示例4: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("PyLith")
    logger.initialize()

    self._eventLogger = logger
    return
開發者ID:panzhengyang,項目名稱:pylith,代碼行數:11,代碼來源:PyLithApp.py

示例5: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if not "_loggingPrefix" in dir(self):
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("Problem")
    logger.initialize()

    self._eventLogger = logger
    return
開發者ID:youngsolar,項目名稱:pylith,代碼行數:14,代碼來源:Problem.py

示例6: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if None == self._loggingPrefix:
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("FE Constraint")
    logger.initialize()

    events = ["verify",
              "init",
              "setSizes",
              "constraints",
              "setField",
              "poststep",
              "write",
              "finalize"]
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    self._eventLogger = logger
    return
開發者ID:rishabhdutta,項目名稱:pylith,代碼行數:25,代碼來源:Constraint.py

示例7: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    self._loggingPrefix = "Dist "
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("FE Distribution")
    logger.initialize()
    events = ["distribute"]
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    self._eventLogger = logger
    return
開發者ID:rishabhdutta,項目名稱:pylith,代碼行數:15,代碼來源:Distributor.py

示例8: test_registerEvent

  def test_registerEvent(self):
    """
    Test registerEvent().
    """
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("logging A")
    logger.initialize()

    events = ["event 1" , "event 2" , "event 3"]
    id = {}
    for event in events:
      id[event] = logger.registerEvent(event)
    for event in events:
      self.assertEqual(id[event], logger.eventId(event))
    return
開發者ID:geodynamics,項目名稱:pylith,代碼行數:16,代碼來源:TestEventLogger.py

示例9: test_registerStage

  def test_registerStage(self):
    """
    Test registerStage().
    """
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("logging A")
    logger.initialize()

    stages = ["stage 1a" , "stage 2a" , "stage 3a"]
    id = {}
    for stage in stages:
      id[stage] = logger.registerStage(stage)
    for stage in stages:
      self.assertEqual(id[stage], logger.stageId(stage))
    return
開發者ID:geodynamics,項目名稱:pylith,代碼行數:16,代碼來源:TestEventLogger.py

示例10: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if None == self._loggingPrefix:
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("FE FrictionModel")
    logger.initialize()

    events = []
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    self._eventLogger = logger
    return
開發者ID:rishabhdutta,項目名稱:pylith,代碼行數:18,代碼來源:FrictionModel.py

示例11: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if not "_loggingPrefix" in dir(self):
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("Kinematic Earthquake Source")
    logger.initialize()

    events = ["verify",
              "init"]
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    self._eventLogger = logger
    return
開發者ID:rishabhdutta,項目名稱:pylith,代碼行數:19,代碼來源:EqKinSrc.py

示例12: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if not "_loggingPrefix" in dir(self):
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("FE Integrator")
    logger.initialize()

    events = ["preinit",
              "verify",
              "init",
              "poststep",
              "write",
              "finalize"]
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    self._eventLogger = logger
    return
開發者ID:rishabhdutta,項目名稱:pylith,代碼行數:23,代碼來源:Integrator.py

示例13: _setupLogging

  def _setupLogging(self):
    """
    Setup event logging.
    """
    if not "_loggingPrefix" in dir(self):
      self._loggingPrefix = ""

    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("FE Output")
    logger.initialize()

    events = ["init",
              "open",
              "close",
              "openStep",
              "closeStep",
              "writeInfo",
              "writeData"]
    for event in events:
      logger.registerEvent("%s%s" % (self._loggingPrefix, event))

    self._eventLogger = logger
    return
開發者ID:panzhengyang,項目名稱:pylith,代碼行數:24,代碼來源:OutputManager.py

示例14: test_eventLogging

  def test_eventLogging(self):
    """
    Test eventBegin() and eventEnd().
    """
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("logging A")
    logger.initialize()
    events = ["event 1" , "event 2" , "event 3"]
    for event in events:
      logger.registerEvent(event)

    logger.eventBegin("event 2")
    logger.eventEnd("event 2")

    logger.eventBegin("event 1")
    logger.eventEnd("event 1")

    logger.eventBegin("event 3")
    logger.eventBegin("event 1")
    logger.eventEnd("event 1")
    logger.eventEnd("event 3")
    return
開發者ID:geodynamics,項目名稱:pylith,代碼行數:23,代碼來源:TestEventLogger.py

示例15: test_stageLogging

  def test_stageLogging(self):
    """
    Test stagePush() and stagePop().
    """
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("logging A")
    logger.initialize()
    stages = ["stage 1b" , "stage 2b" , "stage 3b"]
    for stage in stages:
      logger.registerStage(stage)

    logger.stagePush("stage 2b")
    logger.stagePop()

    logger.stagePush("stage 1b")
    logger.stagePop()

    logger.stagePush("stage 3b")
    logger.stagePush("stage 1b")
    logger.stagePop()
    logger.stagePop()
    return
開發者ID:geodynamics,項目名稱:pylith,代碼行數:23,代碼來源:TestEventLogger.py


注:本文中的pylith.utils.EventLogger.EventLogger類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。