• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python Component.Component类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __init__

 def __init__(self, name="shapers"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="shapers")
   self.shapers = []
   return
开发者ID:koson,项目名称:spatialdata,代码行数:7,代码来源:Shapers.py


示例2: __init__

 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,代码行数:28,代码来源:Mesh2Din3DQuadratic.py


示例3: __init__

    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,代码行数:31,代码来源:UserManager.py


示例4: __init__

 def __init__(self, name="dumpparameters"):
     """
     Constructor.
     """
     Component.__init__(self, name="dumpparamters", facility="dumpparameters")
     self.info = None
     return
开发者ID:geodynamics,项目名称:pylith,代码行数:7,代码来源:DumpParameters.py


示例5: _configure

    def _configure(self):
        Component._configure(self)

        self.host = self.inventory.host
        self.port = self.inventory.port

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


示例6: __init__

  def __init__(self, name="mesh2dquadratic"):
    """
    Constructor.
    """
    Component.__init__(self, name, facility="mesh")
    
    self.spaceDim = 2
    self.cellDim = 2
    self.numVertices = 6
    self.numCells = 1
    self.gravityVec = numpy.array( [0.0, -1.0e8],
                                   dtype=numpy.float64)
    self.vertices = numpy.array( [[-1.0, -1.0],
                                  [+1.0, +0.2],
                                  [-1.5, +0.5],
                                  [-0.25, +0.35],
                                  [-1.25, -0.25],
                                  [0.0, -0.4]],
                                 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)

    a = (2.0**2 + 1.2**2)**0.5
    b = (2.5**2 + 0.3**2)**0.5
    c = (0.5**2 + 1.5**2)**0.5
    k = 0.5 * (a + b + c)
    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
    self.minCellWidth = min(a, b, c, 3.0*r)
    return
开发者ID:panzhengyang,项目名称:pylith,代码行数:35,代码来源:Mesh2DQuadratic.py


示例7: _configure

 def _configure(self):
     Component._configure(self)
     self.logfile = self.inventory.logfile
     errlogfile = self.inventory.errlogfile
     if errlogfile == '': errlogfile = self.logfile
     self.errlogfile = errlogfile
     return
开发者ID:danse-inelastic,项目名称:pyregui,代码行数:7,代码来源:Launcher.py


示例8: __init__

 def __init__(self, name="simpleio"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="simpledb_io")
   self._createModuleObj()
   return
开发者ID:koson,项目名称:spatialdata,代码行数:7,代码来源:SimpleIO.py


示例9: __init__

    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,代码行数:34,代码来源:phonIsoSurfaceCalcor.py


示例10: _fini

 def _fini(self):
     Component._fini(self)
     import sys
     if self.logstream != sys.stdout: self.logstream.close()
     if self.errlogstream != sys.stderr and self.errlogstream != self.logstream:
         self.errlogstream.close()
     return
开发者ID:danse-inelastic,项目名称:pyregui,代码行数:7,代码来源:Launcher.py


示例11: __init__

 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,代码行数:30,代码来源:UreaForcefield.py


示例12: __init__

    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,代码行数:7,代码来源:Solver.py


示例13: __init__

    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,代码行数:7,代码来源:Geometer.py


示例14: __init__

 def __init__(self, name='convertdata'):
   """Constructor."""
   Component.__init__(self, name, facility='convertdata')
   self._fileSrc = None
   self._fileDest = None
   self._command = None
   return
开发者ID:geodynamics,项目名称:spatialdata,代码行数:7,代码来源:ConvertData.py


示例15: __init__

 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,代码行数:28,代码来源:Quadrature2DQuadratic.py


示例16: __init__

 def __init__(self, name="geometry"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="geometry")
   self.vertices = None
   return
开发者ID:koson,项目名称:spatialdata,代码行数:7,代码来源:Geometry.py


示例17: __init__

    def __init__(self, name):
        if name is None:
            name = 'evaluator'

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

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


示例18: __init__

 def __init__(self, name="petsc"):
   """
   Constructor.
   """
   Component.__init__(self, name, facility="petsc_manager")
   self.options = []
   return
开发者ID:panzhengyang,项目名称:pylith,代码行数:7,代码来源:PetscManager.py


示例19: __init__

 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,代码行数:27,代码来源:Solution2DQuadratic.py


示例20: __init__

    def __init__(self):
        Component.__init__(self, "locator", facility="recordLocator")
        self._alphabet = None
        self._base = None
        self._hashtable = None

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python logger.log函数代码示例发布时间:2022-05-27
下一篇:
Python Script.Script类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap