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
Пример #2
0
 def _configure(self):
     Script._configure(self)
     self.clerk          = self.inventory.clerk
     self.clerk.director = self
     self.wwwuser        = self.inventory.wwwuser
     self.tables         = self.inventory.tables
     return
Пример #3
0
  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
Пример #4
0
 def _configure(self):
   """
   Set members using inventory.
   """
   Script._configure(self)
   self.data = self.inventory.data
   return
Пример #5
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)

    return
Пример #6
0
  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
Пример #7
0
  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.vtkTensorIndex = self.inventory.vtkTensorIndex
    self.vtkTensorComponentsOrder = self.inventory.vtkTensorComponentsOrder

    # Regional field
    s1 = float(self.inventory.regionalSigma1[0])
    s2 = float(self.inventory.regionalSigma1[0])
    s3 = float(self.inventory.regionalSigma1[0])
    sVec = numpy.array([s1, s2, s3], dtype=numpy.float64)
    self.regionalSigma = numpy.diag(sVec)
    self.regionalAxes = numpy.zeros((3,3), dtype=numpy.float64)
    for i in range(3):
      self.regionalAxes[0,i] = float(self.inventory.regionalSigma1[i+1])
      self.regionalAxes[1,i] = float(self.inventory.regionalSigma2[i+1])
      self.regionalAxes[2,i] = float(self.inventory.regionalSigma3[i+1])

    return
Пример #8
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   Application._configure(self)
   self.cfgFile = self.inventory.cfgFile
   self.pylith = self.inventory.pylith
   self.petscOptions = self.inventory.petscOptions
   return
Пример #9
0
 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
Пример #10
0
 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
Пример #11
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   Application._configure(self)
   self.mesh = self.inventory.mesh
   self.groups = self.inventory.groups
   self.materials = self.inventory.materials
   return
Пример #12
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   Application._configure(self)
   self.polesInputFile = self.inventory.polesInputFile
   self.polesOutputFile = self.inventory.polesOutputFile
   self.geogToCart = self.inventory.geogToCart
   self.spaceDim = 3
   return
Пример #13
0
 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
Пример #14
0
 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')
Пример #15
0
    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
Пример #16
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   Application._configure(self)
   self.ucdFaceFile = self.inventory.ucdFaceFile
   self.faultIDNum = self.inventory.faultIDNum
   self.pointOutputFile = self.inventory.pointOutputFile
   self.nodeValuesList = self.inventory.nodeValuesList
   self.excludeZeroNormals = self.inventory.excludeZeroNormals
   return
Пример #17
0
 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
Пример #18
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   Application._configure(self)
   self.psetFile = self.inventory.psetFile
   self.ucdFile = self.inventory.ucdFile
   self.pointOutputFile = self.inventory.pointOutputFile
   self.valuesList = self.inventory.valuesList
   self.outputIndex = self.inventory.outputIndex
   self.excludeZeroNormals = self.inventory.excludeZeroNormals
   return
Пример #19
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)
    self.penaltyWeights = numpy.array(self.penaltyWeightVals, dtype=numpy.float64)
    self.numPenaltyWeights = self.penaltyWeights.shape[0]
    
    # Left-lateral and updip components from assumed rake.
    self.llComp = math.cos(self.rake.value)
    self.udComp = math.sin(self.rake.value)

    return
Пример #20
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)

    # Filenames
    self.inFile = self.inventory.inFile
    self.outRoot = self.inventory.outRoot
    self.journalOut = self.inventory.journalOut
    self.surfaceOut = self.inventory.surfaceOut

    return
