<commit_before>#!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# <NAME>, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2013 University of California, Davis
#
# See COPYING for license information.
#
# ----------------------------------------------------------------------
#

## @file spatialdata/units/NondimElasticQuasistatic.py
##
## @brief Python manager for nondimensionalizing quasi-static
## elasticity problems.
##
## Factory: nondimensional

from Nondimensional import Nondimensional

# NondimElasticQuasistatic class
class NondimElasticQuasistatic(Nondimensional):
  """
  Python manager for nondimensionalizing quasi-static elasticity problems.

  Factory: nondimensional
  """

  # INVENTORY //////////////////////////////////////////////////////////

  class Inventory(Nondimensional.Inventory):
    """
    Python object for managing NondimElasticQuasistatic facilities and
    properties.
    """

    ## @class Inventory
    ## Python object for managing NondimElasticQuasistatic facilities and
    ## properties.
    ##
    ## \b Properties
    ## @li \b shear_modulus Shear modulus to nondimensionalize pressure.
    ## @li \b length_scale Value to nondimensionalize length scale.
    ## @li \b relaxation_time Relaxation time to nondimensionalize time.
    ##
    ## \b Facilities
    ## @li None

    import pyre.inventory

    from pyre.units.length import meter
    lengthScale = pyre.inventory.dimensional("length_scale",
                                              default=1.0e+3*meter,
                            validator=pyre.inventory.greater(0.0*meter))
    lengthScale.meta['tip'] = "Value to nondimensionalize length scale."

    from pyre.units.pressure import pascal
    shearModulus = pyre.inventory.dimensional("shear_modulus",
                                              default=3.0e+10*pascal,
                            validator=pyre.inventory.greater(0.0*pascal))
    shearModulus.meta['tip'] = "Shear modulus to nondimensionalize pressure."

    from pyre.units.time import year
    relaxationTime = pyre.inventory.dimensional("relaxation_time",
                                                default=1.0*year,
                            validator=pyre.inventory.greater(0.0*year))
    relaxationTime.meta['tip'] = "Relaxatim time to nondimensionalize time."


  # PUBLIC METHODS /////////////////////////////////////////////////////

  def __init__(self, name="nondimelasticquasistatic"):
    """
    Constructor.
    """
    Nondimensional.__init__(self, name)
    return


  # PRIVATE METHODS ////////////////////////////////////////////////////

  def _configure(self):
    """
    Setup members using inventory.
    """
    Nondimensional._configure(self)
    self.setLengthScale(self.inventory.lengthScale)<commit_msg>Fix typo in doc string.<commit_after>#!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# <NAME>, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2013 University of California, Davis
#
# See COPYING for license information.
#
# ----------------------------------------------------------------------
#

## @file spatialdata/units/NondimElasticQuasistatic.py
##
## @brief Python manager for nondimensionalizing quasi-static
## elasticity problems.
##
## Factory: nondimensional

from Nondimensional import Nondimensional

# NondimElasticQuasistatic class
class NondimElasticQuasistatic(Nondimensional):
  """
  Python manager for nondimensionalizing quasi-static elasticity problems.

  Factory: nondimensional
  """

  # INVENTORY //////////////////////////////////////////////////////////

  class Inventory(Nondimensional.Inventory):
    """
    Python object for managing NondimElasticQuasistatic facilities and
    properties.
    """

    ## @class Inventory
    ## Python object for managing NondimElasticQuasistatic facilities and
    ## properties.
    ##
    ## \b Properties
    ## @li \b shear_modulus Shear modulus to nondimensionalize pressure.
    ## @li \b length_scale Value to nondimensionalize length scale.
    ## @li \b relaxation_time Relaxation time to nondimensionalize time.
    ##
    ## \b Facilities
    ## @li None

    import pyre.inventory

    from pyre.units.length import meter
    lengthScale = pyre.inventory.dimensional("length_scale",
                                              default=1.0e+3*meter,
                            validator=pyre.inventory.greater(0.0*meter))
    lengthScale.meta['tip'] = "Value to nondimensionalize length scale."

    from pyre.units.pressure import pascal
    shearModulus = pyre.inventory.dimensional("shear_modulus",
                                              default=3.0e+10*pascal,
                            validator=pyre.inventory.greater(0.0*pascal))
    shearModulus.meta['tip'] = "Shear modulus to nondimensionalize pressure."

    from pyre.units.time import year
    relaxationTime = pyre.inventory.dimensional("relaxation_time",
                                                default=1.0*year,
                            validator=pyre.inventory.greater(0.0*year))
    relaxationTime.meta['tip'] = "Relaxation time to nondimensionalize time."


  # PUBLIC METHODS /////////////////////////////////////////////////////

  def __init__(self, name="nondimelasticquasistatic"):
    """
    Constructor.
    """
    Nondimensional.__init__(self, name)
    return


  # PRIVATE METHODS ////////////////////////////////////////////////////

  def _configure(self):
    """
    Setup members using inventory.
    """
    Nondimensional._configure(self)
    self.setLengthScale(self.inventory.lengthScale)
{'fraction_non_alphanumeric': 0.18831720156223467, 'fraction_numerical': 0.007811173374087281, 'mean_word_length': 1.942057942057942, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7650706', 'n_tokens_mistral': 1623, 'n_tokens_neox': 1467, 'n_words': 351}