def _configure(self): """Setup members using inventory. """ Application._configure(self) self.snapshots = list(map(float, self.snapshots)) return
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
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
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
def _configure(self): Application._configure(self) self.modeler = self.inventory.modeler self.contours = self.inventory.contours self.extender = self.inventory.extender self.slabTopFilename = self.inventory.slabTopFilename self.slabBotFilename = self.inventory.slabBotFilename self.splayFilename = self.inventory.splayFilename self.slabThickness = self.inventory.slabThickness self.slabNormalDir = self.inventory.slabNormalDir
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
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
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
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
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
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
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
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 _configure(self): """Setup members using inventory. """ Application._configure(self)
def _configure(self): Script._configure(self) self._delay = self.inventory.delay self._doClient = self.inventory.client self._doServer = self.inventory.server return
def _configure(self): Script._configure(self) self.stream = self.inventory.stream return
def _configure(self): Script._configure(self) self.client = self.inventory.client return