Пример #21
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)
    self.srcCoordSys = self.inventory.srcCoordSys
    self.destCoordSys = self.inventory.destCoordSys
    self.dataDim = self.inventory.dataDim
    self.bcType = self.inventory.bcType
    self.pointsFile = self.inventory.pointsFile
    self.pointsSpatialDB = self.inventory.pointsSpatialDB
    self.bcScale = self.inventory.bcScale
    self.upDir = self.inventory.upDir
    self.normalDir = self.inventory.normalDir
    self.eulerLat = self.inventory.eulerLat
    self.eulerLon = self.inventory.eulerLon
    self.eulerRot = self.inventory.eulerRot
    self.spaceDim = self.srcCoordSys.spaceDim
    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

    lat = self.eulerLat.value
    lon = self.eulerLon.value
    rot = self.eulerRot.value
    clat = math.cos(lat)
    slat = math.sin(lat)
    clon = math.cos(lon)
    slon = math.sin(lon)
    # Note that the Euler pole already includes the earth radius term.
    self.eulerPole[0] = self.earthRad * rot * clat * clon
    self.eulerPole[1] = self.earthRad * rot * clat * slon
    self.eulerPole[2] = self.earthRad * rot * slat

    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
Пример #22
0
    def _configure(self):
        base._configure(self)
        self.id = self.inventory.id
        self.type = self.inventory.type

        self.debug = self.inventory.debug

        self.idd = self.inventory.idd
        self.clerk = self.inventory.clerk
        self.clerk.director = self
        self.dds = self.inventory.dds
        self.dds.director = self
        self.csaccessor = self.inventory.csaccessor
        return
Пример #23
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)
    self.faults = self.inventory.faults
    self.filenamePattern = self.inventory.filenamePattern
    self.snapshots = map(float, self.inventory.snapshots)
    self.snapshotUnits = self.inventory.snapshotUnits
    self.dbProps = self.inventory.dbProps
    self.cs = self.inventory.cs
    self.filenameOut = self.inventory.filenameOut
    self.typos = self.inventory.typos

    return
Пример #24
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)

    # Filenames
    self.inFile = self.inventory.inFile
    self.outFile = self.inventory.outFile

    # Parameters
    self.intervalSize = self.inventory.intervalSize
    self.minCheck = self.inventory.minCheck
    self.maxCheck = self.inventory.maxCheck

    return
Пример #25
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)
    import os
    import re

    # Set up info for input files
    totalInputPath = os.path.normpath(os.path.join(os.getcwd(),
                                                   self.inventory.vtkInputRoot))
    self.vtkInputDir = os.path.dirname(totalInputPath)
    baseInputName = os.path.basename(totalInputPath)
    baseInputNameLen = len(baseInputName)
    if baseInputName.endswith(".vtk"):
      baseInputNameStripped = baseInputName[0:baseInputNameLen-4]
    else:
      baseInputNameStripped = baseInputName
    testFind = re.search('_t[0-9]*$', baseInputNameStripped)
    if testFind != None:
      timeInd = baseInputNameStripped.rfind(testFind.group(0))
      self.vtkInputRoot = baseInputNameStripped[0:timeInd]
    else:
      self.vtkInputRoot = baseInputNameStripped

    # Set up info for output files
    totalOutputPath = os.path.normpath(os.path.join(
      os.getcwd(), self.inventory.vtkOutputRoot))
    self.vtkOutputDir = os.path.dirname(totalOutputPath)
    baseOutputName = os.path.basename(totalOutputPath)
    baseOutputNameLen = len(baseOutputName)
    if baseOutputName.endswith(".vtk"):
      baseOutputNameStripped = baseOutputName[0:baseOutputNameLen-4]
    else:
      baseOutputNameStripped = baseOutputName
    testFind = re.search('_t[0-9]*$', baseOutputNameStripped)
    if testFind != None:
      timeInd = baseOutputNameStripped.rfind(testFind.group(0))
      self.vtkOutputRoot = baseOutputNameStripped[0:timeInd]
    else:
      self.vtkOutputRoot = baseOutputNameStripped

    self.scaleFactor = self.inventory.scaleFactor

    return
