当前位置: 首页>>代码示例>>Python>>正文


Python Component.__init__方法代码示例

本文整理汇总了Python中pyre.components.Component.Component.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Component.__init__方法的具体用法?Python Component.__init__怎么用?Python Component.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyre.components.Component.Component的用法示例。


在下文中一共展示了Component.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="nondimensional"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="nondimensional")
   self._createModuleObj()
   return
开发者ID:geodynamics,项目名称:spatialdata,代码行数:9,代码来源:Nondimensional.py

示例2: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self, name):
        if name is None:
            name = "user-manager"

        Component.__init__(self, name, facility="userManager")

        # public data
        self.home = ""
        self.passwd = None
        self.method = None
        
        self._users = {}
        self._reload = True
        self._encoder = None
        self._decoder = None

        # encoders
        self._encoders = {
            'md5': self._md5Encoder,
            'sha': self._shaEncoder,
            'crypt': self._cryptEncoder,
            }

        # decoders
        self._decoders = {
            'md5': self._md5Decoder,
            'sha': self._shaDecoder,
            'crypt': self._cryptDecoder,
            }

        return
开发者ID:Alex-Song,项目名称:vmaf,代码行数:33,代码来源:UserManager.py

示例3: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self):
        Component.__init__(self, "lm3drun", "solver")

	print ""
        print "Hello from lm3drun.__init__!"

        return
开发者ID:geodynamics,项目名称:lithomop,代码行数:9,代码来源:Lithomop3d_run.py

示例4: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name=None):
     if name is None:
         name = 'Urea Forcefield'
     Component.__init__(self, name, facility='facility')
     self.i=self.inventory
     self.i.CAndOBond.assignInteraction('morseGulpEx10')
     self.i.CAndOBond.i.interIntra = 'intramolecular'
     self.i.CAndNBond.assignInteraction('morseGulpEx10')
     self.i.CAndNBond.i.interIntra = 'intramolecular'
     self.i.HAndNBond.assignInteraction('morseGulpEx10')
     self.i.HAndNBond.i.interIntra = 'intramolecular'
     self.i.CAndO.assignInteraction('lennardGulpEx10')
     self.i.CAndO.i.interIntra = 'intermolecular'
     self.i.CAndN.assignInteraction('lennardGulpEx10')
     self.i.CAndN.i.interIntra = 'intermolecular'
     self.i.OAndO.assignInteraction('lennardGulpEx10')
     self.i.OAndO.i.interIntra = 'intermolecular'
     self.i.NAndO.assignInteraction('lennardGulpEx10')
     self.i.NAndO.i.interIntra = 'intermolecular'
     self.i.NAndN.assignInteraction('lennardGulpEx10')
     self.i.NAndN.i.interIntra = 'intermolecular'
     self.i.CAndC.assignInteraction('lennardGulpEx10')  
     self.i.CAndC.i.interIntra = 'intermolecular'     
     self.i.NAndCAndO.assignInteraction('threeBodyGulpEx10')
     self.i.HAndNAndC.assignInteraction('threeBodyGulpEx10')
     self.i.HAndNAndH.assignInteraction('threeBodyGulpEx10')
     self.i.NAndCAndN.assignInteraction('threeBodyGulpEx10')
     self.i.OAndCAndNAndH.assignInteraction('torsionGulpEx10')
     self.i.NAndCAndNAndH.assignInteraction('torsionGulpEx10')
     self.i.OAndCAndNAndN.assignInteraction('torsionGulpEx10')
开发者ID:danse-inelastic,项目名称:molDynamics,代码行数:32,代码来源:UreaForcefield.py

示例5: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="mesh2din3dquadratic"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="mesh")
   
   self.spaceDim = 3
   self.cellDim = 2
   self.numVertices = 6
   self.numCells = 1
   self.gravityVec = numpy.array( [0.0, 0.0, -1.0e8],
                                  dtype=numpy.float64)
   self.vertices = numpy.array( [[ 2.0, -0.5, -0.5],
                                 [ 0.5,  3.0,  0.0],
                                 [-0.5,  0.0,  2.0],
                                 [ 0.0,  1.5,  1.0],
                                 [ 0.75, -0.25, 0.75],
                                 [ 1.25, 1.25, -0.25]],
                                dtype=numpy.float64)
   self.cells = numpy.array( [[0, 1, 2, 3, 4, 5]], dtype=numpy.int32)
   self.verticesRef = numpy.array( [[-1.0, -1.0],
                                    [+1.0, -1.0],
                                    [-1.0, +1.0],
                                    [ 0.0,  0.0],
                                    [-1.0,  0.0],
                                    [ 0.0, -1.0]],
                                   dtype=numpy.float64)
   return
开发者ID:youngsolar,项目名称:pylith,代码行数:30,代码来源:Mesh2Din3DQuadratic.py

示例6: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self, name, facility="solver"):
        Component.__init__(self, name, facility)

        self.all_variables = None
        self.communicator = None
        self.start_cpu_time = 0
        return
开发者ID:drifter-cao,项目名称:citcoms,代码行数:9,代码来源:Solver.py

示例7: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="values"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="database_values")
   self.values = []
   return
开发者ID:koson,项目名称:spatialdata,代码行数:9,代码来源:Values.py

