Exemplo n.º 1
0
  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
Exemplo n.º 2
0
  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
Exemplo n.º 3
0
  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
Exemplo n.º 4
0
  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
Exemplo n.º 5
0
 def test_initialize(self):
   """
   Test initialize().
   """
   from pylith.utils.EventLogger import EventLogger
   logger = EventLogger()
   logger.className("logging A")
   logger.initialize()
   return
Exemplo n.º 6
0
    def _setupLogging(self):
        """Setup event logging.
        """
        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.setClassName("PyLith")
        logger.initialize()

        self._eventLogger = logger
        return
Exemplo n.º 7
0
  def _setupLogging(self):
    """
    Setup event logging.
    """
    from pylith.utils.EventLogger import EventLogger
    logger = EventLogger()
    logger.className("PyLith")
    logger.initialize()

    self._eventLogger = logger
    return
Exemplo n.º 8
0
    def test_registerStage(self):
        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.setClassName("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.getStageId(stage))
        return
Exemplo n.º 9
0
    def test_registerEvent(self):
        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.setClassName("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.getEventId(event))
        return
Exemplo n.º 10
0
    def _setupLogging(self):
        """Setup event logging.
        """
        if not "_loggingPrefix" in dir(self):
            self._loggingPrefix = ""

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

        self._eventLogger = logger
        return
Exemplo n.º 11
0
  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
Exemplo n.º 12
0
    def _setupLogging(self):
        """Setup event logging.
        """
        self._loggingPrefix = "Refin "
        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.setClassName("FE Refinement")
        logger.initialize()
        events = ["refine"]
        for event in events:
            logger.registerEvent("%s%s" % (self._loggingPrefix, event))

        self._eventLogger = logger
        return
Exemplo n.º 13
0
    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
Exemplo n.º 14
0
  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
Exemplo n.º 15
0
  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
Exemplo n.º 16
0
  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
Exemplo n.º 17
0
    def _setupLogging(self):
        """
    Setup event logging.
    """
        if not "_loggingPrefix" in dir(self):
            self._loggingPrefix = ""

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

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

        self._eventLogger = logger
        return
Exemplo n.º 18
0
    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
Exemplo n.º 19
0
    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
Exemplo n.º 20
0
    def _setupLogging(self):
        """
    Setup event logging.
    """
        if not "_loggingPrefix" in dir(self):
            self._loggingPrefix = ""

        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.className("Slip Time Function")
        logger.initialize()

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

        self._eventLogger = logger
        return
Exemplo n.º 21
0
  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
Exemplo n.º 22
0
  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
Exemplo n.º 23
0
  def _setupLogging(self):
    """
    Setup event logging.
    """
    if not "_loggingPrefix" in dir(self):
      self._loggingPrefix = ""

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

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

    self._eventLogger = logger
    return
Exemplo n.º 24
0
    def test_eventLogging(self):
        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.setClassName("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
Exemplo n.º 25
0
    def test_stageLogging(self):
        from pylith.utils.EventLogger import EventLogger
        logger = EventLogger()
        logger.setClassName("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
Exemplo n.º 26
0
    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
Exemplo n.º 27
0
  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
Exemplo n.º 28
0
  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
Exemplo n.º 29
0
  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
Exemplo n.º 30
0
  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
Exemplo n.º 31
0
 def test_initialize(self):
     from pylith.utils.EventLogger import EventLogger
     logger = EventLogger()
     logger.setClassName("logging A")
     logger.initialize()
     return