Пример #26
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)

    # Filenames
    self.faultInfoFile = self.inventory.faultInfoFile
    self.faultResultsFile = self.inventory.faultResultsFile
    self.faultOutputFile = self.inventory.faultOutputFile

    # Parameters
    self.frictionCoeff = self.inventory.frictionCoeff
    self.stressScaleFactor = self.inventory.stressScaleFactor
    self.slipScaleFactor = self.inventory.slipScaleFactor
    self.shearDirection = self.inventory.shearDirection

    return
Пример #27
0
  def _configure(self):
    """
    Set members using inventory.
    """
    Script._configure(self)
    if self.inventory.reader.name == "dummy":
      self.reader = None
    else:
      self.reader = self.inventory.reader

    if self.inventory.converter.name == "dummy":
      self.converter = None
    else:
      self.converter = self.inventory.converter

    if self.inventory.writer.name == "dummy":
      self.writer = self.reader
    else:
      self.writer = self.inventory.writer
      
    return
Пример #28
0
    def _configure(self):
        from mystic import strategy as detools
        Script._configure(self)
        mod = __import__(self.inventory.costfunc)
        self.mod = mod

        self.scale = self.inventory.scale
        self.probability = self.inventory.probability
        try:
            self.probability = self.mod.probability
        except:
            pass
        try:
            self.scale = self.mod.scale
        except:
            pass
        self.strategy = getattr(detools, self.inventory.strategy)

        if self.inventory.verbose:
            logging.basicConfig(level=logging.DEBUG,
                                format='%(asctime)s %(levelname)s %(message)s',
                                datefmt='%a, %d %b %Y %H:%M:%S')
Пример #29
0
    def _configure(self):
        from mystic import strategy as detools
        Script._configure(self)
        mod = __import__(self.inventory.costfunc)
        self.mod = mod

        self.scale = self.inventory.scale
        self.probability = self.inventory.probability
        try:
            self.probability = self.mod.probability
        except:
            pass
        try:
            self.scale = self.mod.scale
        except:
            pass
        self.strategy = getattr(detools,self.inventory.strategy) 
       
        if self.inventory.verbose:
            logging.basicConfig(level=logging.DEBUG,
                                format='%(asctime)s %(levelname)s %(message)s',
                                datefmt='%a, %d %b %Y %H:%M:%S')
Пример #30
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)
    self.elasThick = self.inventory.elasThick.value
    self.lockDepth = self.inventory.lockDepth.value
    self.recurrenceTime = self.inventory.recurrenceTime.value
    self.viscosity = self.inventory.viscosity.value
    self.shearModulus = self.inventory.shearModulus.value
    self.velocity = self.inventory.plateVelocity.value/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.value
    self.xEpsilon = self.inventory.xEpsilon.value
    self.outputDisplVTK = self.inventory.outputDisplVTK
    self.outputDisplCSV = self.inventory.outputDisplCSV
    self.outputVelVTK = self.inventory.outputVelVTK
    self.outputVelCSV = self.inventory.outputVelCSV
    self.displVTKBaseName = self.inventory.displVTKBaseName
    self.displCSVFileName = self.inventory.displCSVFileName
    self.velVTKBaseName = self.inventory.velVTKBaseName
    self.velCSVFileName = self.inventory.velCSVFileName
    self.displScaleFactor = self.inventory.displScaleFactor
    self.velScaleFactor = self.inventory.velScaleFactor
    self.coordScaleFactor = self.inventory.coordScaleFactor
    self.coordUnits = self.inventory.coordUnits
    self.timeUnits = self.inventory.timeUnits.value
    self.timeStampWidth = self.inventory.timeStampWidth
    self.title = self.inventory.title

    self.deltaT = self.recurrenceTime/self.numberSteps
    self.tauFac = 0.5*self.shearModulus/self.viscosity
    self.tau0 = self.recurrenceTime * self.tauFac

    return