示例8: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self, name, facility=None):
        if facility is None:
            facility = "service"
            
        Component.__init__(self, name, facility)

        # number of idle seconds before onTimeout gets called
        self.timeout = 0

        # the event loop and dispatcher
        self.selector = None

        # the monitor of my servcie port that gets me network connections
        self.monitor = None

        # the object repsonsible for extracting service requests from the network stream
        self.marshaller = None
        
        # the object repsonsible for translating service requests into method calls
        self.evaluator = None
        
        # someone must supply a weaver for rendering my current state in _storeConfiguration()
        # this is typically done by my parent
        self.weaver = None

        return
开发者ID:Alex-Song,项目名称:vmaf,代码行数:28,代码来源:Service.py

示例9: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self, name):
        if name is None:
            name = 'evaluator'

        Component.__init__(self, name, facility='serviceRequestEvaluator')

        return
开发者ID:bmi-forum,项目名称:bmi-pyre,代码行数:9,代码来源:Evaluator.py

示例10: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="solution2dquadratic"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="solution")
   
   # Input fields
   self.dt = 0.01
   self.fieldTIncr = numpy.array([ -0.4, -0.6,
                                    +0.7, +0.8,
                                    +0.0, +0.2,
                                    -0.5, -0.4,
                                    +0.3, +0.9,
                                    -0.3, -0.9 ], dtype=numpy.float64)
   self.fieldT = numpy.array([ -0.3, -0.4,
                               +0.5, +0.6,
                               +0.0, +0.1,
                               -0.2, -0.3,
                               +0.2, +0.3,
                               -0.1, -0.2 ], dtype=numpy.float64)
   self.fieldTmdt = numpy.array([ -0.2, -0.3,
                                  +0.3, +0.4,
                                  +0.0, -0.1,
                                  -0.3, -0.2,
                                  +0.1, +0.4,
                                  -0.2, -0.6 ], dtype=numpy.float64)
   return
开发者ID:panzhengyang,项目名称:pylith,代码行数:29,代码来源:Solution2DQuadratic.py

示例11: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="quadrature2dquadratic"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="quadrature")
   
   # These are just approximate points used to test the quadrature routine
   self.quadPtsRef = numpy.array( [[-0.75,-0.75],
                                   [0.75,-0.75],
                                   [-0.75,0.75],
                                   [0,-0.75],
                                   [-0.75,0],
                                   [0.25,0.25]],
                                  dtype=numpy.float64)
   self.quadWts = numpy.array([1.0/3.0, 1.0/3.0, 1.0/3.0, 1.0/3.0, 1.0/3.0, 1.0/3.0],
                              dtype=numpy.float64)
   #self.quadPtsRef = numpy.array( [[-0.64288254347276719, -0.68989794855663567],
   #                                [-0.84993777955478378, 0.28989794855663559],
   #                                [0.33278049202940285, -0.68989794855663567],
   #                                [-0.43996016900185175, 0.28989794855663559]],
   #                               dtype=numpy.float64)
   #self.quadWts = numpy.array([0.63608276,  0.36391724,  0.63608276,  0.36391724],
   #                           dtype=numpy.float64)
   self.numBasis = 6
   self.numQuadPts = 6
   self.spaceDim = 2
   self.cellDim = 2
   return
开发者ID:jjle,项目名称:pylith,代码行数:30,代码来源:Quadrature2DQuadratic.py

示例12: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self, name = 'geometer'):
        Component.__init__(self, name, 'geometer')
        base.__init__(self)

        import journal
        self._warning = journal.warning( 'mcni.pyre_support.geometer' )
        return
开发者ID:McStasMcXtrace,项目名称:MCViNE,代码行数:9,代码来源:Geometer.py

示例13: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
    def __init__(self, name='phonIsoSurfaceCalcor',
                 unitcell=None, phonondatasource=None, tau=None,
                 plotter=None, slicer=None,
                 Ei=50, Etransfer=20):
                 #branchtoplot=None, atomtoplot=None, energies=None):
        Component.__init__(self, name, facility='facility')
        self._uc = unitcell
        if phonondatasource is not None:
            self._phonondatasource = phonondatasource
        self._nkpts = None
        self._tau = tau
        self._phonondata = None
        self._kptGrid = None
        self._energyGrid = None
        self._polarizationGrid = None
        self._intensityGrid = None
        try:
            self._numatoms = unitcell.getNumAtoms()
        except:
            raise ValueError, "Unit cell is not valid: invalid number of atoms."
        #self._branchtoplot = branchtoplot
        #self._atomtoplot = atomtoplot
        #self._energies = energies
        if plotter is None:
            plotter = VTKIsoSurfacePlotter()
        self._plotter = plotter

        if slicer is None:
            slicer = VTKPlaneSlicer()
        self._slicer = slicer

        # neutron scattering parameters:
        self.Ei = Ei
        self.Etransfer = Etransfer
开发者ID:danse-inelastic,项目名称:inelastic-svn,代码行数:36,代码来源:phonIsoSurfaceCalcor.py

示例14: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="geometry"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="geometry")
   self.vertices = None
   return
开发者ID:koson,项目名称:spatialdata,代码行数:9,代码来源:Geometry.py

示例15: __init__

# 需要导入模块: from pyre.components.Component import Component [as 别名]
# 或者: from pyre.components.Component.Component import __init__ [as 别名]
 def __init__(self, name="shapers"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="shapers")
   self.shapers = []
   return
开发者ID:koson,项目名称:spatialdata,代码行数:9,代码来源:Shapers.py


注:本文中的pyre.components.Component.Component.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。