本文整理汇总了Python中pyre.applications.Script.Script类的典型用法代码示例。如果您正苦于以下问题:Python Script类的具体用法?Python Script怎么用?Python Script使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Script类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, name=None):
Script.__init__(self, name)
DynamicComponentHarness.__init__(self)
self.client = ""
return
开发者ID:Netflix,项目名称:vmaf,代码行数:7,代码来源:ServiceHarness.py
示例2: __init__
def __init__(self, name="simpledbqueryapp"):
"""
Constructor.
"""
Script.__init__(self, name)
# Database information
self.numLocs = None
self.spaceDim = None
self.numVals = None
self.dataDim = None
self.dbCoords = None
self.dbData = None
self.names = None
self.units = None
# Query information
self.numPts = None
self.coords = None
self.dist2 = None
self.area = None
self.areaDir = None
self.volume = None
return
开发者ID:geodynamics,项目名称:spatialdata,代码行数:25,代码来源:SimpleDBQueryApp.py
示例3: _configure
def _configure(self):
"""
Set members using inventory.
"""
Script._configure(self)
self.data = self.inventory.data
return
开发者ID:rishabhdutta,项目名称:pylith,代码行数:7,代码来源:ElasticMaterialApp.py
示例4: _init
def _init(self):
Script._init(self)
import pyre.db
self.db = pyre.db.connect(self.inventory.db)
return
开发者ID:bmi-forum,项目名称:bmi-pyre,代码行数:7,代码来源:db.py
示例5: __init__
def __init__(self, name="quadratureapp"):
"""
Constructor.
"""
Script.__init__(self, name)
# Mesh information
self.spaceDim = None
self.cellDim = None
self.numVertices = None
self.numCells = None
self.vertices = None
self.cells = None
# Reference cell information
self.numBasis = None
self.numQuadPts = None
self.verticesRef = None
self.quadPtsRef = None
self.quadWts = None
self.basis = None
self.basisDerivRef = None
self.basisDeriv = None
# Computed quadrature information
self.quadPts = None
self.jacobian = None
self.jacobianDet = None
self.jacobianInv = None
return
开发者ID:rishabhdutta,项目名称:pylith,代码行数:30,代码来源:QuadratureApp.py
示例6: __init__
def __init__(self, name="unittestapp", petsc_options=[("malloc_dump", "true")]):
"""
Constructor.
"""
Script.__init__(self, name)
self.petscOptions = petsc_options
return
开发者ID:geodynamics,项目名称:pylith,代码行数:7,代码来源:UnitTestApp.py
示例7: __init__
def __init__(self):
Script.__init__(self, 'derunapp')
self.scale = ''
self.probability = ''
self.mod = ''
self.strategy = ''
self.solution = None
return
开发者ID:cdeil,项目名称:mystic,代码行数:8,代码来源:derun.py
示例8: __init__
def __init__(self, name=None):
if name is None:
name = 'sample'
Script.__init__(self, name)
ComponentHarness.__init__(self)
return
开发者ID:bmi-forum,项目名称:bmi-pyre,代码行数:8,代码来源:sample.py
示例9: _configure
def _configure(self):
"""
Setup members based on inventory.
"""
Script._configure(self)
self.geometry = self.inventory.geometry
self.values = self.inventory.values
self.iohandler = self.inventory.iohandler
return
开发者ID:geodynamics,项目名称:spatialdata,代码行数:9,代码来源:GenSimpleDBApp.py
示例10: __init__
def __init__(self, name, asCGI=None):
Script.__init__(self, name)
self.stream = None
if asCGI is None:
asCGI = True
self.asCGIScript(asCGI)
return
开发者ID:bmi-forum,项目名称:bmi-pyre,代码行数:9,代码来源:CGI.py
示例11: _configure
def _configure(self):
"""
Set members using inventory.
"""
Script._configure(self)
self.data = self.inventory.data
self.mesh = self.inventory.mesh
self.quadrature = self.inventory.quadrature
return
开发者ID:rishabhdutta,项目名称:pylith,代码行数:9,代码来源:QuadratureApp.py
示例12: _configure
def _configure(self):
Script._configure(self)
self.name = self.inventory.name
self.unitcell_path = self.inventory.unitcell
self.ecutoff = self.inventory.ecutoff
self.xcf = self.inventory.xcf
self.mpmesh = self.inventory.mpmesh
self.generateInputsOnly = self.inventory.generateInputsOnly
self.cmd = self.inventory.cmd
return
开发者ID:danse-inelastic,项目名称:AbInitio,代码行数:10,代码来源:vaspapp.py
示例13: _configure
def _configure(self):
from mystic import strategy as detools
Script._configure(self)
mod = __import__(self.inventory.inputs)
self.mod = mod
if self.inventory.verbose:
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
datefmt='%a, %d %b %Y %H:%M:%S')
开发者ID:Magellen,项目名称:mystic,代码行数:10,代码来源:testsolvers_pyre.py
示例14: _configure
def _configure(self):
"""
Set members using inventory.
"""
Script._configure(self)
self.data = self.inventory.data
self.mesh = self.inventory.mesh
self.quadrature = self.inventory.quadrature
self.material = self.inventory.material
self.solution = self.inventory.solution
return
开发者ID:jjle,项目名称:pylith,代码行数:11,代码来源:IntegratorApp.py
示例15: _configure
def _configure(self):
Script._configure(self)
for param in self.parameters:
exec "self.%s = self.inventory.%s" % (param, param)
continue
self.C_ms = numpy.array(eval(self.C_ms))
# it seems that it works better to make viewDirectory equal to outputDir
self.outputDir = self.viewDirectory
return
开发者ID:danse-inelastic,项目名称:multiphonon,代码行数:11,代码来源:GetDOS.py
示例16: __init__
def __init__(self, name="slip_invert"):
Application.__init__(self, name)
self.dataCoords = None
self.dataVals = None
self.dataCov = None
self.dataNames = []
self.numDataPoints = 0
self.numDesignRows = 0
self.numFaultVerts = 0
self.numFaultCells = 0
self.faultVertCoords = None
self.faultCells = None
self.numImpulses = 0
self.impulseInds = None
self.impulseCoords = None
self.summaryHead = 'Penalty-weight\tData-residual\t' + \
'Weighted-data-residual\tPenalty-residual\t' + \
'Weighted-penalty-residual\tTotal-residual\t' + \
'Total-weighted-residual'
self.numSummaryCols = 7
self.design = None
return
开发者ID:geodynamics,项目名称:pylith,代码行数:28,代码来源:slip_invert.py
示例17: _configure
def _configure(self):
"""
Setup members using inventory.
"""
Application._configure(self)
# import pdb
# pdb.set_trace()
# File info.
self.vtkInputFile = self.inventory.vtkInputFile
self.vtkOutputFile = self.inventory.vtkOutputFile
# Index information
self.tensorIndex = self.inventory.tensorIndex
self.tensorComponentsOrder = self.inventory.tensorComponentsOrder
# Parameters
self.frictionAngle = self.inventory.frictionAngle.value
self.cohesion = self.inventory.cohesion.value
sinFric = math.sin(self.frictionAngle)
cosFric = math.cos(self.frictionAngle)
denomFriction = math.sqrt(3.0) * (3.0 - sinFric)
self.alphaYield = 2.0 * sinFric/denomFriction
self.beta = 6.0 * self.cohesion * cosFric/denomFriction
return
开发者ID:jjle,项目名称:pylith,代码行数:26,代码来源:stressinfo.py
示例18: _configure
def _configure(self):
"""
Setup members using inventory.
"""
Application._configure(self)
self.elasThick = self.inventory.elasThick
self.lockDepth = self.inventory.lockDepth
self.recurrenceTime = self.inventory.recurrenceTime
self.viscosity = self.inventory.viscosity
self.shearModulus = self.inventory.shearModulus
self.velocity = self.inventory.plateVelocity / 2.0
self.numberCycles = self.inventory.numberCycles
self.numberSteps = self.inventory.numberSteps
self.numberTerms = self.inventory.numberTerms
self.numberPoints = self.inventory.numberPoints
self.deltaX = self.inventory.deltaX
self.xEpsilon = self.inventory.xEpsilon
self.outputDisp = self.inventory.outputDisp
self.outputVel = self.inventory.outputVel
self.dispFilename = self.inventory.dispFilename
self.velFilename = self.inventory.velFilename
self.deltaT = self.recurrenceTime / self.numberSteps
self.tauFac = 0.5 * self.shearModulus / self.viscosity
self.tau0 = self.recurrenceTime * self.tauFac
return
开发者ID:geodynamics,项目名称:pylith_benchmarks,代码行数:28,代码来源:calc_analytic.py
示例19: _configure
def _configure(self):
"""
Setup members using inventory.
"""
Application._configure(self)
return
开发者ID:geodynamics,项目名称:pylith,代码行数:7,代码来源:generate_slowslip.py
示例20: _configure
def _configure(self):
"""
Setup members using inventory.
"""
Application._configure(self)
self.dataDim = self.inventory.dataDim
self.pointsFile = self.inventory.pointsFile
self.segsFile = self.inventory.segsFile
self.slipScale = self.inventory.slipScale
self.spaceDim = 3
self.pointsSpatialDB = self.inventory.pointsSpatialDB
self.upDir = self.inventory.upDir
self.normalDir = self.inventory.normalDir
self.dipSlip = self.inventory.dipSlip
self.dipCutoff = self.inventory.dipCutoff
self.xMinVal = self.inventory.xMin.value
self.xMaxVal = self.inventory.xMax.value
self.yMinVal = self.inventory.yMin.value
self.yMaxVal = self.inventory.yMax.value
self.zMinVal = self.inventory.zMin.value
self.zMaxVal = self.inventory.zMax.value
self.defaultValues = self.inventory.defaultValues
self.upVec = numpy.array([float(self.upDir[0]), float(self.upDir[1]),
float(self.upDir[2])], dtype=numpy.float64)
self.normalVec = numpy.array([float(self.normalDir[0]),
float(self.normalDir[1]),
float(self.normalDir[2])], dtype=numpy.float64)
self.dipCutoffProj = abs(math.sin(self.dipCutoff.value))
return
开发者ID:jjle,项目名称:pylith,代码行数:33,代码来源:transform.py
注:本文中的pyre.applications.Script.Script类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论