Пример #31
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)

    # Filenames
    self.inputDem = self.inventory.inputDem
    self.vtkOutputFile = self.inventory.vtkOutputFile
    self.masterJournal = self.inventory.masterJournal
    self.uLinePrefix = self.inventory.uLinePrefix
    self.uLineJournal = self.inventory.uLineJournal
    self.vLinePrefix = self.inventory.vLinePrefix
    self.vLineJournal = self.inventory.vLineJournal
    self.acisFilename = self.inventory.acisFilename

    # Parameters
    self.xMin = self.inventory.xMin
    self.xMax = self.inventory.xMax
    self.yMin = self.inventory.yMin
    self.yMax = self.inventory.yMax
    self.skipInterval = self.inventory.skipInterval

    return
Пример #32
0
    def _configure(self):
        """
    Setup members using inventory.
    """
        Application._configure(self)

        # Filenames
        self.inputDem = self.inventory.inputDem
        self.vtkOutputFile = self.inventory.vtkOutputFile
        self.masterJournal = self.inventory.masterJournal
        self.uLinePrefix = self.inventory.uLinePrefix
        self.uLineJournal = self.inventory.uLineJournal
        self.vLinePrefix = self.inventory.vLinePrefix
        self.vLineJournal = self.inventory.vLineJournal
        self.acisFilename = self.inventory.acisFilename

        # Parameters
        self.xMin = self.inventory.xMin
        self.xMax = self.inventory.xMax
        self.yMin = self.inventory.yMin
        self.yMax = self.inventory.yMax
        self.skipInterval = self.inventory.skipInterval

        return
Пример #33
0
 def _configure(self):
     Script._configure(self)
     self.client = self.inventory.client
     return
Пример #34
0
    def _configure(self):
        Script._configure(self)

        self.stream = self.inventory.stream
        return
Пример #35
0
 def _configure(self):
     Script._configure(self)
     self.friend = self.inventory.name
     return
Пример #36
0
 def _configure(self):
     Base._configure(self)
     self.friend = self.inventory.name
     return
