コード例 #1
0
ファイル: PyLithApp.py プロジェクト: panzhengyang/pylith
 def __init__(self, name="pylithapp"):
   """
   Constructor.
   """
   PetscApplication.__init__(self, name)
   self._loggingPrefix = "PyLith "
   return
コード例 #2
0
 def __init__(self, name="pylithapp"):
     """
     Constructor.
     """
     PetscApplication.__init__(self, name)
     self._loggingPrefix = "PyLith "
     return
コード例 #3
0
    def showHelp(self):
        msg = (
            "Before you ask for help, consult the PyLith user manual and try to debug on your own.\n"
            "You will likely find other useful information while making progress on your original issue.\n"
            "\n"
            "Helpful Resources:\n"
            "* User manual (https://geodynamics.org/cig/software/pylith/)\n"
            "* PyLith Tutorials (https://wiki.geodynamics.org/software:pylith:start)\n"
            "* pylithinfo script\n"
            "    Running pylithinfo --verbose [-o pylith_parameters.txt] [PyLith args]\n"
            "    will dump all parameters with descriptions to pylith_parameters.txt.\n"
            "\n"
            "For quasi-static simulations, use the following solver settings to make sure the linear and nonlinear solvers are converging:\n"
            "[pylithapp.petsc]\n"
            "ksp_converged_reason = true\n"
            "ksp_error_if_not_converged = true\n"
            "snes_converged_reason = true\n"
            "snes_error_if_not_converged = true\n"
            "\n"
            "If you still need help, send an email to [email protected] with the following info:\n"
            "\n"
            "1. Describe what you are trying to do\n"
            "  a. Overview of the problem and boundary conditions (diagrams are very helpful)\n"
            "  b. 2-D or 3-D\n"
            "  c. Cell type (tri, quad, hex, or tet)\n"
            "  d. Type of fault: prescribed slip or spontaneous rupture\n"
            "2. Include the output of running 'pylith --version'\n"
            "3. Send the *entire* error message, not just what you think is important (entire log is best).\n"
            "\n"
            "Description and help for PyLithApp component:\n"
        )
        if self.inventory.usage:
            print(msg)

        PetscApplication.showHelp(self)

        msg = (
            "\nExamples using step01.cfg in directory examples/3d/hex8):\n"
            "1. List components and properties for a given component (--help)\n"
            "  pylith step01.cfg --problem.bc.z_neg.help\n"
            "\n"
            "2. List components of a given component (--help-components)\n"
            "  pylith step01.cfg --problem.bc.z_neg.help-components\n"
            "\n"
            "3. List properties of a given component (--help-properties)\n"
            "  pylith step01.cfg --problem.bc.z_neg.help-properties\n"
        )
        if self.inventory.usage:
            print(msg)
        return
コード例 #4
0
ファイル: PyLithApp.py プロジェクト: panzhengyang/pylith
  def _configure(self):
    """
    Setup members using inventory.
    """
    PetscApplication._configure(self)
    self.initializeOnly = self.inventory.initializeOnly
    self.mesher = self.inventory.mesher
    self.problem = self.inventory.problem
    self.perfLogger = self.inventory.perfLogger
    self.typos = self.inventory.typos
    self.pdbOn = self.inventory.pdbOn

    import journal
    self._debug = journal.debug(self.name)
    return
コード例 #5
0
    def _configure(self):
        """
        Setup members using inventory.
        """
        PetscApplication._configure(self)
        self.typos = self.inventory.typos
        self.pdbOn = self.inventory.pdbOn
        self.initializeOnly = self.inventory.initializeOnly
        self.parameters = self.inventory.parameters
        self.mesher = self.inventory.mesher
        self.problem = self.inventory.problem
        self.perfLogger = self.inventory.perfLogger

        import journal
        self._debug = journal.debug(self.name)
        return