Пример #37
0
  def _configure(self):
    """
    Setup members using inventory.
    """
    Application._configure(self)
    import pdb
    pdb.set_trace()

    # Set up info for input files
    totalInputPath = os.path.normpath(
      os.path.join(os.getcwd(), self.inventory.vtkInputRoot))
    self.vtkInputDir = os.path.dirname(totalInputPath)
    baseInputName = os.path.basename(totalInputPath)
    baseInputNameLen = len(baseInputName)
    if baseInputName.endswith(".vtk"):
      baseInputNameStripped = baseInputName[0:baseInputNameLen-4]
    else:
      baseInputNameStripped = baseInputName
    testFind = re.search('_t[0-9]*$', baseInputNameStripped)
    if testFind != None:
      timeInd = baseInputNameStripped.rfind(testFind.group(0))
      self.vtkInputRoot = baseInputNameStripped[0:timeInd]
    else:
      self.vtkInputRoot = baseInputNameStripped

    # Solution mode info
    self.stressRefMode = self.inventory.stressRefMode
    self.orientationMode = self.inventory.orientationMode
    self.initialStateIndex = self.inventory.initialStateIndex
    self.constantStateValues = self.inventory.constantStateValues
    self.isotropicPoroelastic = self.inventory.isotropicPoroelastic
    
    # Index information
    self.vtkStressIndex = self.inventory.vtkStressIndex
    self.vtkStressComponentsOrder = self.inventory.vtkStressComponentsOrder

    # Parameters
    self.frictionCoeff = self.inventory.frictionCoeff
    self.skemptonCoeff = self.inventory.skemptonCoeff
    self.cffPlaneNormal = numpy.array([float(self.inventory.cffPlaneNormal[0]),
                                       float(self.inventory.cffPlaneNormal[1]),
                                       float(self.inventory.cffPlaneNormal[2]),
                                       dtype=numpy.float64)

    # Set up info for output files
    totalOutputPath = os.path.normpath(os.path.join(
      os.getcwd(), self.inventory.vtkOutputRoot))
    self.vtkOutputDir = os.path.dirname(totalOutputPath)
    baseOutputName = os.path.basename(totalOutputPath)
    baseOutputNameLen = len(baseOutputName)
    if baseOutputName.endswith(".vtk"):
      baseOutputNameStripped = baseOutputName[0:baseOutputNameLen-4]
    else:
      baseOutputNameStripped = baseOutputName
    testFind = re.search('_t[0-9]*$', baseOutputNameStripped)
    if testFind != None:
      timeInd = baseOutputNameStripped.rfind(testFind.group(0))
      self.vtkOutputRoot = baseOutputNameStripped[0:timeInd]
    else:
      self.vtkOutputRoot = baseOutputNameStripped

    return


  def _getFileInfo(self):
    """
    Find input files and set up filenames for input and output.
    """

    # Create list of input files and associated times
    fileString = self.vtkInputRoot + "_t[0-9]*.vtk"
    searchString = os.path.join(self.vtkInputDir, fileString)
    self.vtkInputList = glob.glob(searchString)
    self.numVtkInputFiles = len(self.vtkInputList)
    index1 = self.vtkInputList[0].rfind("_t")
    index2 = self.vtkInputList[0].rfind(".vtk")
    self.timeStampWidth = index2 - index1 - 2
    for vtkFile in self.vtkInputList:
      timeString = vtkFile[index1+2:index2]
      self.vtkInputTimes.append(float(timeString))

    # Determine time index from which to start processing
    if self.stressRefMode == "constant_state":
      self.startIndex  = 0
    elif self.stressRefMode == "previous_state":
      self.startIndex  = 1
    else:
      self.startIndex = self.initialStateIndex + 1
      
    # Raise exception if there aren't enough files to process
    numFilesToProcess = self.numVtkInputFiles - self.startIndex - 1
    if numFilesToProcess < 1:
      try:
        raise TooFewFilesError(numFilesToProcess)
      except TooFewFilesError, e:
        print 'Not enough files found for search string:  ', searchString
        print 'Number of files found:  ', e.value

    # Create output directory if it doesn't exist
    if not os.path.isdir(self.vtkOutputDir):
      os.mkdir(self.vtkOutputDir)

    return
      

  def _cffLoop(self):
    """
    Function to loop over input files, compute Cff relative to reference state,
    and write the results to output files.
    """

    # Define function to use, depending on whether we are computing CFF on a
    # predefined plane or an optimally-oriented plane.
    if self.orientationMode == "optimally_oriented":
      cffFunct = self._cffOop
    else:
      cffFunct = self._cffPredefined
      
    # Define reference stresses unless differences are computed between each
    # time step.
    if self.stressRefMode == "constant_state":
      testFile = os.path.join(self.vtkInputDir, self.vtkInputList[0]))
      testStress = self._readStress(testFile)
      refStress = numpy.tile(self.constantStateValues,
      (self.numStressPoints, 1))
Пример #38
0
 def _configure(self):
     Script._configure(self)
     self.toolkit = self.inventory.toolkit
     self.maingml = self.inventory.maingml
     return
Пример #39
0
 def _configure(self):
     Script._configure(self)
     self.out = self.inventory.out
     self.filename = self.inventory.name
     return
Пример #40
0
 def _configure(self):
     Script._configure(self)
     self._delay = self.inventory.delay
     self._doClient = self.inventory.client
     self._doServer = self.inventory.server
     return
Пример #41
0
 def _configure(self):
     Script._configure(self)
     self.db = self.inventory.db
     return
Пример #42
0
 def _configure(self):
     Script._configure(self)
     self.modeller = self.inventory.modeller
     return
Пример #43
0
 def _configure(self):
     Script._configure(self)
     self.launcher = self.inventory.launcher
     return
Пример #44
0
 def _configure(self):
     Script._configure(self)
     return
Пример #45
0
    def _configure(self):
        base._configure(self)

        self.clerk = self.inventory.clerk
        self.clerk.director = self
        return
Пример #46
0
 def _configure(self):
     Script._configure(self)
     self.friend = self.inventory.name
     self.greeter1 = self.inventory.greeter1
     self.greeter2 = self.inventory.greeter2
     return