Public Member Functions | |
def | __init__ (self, comm=None, options=None) |
def | __call__ (self) |
def | zeroTimeAccurateAdjointVectors (self) |
def | saveMultiPointField (self, indexMP) |
def | setMultiPointField (self, indexMP) |
def | calcPrimalResidualStatistics (self, mode) |
def | setTimeInstanceField (self, instanceI) |
def | initTimeInstanceMats (self) |
def | setTimeInstanceVar (self, mode) |
def | writeDesignVariable (self, fileName, xDV) |
def | writeDeformedFFDs (self, counter=None) |
def | writeTotalDeriv (self, fileName, sens, evalFuncs) |
def | getTimeInstanceObjFunc (self, instanceI, objFuncName) |
def | getForwardADDerivVal (self, objFuncName) |
def | evalFunctions (self, funcs, evalFuncs=None, ignoreMissing=False) |
def | evalFunctionsSens (self, funcsSens, evalFuncs=None) |
def | setDVGeo (self, DVGeo) |
def | addFamilyGroup (self, groupName, families) |
def | setMesh (self, mesh) |
def | setEvalFuncs (self, evalFuncs) |
def | getSurfaceConnectivity (self, groupName=None) |
def | getTriangulatedMeshSurface (self, groupName=None, **kwargs) |
def | printFamilyList (self) |
def | setDesignVars (self, x) |
def | writeFieldSensitivityMap (self, objFuncName, designVarName, solutionTime, fieldType, sensVec) |
def | writeSurfaceSensitivityMap (self, objFuncName, designVarName, solutionTime) |
def | writePetscVecMat (self, name, vecMat, mode="Binary") |
def | readPetscVecMat (self, name, vecMat) |
def | solvePrimal (self) |
def | solveAdjoint (self) |
def | mapdXvTodFFD (self, totalDerivXv) |
def | getForces (self, groupName=None) |
def | getAcousticData (self, groupName=None) |
def | calcTotalDeriv (self, dRdX, dFdX, psi, totalDeriv) |
def | calcdFdAOAAnalytical (self, objFuncName, dFdAOA) |
def | runColoring (self) |
def | runDecomposePar (self) |
def | deletePrevPrimalSolTime (self) |
def | renameSolution (self, solIndex) |
def | calcFFD2XvSeedVec (self) |
def | setdXvdFFDMat (self, designVarName, deltaVPointThreshold=1.0e-16) |
def | updateVolumePoints (self) |
def | setSurfaceCoordinates (self, coordinates, groupName=None) |
def | getSurfaceCoordinates (self, groupName=None) |
def | setPrimalBoundaryConditions (self, printInfo=1, printInfoAD=0) |
def | getPointSetName (self) |
def | getSolverMeshIndices (self) |
def | mapVector (self, vec1, groupName1, groupName2, vec2=None) |
def | xv2XvVec (self, xv, xvVec) |
def | xvFlatten2XvVec (self, xv, xvVec) |
def | setOption (self, name, value) |
def | setFieldValue4GlobalCellI (self, fieldName, val, globalCellI, compI=0) |
def | setFieldValue4LocalCellI (self, fieldName, val, localCellI, compI=0) |
def | updateBoundaryConditions (self, fieldName, fieldType) |
def | getOption (self, name) |
def | updateDAOption (self) |
def | syncDAOptionToActuatorDVs (self) |
def | getNLocalAdjointStates (self) |
def | getDVsCons (self) |
def | getStates (self) |
def | getResiduals (self) |
def | setStates (self, states) |
def | convertMPIVec2SeqArray (self, mpiVec) |
def | vec2Array (self, vec) |
def | array2Vec (self, array1) |
def | array2VecSeq (self, array1) |
def | vec2ArraySeq (self, vec) |
Main class for pyDAFoam Parameters ---------- comm : mpi4py communicator An optional argument to pass in an external communicator. options : dictionary The list of options to use with pyDAFoam.
Definition at line 673 of file pyDAFoam.py.
def __init__ | ( | self, | |
comm = None , |
|||
options = None |
|||
) |
Initialize class members
Definition at line 689 of file pyDAFoam.py.
def __call__ | ( | self | ) |
Solve the primal
Definition at line 868 of file pyDAFoam.py.
References PYDAFOAM.allSurfacesGroup, PYDAFOAM.designSurfacesGroup, PYDAFOAM.DVGeo, PYDAFOAM.mapVector(), PYDAFOAM.ptSetName, and PYDAFOAM.xs0.
def zeroTimeAccurateAdjointVectors | ( | self | ) |
Definition at line 1040 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, PYDAFOAM.dR00dW00TPsi, PYDAFOAM.dR00dW0TPsi, PYDAFOAM.dR0dW00TPsi, PYDAFOAM.dR0dW0TPsi, PYDAFOAM.dRdW00TPsi, PYDAFOAM.dRdW0TPsi, DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.objFuncNames4Adj, DAOption.setOption(), and PYDAFOAM.setOption().
def saveMultiPointField | ( | self, | |
indexMP | |||
) |
Save the state variable vector to self.wVecMPList
Definition at line 1134 of file pyDAFoam.py.
References PYDAFOAM.wVec, and PYDAFOAM.wVecMPList.
def setMultiPointField | ( | self, | |
indexMP | |||
) |
Set the state variable vector based on self.wVecMPList
Definition at line 1148 of file pyDAFoam.py.
References PYDAFOAM.wVec, and PYDAFOAM.wVecMPList.
def calcPrimalResidualStatistics | ( | self, | |
mode | |||
) |
Definition at line 1162 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, and PYDAFOAM.solverAD.
def setTimeInstanceField | ( | self, | |
instanceI | |||
) |
Set the OpenFOAM state variables based on instance index
Definition at line 1168 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, PYDAFOAM.solverAD, and PYDAFOAM.wVec.
def initTimeInstanceMats | ( | self | ) |
Definition at line 1185 of file pyDAFoam.py.
References PYDAFOAM.getNLocalAdjointStates(), DAOption.getOption(), PYDAFOAM.getOption(), and PYDAFOAM.solver.
def setTimeInstanceVar | ( | self, | |
mode | |||
) |
Definition at line 1209 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, PYDAFOAM.solverAD, PYDAFOAM.stateBCMat, PYDAFOAM.stateMat, PYDAFOAM.timeIdxVec, and PYDAFOAM.timeVec.
def writeDesignVariable | ( | self, | |
fileName, | |||
xDV | |||
) |
Write the design variable history to files in the json format
Definition at line 1225 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, and PYDAFOAM.nSolveAdjoints.
def writeDeformedFFDs | ( | self, | |
counter = None |
|||
) |
Write the deformed FFDs to the disk during optimization
Definition at line 1262 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, and OptFuncs.comm.
Referenced by PYDAFOAM.solvePrimal().
def writeTotalDeriv | ( | self, | |
fileName, | |||
sens, | |||
evalFuncs | |||
) |
Write the total derivatives history to files in the json format This will only write total derivative for evalFuncs
Definition at line 1278 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, and PYDAFOAM.nSolveAdjoints.
def getTimeInstanceObjFunc | ( | self, | |
instanceI, | |||
objFuncName | |||
) |
Return the value of objective function at the given time instance and name
Definition at line 1327 of file pyDAFoam.py.
References PYDAFOAM.solver.
def getForwardADDerivVal | ( | self, | |
objFuncName | |||
) |
Return the derivative value computed by forward mode AD primal solution
Definition at line 1334 of file pyDAFoam.py.
References PYDAFOAM.solverAD.
def evalFunctions | ( | self, | |
funcs, | |||
evalFuncs = None , |
|||
ignoreMissing = False |
|||
) |
Evaluate the desired functions given in iterable object, 'evalFuncs' and add them to the dictionary 'funcs'. The keys in the funcs dictionary will be have an _<ap.name> appended to them. Additionally, information regarding whether or not the last analysis with the solvePrimal was successful is included. This information is included as "funcs['fail']". If the 'fail' entry already exits in the dictionary the following operation is performed: funcs['fail'] = funcs['fail'] or <did this problem fail> In other words, if any one problem fails, the funcs['fail'] entry will be False. This information can then be used directly in the pyOptSparse. Parameters ---------- funcs : dict Dictionary into which the functions are saved. evalFuncs : iterable object containing strings If not None, use these functions to evaluate. ignoreMissing : bool Flag to suppress checking for a valid function. Please use this option with caution. Examples -------- >>> funcs = {} >>> CFDsolver() >>> CFDsolver.evalFunctions(funcs, ['CD', 'CL']) >>> funcs >>> # Result will look like: >>> # {'CD':0.501, 'CL':0.02750}
Definition at line 1340 of file pyDAFoam.py.
References PYDAFOAM.objFuncValuePrevIter, PYDAFOAM.primalFail, and PYDAFOAM.solver.
def evalFunctionsSens | ( | self, | |
funcsSens, | |||
evalFuncs = None |
|||
) |
Evaluate the sensitivity of the desired functions given in iterable object,'evalFuncs' and add them to the dictionary 'funcSens'. Parameters ---------- funcSens : dict Dictionary into which the function derivatives are saved. evalFuncs : iterable object containing strings The functions the user wants the derivatives of Examples -------- >>> funcSens = {} >>> CFDsolver.evalFunctionsSens(funcSens, ['CD', 'CL'])
Definition at line 1402 of file pyDAFoam.py.
References PYDAFOAM.adjointFail, PYDAFOAM.adjTotalDeriv, PYDAFOAM.dtype, and PYDAFOAM.DVGeo.
def setDVGeo | ( | self, | |
DVGeo | |||
) |
Set the DVGeometry object that will manipulate 'geometry' in this object. Note that <SOLVER> does not **strictly** need a DVGeometry object, but if optimization with geometric changes is desired, then it is required. Parameters ---------- dvGeo : A DVGeometry object. Object responsible for manipulating the constraints that this object is responsible for. Examples -------- >>> CFDsolver = <SOLVER>(comm=comm, options=CFDoptions) >>> CFDsolver.setDVGeo(DVGeo)
Definition at line 1442 of file pyDAFoam.py.
References PYDAFOAM.DVGeo.
def addFamilyGroup | ( | self, | |
groupName, | |||
families | |||
) |
Add a custom grouping of families called groupName. The groupName must be distinct from the existing families. All families must in the 'families' list must be present in the mesh file. Parameters ---------- groupName : str User-supplied custom name for the family groupings families : list List of string. Family names to combine into the family group
Definition at line 1461 of file pyDAFoam.py.
References PYDAFOAM.families.
def setMesh | ( | self, | |
mesh | |||
) |
Set the mesh object to the aero_solver to do geometric deformations Parameters ---------- mesh : MBMesh or USMesh object The mesh object for doing the warping
Definition at line 1499 of file pyDAFoam.py.
References PYDAFOAM.allWallsGroup, PYDAFOAM.getSolverMeshIndices(), PYDAFOAM.getSurfaceConnectivity(), PYDAFOAM.getSurfaceCoordinates(), DACheckMesh.mesh, and PYDAFOAM.mesh.
def setEvalFuncs | ( | self, | |
evalFuncs | |||
) |
Definition at line 1520 of file pyDAFoam.py.
References DAOption.getOption(), and PYDAFOAM.getOption().
def getSurfaceConnectivity | ( | self, | |
groupName = None |
|||
) |
Return the connectivity of the coordinates at which the forces (or tractions) are defined. This is the complement of getForces() which returns the forces at the locations returned in this routine. Parameters ---------- groupName : str Group identifier to get only forces cooresponding to the desired group. The group must be a family or a user-supplied group of families. The default is None which corresponds to all wall-type surfaces.
Definition at line 1529 of file pyDAFoam.py.
References PYDAFOAM.allWallsGroup, PYDAFOAM.basicFamilies, and PYDAFOAM.families.
Referenced by PYDAFOAM.getTriangulatedMeshSurface(), PYDAFOAM.setMesh(), and PYDAFOAM.writeSurfaceSensitivityMap().
def getTriangulatedMeshSurface | ( | self, | |
groupName = None , |
|||
** | kwargs | ||
) |
This function returns a trianguled verision of the surface mesh on all processors. The intent is to use this for doing constraints in DVConstraints. Returns ------- surf : list List of points and vectors describing the surface. This may be passed directly to DVConstraint setSurface() function.
Definition at line 1578 of file pyDAFoam.py.
References PYDAFOAM.allWallsGroup, DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, PYDAFOAM.getSurfaceConnectivity(), and PYDAFOAM.getSurfaceCoordinates().
def printFamilyList | ( | self | ) |
Print a nicely formatted dictionary of the family names
Definition at line 1644 of file pyDAFoam.py.
References PYDAFOAM.families.
def setDesignVars | ( | self, | |
x | |||
) |
Set the internal design variables. At the moment we don't have any internal DVs to set.
Definition at line 1650 of file pyDAFoam.py.
Referenced by PYDAFOAM.setdXvdFFDMat().
def writeFieldSensitivityMap | ( | self, | |
objFuncName, | |||
designVarName, | |||
solutionTime, | |||
fieldType, | |||
sensVec | |||
) |
Save the field sensitivity dObjFunc/dDesignVar map to disk. Parameters ---------- objFuncName : str Name of the objective function designVarName : str Name of the design variable solutionTime : float The solution time where the sensitivity will be save fieldType : str The type of the field, either scalar or vector sensVec : petsc vec The Petsc vector that contains the sensitivity
Definition at line 1729 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint().
def writeSurfaceSensitivityMap | ( | self, | |
objFuncName, | |||
designVarName, | |||
solutionTime | |||
) |
Save the sensitivity dObjFunc/dXs map to disk. where Xs is the wall surface mesh coordinate Parameters ---------- objFuncName : str Name of the objective function designVarName : str Name of the design variable solutionTime : float The solution time where the sensitivity will be save
Definition at line 1801 of file pyDAFoam.py.
References PYDAFOAM._writeOpenFoamHeader(), PYDAFOAM.allWallsGroup, PYDAFOAM.getSurfaceConnectivity(), PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.mapVector(), DACheckMesh.mesh, PYDAFOAM.mesh, PYDAFOAM.parallel, and PYDAFOAM.rank.
Referenced by PYDAFOAM.solveAdjoint().
def writePetscVecMat | ( | self, | |
name, | |||
vecMat, | |||
mode = "Binary" |
|||
) |
Write Petsc vectors or matrices
Definition at line 1946 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint().
def readPetscVecMat | ( | self, | |
name, | |||
vecMat | |||
) |
Read Petsc vectors or matrices
Definition at line 1962 of file pyDAFoam.py.
def solvePrimal | ( | self | ) |
Run primal solver to compute state variables and objectives Input: ------ xvVec: vector that contains all the mesh point coordinates Output: ------- wVec: vector that contains all the state variables self.primalFail: if the primal solution fails, assigns 1, otherwise 0
Definition at line 1971 of file pyDAFoam.py.
References PYDAFOAM.deletePrevPrimalSolTime(), DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.nSolvePrimals, PYDAFOAM.primalFail, PYDAFOAM.renameSolution(), PYDAFOAM.solver, PYDAFOAM.solverAD, DAOPTION.writeDeformedFFDs, PYDAFOAM.writeDeformedFFDs(), PYDAFOAM.wVec, and PYDAFOAM.xvVec.
def solveAdjoint | ( | self | ) |
Run adjoint solver to compute the adjoint vector psiVec Input: ------ xvVec: vector that contains all the mesh point coordinates wVec: vector that contains all the state variables Output: ------- self.adjTotalDeriv: the dict contains all the total derivative vectors self.adjointFail: if the adjoint solution fails, assigns 1, otherwise 0
Info("Saving the xvVec and wVec vectors to disk....") self.comm.Barrier() viewerXv = PETSc.Viewer().createBinary("xvVec_%03d.bin" % self.nSolveAdjoints, mode="w", comm=PETSc.COMM_WORLD) viewerXv(self.xvVec) viewerW = PETSc.Viewer().createBinary("wVec_%03d.bin" % self.nSolveAdjoints, mode="w", comm=PETSc.COMM_WORLD) viewerW(self.wVec)
Definition at line 2004 of file pyDAFoam.py.
References PYDAFOAM.adjointFail, PYDAFOAM.adjTotalDeriv, PYDAFOAM.adjVectors, PYDAFOAM.calcdFdAOAAnalytical(), PYDAFOAM.calcTotalDeriv(), PYDAFOAM.dR00dW00TPsi, PYDAFOAM.dR00dW0TPsi, PYDAFOAM.dR0dW00TPsi, PYDAFOAM.dR0dW0TPsi, PYDAFOAM.dRdW00TPsi, PYDAFOAM.dRdW0TPsi, PYDAFOAM.dRdWTPC, PYDAFOAM.dtype, PYDAFOAM.DVGeo, PYDAFOAM.getNLocalAdjointStates(), DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.nSolveAdjoints, PYDAFOAM.objFuncNames4Adj, PYDAFOAM.renameSolution(), DAPartDeriv.setdXvdFFDMat(), DASolvers.setdXvdFFDMat(), DASolver.setdXvdFFDMat(), PYDAFOAM.setdXvdFFDMat(), DAOption.setOption(), PYDAFOAM.setOption(), PYDAFOAM.solver, PYDAFOAM.solverAD, DAOption.updateDAOption(), DASolvers.updateDAOption(), DASolver.updateDAOption(), PYDAFOAM.updateDAOption(), PYDAFOAM.writeFieldSensitivityMap(), PYDAFOAM.writePetscVecMat(), PYDAFOAM.writeSurfaceSensitivityMap(), PYDAFOAM.wVec, PYDAFOAM.xv, and PYDAFOAM.xvVec.
def mapdXvTodFFD | ( | self, | |
totalDerivXv | |||
) |
Map the Xv derivative (volume derivative) to the FFD derivatives (design variables) Essentially, we first map the Xv (volume) to Xs (surface) using IDWarp, then, we further map Xs (surface) to FFD using pyGeo Input: ------ totalDerivXv: total derivative dFdXv vector Output: ------ dFdFFD: the mapped total derivative with respect to FFD variables
Definition at line 2489 of file pyDAFoam.py.
References PYDAFOAM.allWallsGroup, DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, PYDAFOAM.designSurfacesGroup, PYDAFOAM.dtype, PYDAFOAM.DVGeo, PYDAFOAM.mapVector(), DACheckMesh.mesh, PYDAFOAM.mesh, PYDAFOAM.ptSetName, and PYDAFOAM.xv.
Referenced by PYDAFOAM.solveAdjoint().
def getForces | ( | self, | |
groupName = None |
|||
) |
Return the forces on this processor on the families defined by groupName. Parameters ---------- groupName : str Group identifier to get only forces cooresponding to the desired group. The group must be a family or a user-supplied group of families. The default is None which corresponds to design surfaces. Returns ------- forces : array (N,3) Forces on this processor. Note that N may be 0, and an empty array of shape (0, 3) can be returned.
Definition at line 2521 of file pyDAFoam.py.
References PYDAFOAM._getSurfaceSize(), DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, PYDAFOAM.couplingSurfacesGroup, and PYDAFOAM.solver.
def getAcousticData | ( | self, | |
groupName = None |
|||
) |
Return the acoustic data on this processor. Parameters ---------- groupName : str Group identifier to get only data cooresponding to the desired group. The group must be a family or a user-supplied group of families. The default is None which corresponds to design surfaces. Returns ------- position : array (N,3) Face positions on this processor. Note that N may be 0, and an empty array of shape (0, 3) can be returned. normal : array (N,3) Face normals on this processor. Note that N may be 0, and an empty array of shape (0, 3) can be returned. area : array (N) Face areas on this processor. Note that N may be 0, and an empty array of shape (0) can be returned. forces : array (N,3) Face forces on this processor. Note that N may be 0, and an empty array of shape (0, 3) can be returned.
Definition at line 2587 of file pyDAFoam.py.
References PYDAFOAM._getSurfaceSize(), and PYDAFOAM.solver.
def calcTotalDeriv | ( | self, | |
dRdX, | |||
dFdX, | |||
psi, | |||
totalDeriv | |||
) |
Compute total derivative Input: ------ dRdX, dFdX, and psi Output: ------ totalDeriv = dFdX - [dRdX]^T * psi
Definition at line 2693 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint().
def calcdFdAOAAnalytical | ( | self, | |
objFuncName, | |||
dFdAOA | |||
) |
This function computes partials derivatives dFdAlpha with alpha being the angle of attack (AOA) We use the analytical method: CD = Fx * cos(alpha) + Fy * sin(alpha) CL = - Fx * sin(alpha) + Fy * cos(alpha) So: dCD/dAlpha = - Fx * sin(alpha) + Fy * cos(alpha) = CL dCL/dAlpha = - Fx * cos(alpha) - Fy * sin(alpha) = - CD NOTE: we need to convert the unit from radian to degree
Definition at line 2710 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.parallelFlag, PYDAFOAM.solver, PYDAFOAM.solverInitialized, and PYDAFOAM.solverRegistry.
Referenced by PYDAFOAM.solveAdjoint().
def runColoring | ( | self | ) |
Run coloring solver
Definition at line 2842 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), DAFoamBuilder.options, PYDAFOAM.options, PYDAFOAM.parallelFlag, and PYDAFOAM.solverRegistry.
def runDecomposePar | ( | self | ) |
Run decomposePar to parallel run
Definition at line 2879 of file pyDAFoam.py.
References PYDAFOAM._writeDecomposeParDict(), DAFoamBuilder.comm, PYDAFOAM.comm, and OptFuncs.comm.
def deletePrevPrimalSolTime | ( | self | ) |
Delete the previous primal solution time folder
Definition at line 2900 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, PYDAFOAM.parallel, and PYDAFOAM.solver.
Referenced by PYDAFOAM.solvePrimal().
def renameSolution | ( | self, | |
solIndex | |||
) |
Rename the primal solution folder to specific format for post-processing. The renamed time has the format like 0.00000001, 0.00000002, etc. One can load these intermediate shapes and fields and plot them in paraview. The way it is implemented is that we sort the solution folder and consider the largest time folder as the solution folder and rename it Parameters ---------- solIndex: int The major interation index
Definition at line 2925 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, and PYDAFOAM.parallel.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.solvePrimal().
def calcFFD2XvSeedVec | ( | self | ) |
Calculate the FFD2XvSeedVec vector: Given a FFD seed xDvDot, run pyGeo and IDWarp and propagate the seed to Xv seed xVDot: xSDot = \\frac{dX_{S}}{dX_{DV}}\\xDvDot xVDot = \\frac{dX_{V}}{dX_{S}}\\xSDot Then, we assign this vector to FFD2XvSeedVec in DASolver This will be used in forward mode AD runs
Definition at line 2980 of file pyDAFoam.py.
References PYDAFOAM.allSurfacesGroup, PYDAFOAM.designSurfacesGroup, PYDAFOAM.dtype, PYDAFOAM.DVGeo, DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.mapVector(), DACheckMesh.mesh, PYDAFOAM.mesh, PYDAFOAM.ptSetName, PYDAFOAM.solverAD, PYDAFOAM.xs0, and PYDAFOAM.xvVec.
def setdXvdFFDMat | ( | self, | |
designVarName, | |||
deltaVPointThreshold = 1.0e-16 |
|||
) |
Perturb each design variable and save the delta volume point coordinates to a mat, this will be used to calculate dRdFFD and dFdFFD in DAFoam Parameters ---------- deltaVPointThreshold: float A threshold, any delta volume coordinates smaller than this value will be ignored
Definition at line 3029 of file pyDAFoam.py.
References PYDAFOAM.DVGeo, DAOption.getOption(), PYDAFOAM.getOption(), DACheckMesh.mesh, PYDAFOAM.mesh, PYDAFOAM.setDesignVars(), PYDAFOAM.solver, and PYDAFOAM.updateVolumePoints().
Referenced by PYDAFOAM.solveAdjoint().
def updateVolumePoints | ( | self | ) |
Update the vol mesh point coordinates based on the current values of design variables
Definition at line 3101 of file pyDAFoam.py.
References PYDAFOAM.allSurfacesGroup, PYDAFOAM.designSurfacesGroup, PYDAFOAM.DVGeo, PYDAFOAM.mapVector(), DACheckMesh.mesh, PYDAFOAM.mesh, PYDAFOAM.pointsSet, PYDAFOAM.ptSetName, PYDAFOAM.setSurfaceCoordinates(), and PYDAFOAM.xs0.
Referenced by PYDAFOAM.setdXvdFFDMat().
def setSurfaceCoordinates | ( | self, | |
coordinates, | |||
groupName = None |
|||
) |
Set the updated surface coordinates for a particular group. Parameters ---------- coordinates : numpy array Numpy array of size Nx3, where N is the number of coordinates on this processor. This array must have the same shape as the array obtained with getSurfaceCoordinates() groupName : str Name of family or group of families for which to return coordinates for.
Definition at line 3135 of file pyDAFoam.py.
References PYDAFOAM._updateGeomInfo, PYDAFOAM.allWallsGroup, PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.mapVector(), DACheckMesh.mesh, and PYDAFOAM.mesh.
Referenced by PYDAFOAM.updateVolumePoints().
def getSurfaceCoordinates | ( | self, | |
groupName = None |
|||
) |
Return the coordinates for the surfaces defined by groupName. Parameters ---------- groupName : str Group identifier to get only coordinates cooresponding to the desired group. The group must be a family or a user-supplied group of families. The default is None which corresponds to all wall-type surfaces. Output ------ xs: numpy array of size nPoints * 3 for surface points
Definition at line 3164 of file pyDAFoam.py.
References PYDAFOAM._getSurfaceSize(), PYDAFOAM.allSurfacesGroup, PYDAFOAM.allWallsGroup, PYDAFOAM.basicFamilies, PYDAFOAM.dtype, PYDAFOAM.families, and PYDAFOAM.xv.
Referenced by PYDAFOAM.getTriangulatedMeshSurface(), PYDAFOAM.setMesh(), PYDAFOAM.setSurfaceCoordinates(), and PYDAFOAM.writeSurfaceSensitivityMap().
def setPrimalBoundaryConditions | ( | self, | |
printInfo = 1 , |
|||
printInfoAD = 0 |
|||
) |
Assign the boundary condition defined in primalBC to the OF fields
Definition at line 3228 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, and PYDAFOAM.solverAD.
def getPointSetName | ( | self | ) |
Take the apName and return the mangled point set name.
Definition at line 3312 of file pyDAFoam.py.
def getSolverMeshIndices | ( | self | ) |
Get the list of indices to pass to the mesh object for the volume mesh mapping
Definition at line 3318 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, and OptFuncs.comm.
Referenced by PYDAFOAM.setMesh().
def mapVector | ( | self, | |
vec1, | |||
groupName1, | |||
groupName2, | |||
vec2 = None |
|||
) |
This is the main workhorse routine of everything that deals with families in pyDAFoam. The purpose of this routine is to convert a vector 'vec1' (of size Nx3) that was evaluated with 'groupName1' and expand or contract it (and adjust the ordering) to produce 'vec2' evaluated on groupName2. A little ascii art might help. Consider the following "mesh" . Family 'fam1' has 9 points, 'fam2' has 10 pts and 'fam3' has 5 points. Consider that we have also also added two additional groups: 'f12' containing 'fam1' and 'fma2' and a group 'f23' that contains families 'fam2' and 'fam3'. The vector we want to map is 'vec1'. It is length 9+10. All the 'x's are significant values. The call: mapVector(vec1, 'f12', 'f23') will produce the "returned vec" array, containing the significant values from 'fam2', where the two groups overlap, and the new values from 'fam3' set to zero. The values from fam1 are lost. The returned vec has size 15. fam1 fam2 fam3 |---------+----------+------| |xxxxxxxxx xxxxxxxxxx| <- vec1 |xxxxxxxxxx 000000| <- returned vec (vec2) Parameters ---------- vec1 : Numpy array Array of size Nx3 that will be mapped to a different family set. groupName1 : str The family group where the vector vec1 is currently defined groupName2 : str The family group where we want to the vector to mapped into vec2 : Numpy array or None Array containing existing values in the output vector we want to keep. If this vector is not given, the values will be filled with zeros. Returns ------- vec2 : Numpy array The input vector mapped to the families defined in groupName2.
Definition at line 3336 of file pyDAFoam.py.
References PYDAFOAM._getSurfaceSize(), PYDAFOAM.allSurfacesGroup, PYDAFOAM.basicFamilies, PYDAFOAM.dtype, PYDAFOAM.families, PYDAFOAM.getNLocalAdjointStates(), DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, PYDAFOAM.wVec, PYDAFOAM.xv, PYDAFOAM.xv2XvVec(), and PYDAFOAM.xvVec.
Referenced by PYDAFOAM.__call__(), PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.setSurfaceCoordinates(), PYDAFOAM.updateVolumePoints(), and PYDAFOAM.writeSurfaceSensitivityMap().
def xv2XvVec | ( | self, | |
xv, | |||
xvVec | |||
) |
Convert a Nx3 mesh point numpy array to a Petsc xvVec
Definition at line 3468 of file pyDAFoam.py.
References PYDAFOAM.solver.
Referenced by PYDAFOAM.mapVector().
def xvFlatten2XvVec | ( | self, | |
xv, | |||
xvVec | |||
) |
Convert a 3Nx1 mesh point numpy array to a Petsc xvVec
Definition at line 3485 of file pyDAFoam.py.
References DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, and PYDAFOAM.solver.
def setOption | ( | self, | |
name, | |||
value | |||
) |
Set a value to options. NOTE: calling this function will only change the values in self.options It will NOT change values for allOptions_ in DAOption. To make the options changes from pyDAFoam to DASolvers, call self.updateDAOption() Parameters ---------- name : str Name of option to set. Not case sensitive value : varies Value to set. Type is checked for consistency. Examples -------- If self.options reads: self.options = { 'solverName': [str, 'DASimpleFoam'], 'flowEndTime': [float, 1.0] } Then, calling self.options('solverName', 'DARhoSimpleFoam') will give: self.options = { 'solverName': [str, 'DARhoSimpleFoam'], 'flowEndTime': [float, 1.0] } NOTE: if 'value' is of dict type, we will set all the subKey values in 'value' dict to self.options, instead of overiding it. This works for only THREE levels of subDicts For example, if self.options reads self.options = { 'objFunc': [dict, { 'name': 'CD', 'direction': [1.0, 0.0, 0.0], 'scale': 1.0}] } Then, calling self.setOption('objFunc', {'name': 'CL'}) will give: self.options = { 'objFunc': [dict, { 'name': 'CL', 'direction': [1.0, 0.0, 0.0], 'scale': 1.0}] } INSTEAD OF self.options = { 'objFunc': [dict, {'name': 'CL'}] }
Definition at line 3540 of file pyDAFoam.py.
References PYDAFOAM.defaultOptions, PYDAFOAM.imOptions, PYDAFOAM.name, DAFoamBuilder.options, and PYDAFOAM.options.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
def setFieldValue4GlobalCellI | ( | self, | |
fieldName, | |||
val, | |||
globalCellI, | |||
compI = 0 |
|||
) |
Set the field value based on the global cellI. This is usually used if the state variables are design variables, e.g., betaSA The reason to use global cell index, instead of local one, is because this index is usually provided by the optimizer. Optimizer uses global cell index as the design variable Parameters ---------- fieldName : str Name of the flow field to set, e.g., U, p, nuTilda val : float The value to set globalCellI : int The global cell index to set the value compI : int The component index to set the value (for vectorField only)
Definition at line 3683 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, and PYDAFOAM.solverAD.
def setFieldValue4LocalCellI | ( | self, | |
fieldName, | |||
val, | |||
localCellI, | |||
compI = 0 |
|||
) |
Set the field value based on the local cellI. Parameters ---------- fieldName : str Name of the flow field to set, e.g., U, p, nuTilda val : float The value to set localCellI : int The global cell index to set the value compI : int The component index to set the value (for vectorField only)
Definition at line 3708 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, and PYDAFOAM.solverAD.
def updateBoundaryConditions | ( | self, | |
fieldName, | |||
fieldType | |||
) |
Update the boundary condition for a field Parameters ---------- fieldName : str Name of the flow field to update, e.g., U, p, nuTilda fieldType : str Type of the flow field: scalar or vector
Definition at line 3729 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, and PYDAFOAM.solverAD.
def getOption | ( | self, | |
name | |||
) |
Get a value from options Parameters ---------- name : str Name of option to get. Not case sensitive Returns ------- value : varies Return the value of the option.
Definition at line 3746 of file pyDAFoam.py.
References PYDAFOAM.defaultOptions, DAFoamBuilder.options, and PYDAFOAM.options.
Referenced by PYDAFOAM.calcdFdAOAAnalytical(), PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.calcPrimalResidualStatistics(), PYDAFOAM.initTimeInstanceMats(), PYDAFOAM.mapVector(), PYDAFOAM.runColoring(), PYDAFOAM.setdXvdFFDMat(), PYDAFOAM.setEvalFuncs(), PYDAFOAM.setFieldValue4GlobalCellI(), PYDAFOAM.setFieldValue4LocalCellI(), PYDAFOAM.setPrimalBoundaryConditions(), PYDAFOAM.setStates(), PYDAFOAM.setTimeInstanceField(), PYDAFOAM.setTimeInstanceVar(), PYDAFOAM.solveAdjoint(), PYDAFOAM.solvePrimal(), PYDAFOAM.syncDAOptionToActuatorDVs(), PYDAFOAM.updateBoundaryConditions(), PYDAFOAM.updateDAOption(), PYDAFOAM.vec2ArraySeq(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
def updateDAOption | ( | self | ) |
Update the allOptions_ in DAOption based on the latest self.options in pyDAFoam. This will pass the changes of self.options from pyDAFoam to DASolvers. NOTE: need to call this function after calling self.initSolver
Definition at line 3766 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), DAFoamBuilder.options, PYDAFOAM.options, PYDAFOAM.solver, PYDAFOAM.solverAD, PYDAFOAM.solverInitialized, DAFvSource.syncDAOptionToActuatorDVs(), DASolvers.syncDAOptionToActuatorDVs(), DASolver.syncDAOptionToActuatorDVs(), and PYDAFOAM.syncDAOptionToActuatorDVs().
Referenced by PYDAFOAM.solveAdjoint().
def syncDAOptionToActuatorDVs | ( | self | ) |
Synchronize the values in DAOption and actuatorDiskDVs_. We need to synchronize the values defined in fvSource from DAOption to actuatorDiskDVs_ in the C++ layer NOTE: we need to call this function whenever we change the actuator design variables during optimization.
Definition at line 3785 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, and PYDAFOAM.solverAD.
Referenced by PYDAFOAM.updateDAOption().
def getNLocalAdjointStates | ( | self | ) |
Get number of local adjoint states
Definition at line 3798 of file pyDAFoam.py.
References PYDAFOAM.solver.
Referenced by PYDAFOAM.getResiduals(), PYDAFOAM.getStates(), PYDAFOAM.initTimeInstanceMats(), PYDAFOAM.mapVector(), and PYDAFOAM.solveAdjoint().
def getDVsCons | ( | self | ) |
Return the list of design variable names NOTE: constraints are not implemented yet
Definition at line 3804 of file pyDAFoam.py.
References PYDAFOAM.DVGeo.
def getStates | ( | self | ) |
Return the adjoint state array owns by this processor
Definition at line 3824 of file pyDAFoam.py.
References PYDAFOAM.dtype, PYDAFOAM.getNLocalAdjointStates(), PYDAFOAM.solver, and PYDAFOAM.wVec.
def getResiduals | ( | self | ) |
Return the residual array owns by this processor
Definition at line 3837 of file pyDAFoam.py.
References PYDAFOAM.dtype, PYDAFOAM.getNLocalAdjointStates(), PYDAFOAM.solver, and PYDAFOAM.wVec.
def setStates | ( | self, | |
states | |||
) |
Set the state to the OpenFOAM field
Definition at line 3855 of file pyDAFoam.py.
References DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.solver, PYDAFOAM.solverAD, and PYDAFOAM.wVec.
def convertMPIVec2SeqArray | ( | self, | |
mpiVec | |||
) |
Convert a MPI vector to a seq array
Definition at line 3874 of file pyDAFoam.py.
References PYDAFOAM.dtype, and PYDAFOAM.solver.
def vec2Array | ( | self, | |
vec | |||
) |
Convert a Petsc vector to numpy array
Definition at line 3888 of file pyDAFoam.py.
References PYDAFOAM.dtype.
def array2Vec | ( | self, | |
array1 | |||
) |
Convert a numpy array to Petsc vector
Definition at line 3901 of file pyDAFoam.py.
def array2VecSeq | ( | self, | |
array1 | |||
) |
Convert a numpy array to Petsc vector in serial mode
Definition at line 3922 of file pyDAFoam.py.
def vec2ArraySeq | ( | self, | |
vec | |||
) |
Convert a Petsc vector to numpy array in serial mode
Definition at line 3939 of file pyDAFoam.py.
References PYDAFOAM._writeOpenFoamHeader(), DAFoamBuilder.comm, PYDAFOAM.comm, OptFuncs.comm, PYDAFOAM.dtype, DAOption.getOption(), PYDAFOAM.getOption(), PYDAFOAM.nProcs, DAFoamBuilder.options, and PYDAFOAM.options.
version |
Definition at line 696 of file pyDAFoam.py.
name |
Definition at line 705 of file pyDAFoam.py.
Referenced by PYDAFOAM.setOption().
families |
Definition at line 717 of file pyDAFoam.py.
Referenced by PYDAFOAM.addFamilyGroup(), PYDAFOAM.getSurfaceConnectivity(), PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.mapVector(), and PYDAFOAM.printFamilyList().
dtype |
Definition at line 723 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.convertMPIVec2SeqArray(), PYDAFOAM.evalFunctionsSens(), PYDAFOAM.getResiduals(), PYDAFOAM.getStates(), PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.mapVector(), PYDAFOAM.solveAdjoint(), PYDAFOAM.vec2Array(), and PYDAFOAM.vec2ArraySeq().
ptSetName |
Definition at line 729 of file pyDAFoam.py.
Referenced by PYDAFOAM.__call__(), PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.mapdXvTodFFD(), and PYDAFOAM.updateVolumePoints().
solverInitialized |
Definition at line 742 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcdFdAOAAnalytical(), and PYDAFOAM.updateDAOption().
nSolvePrimals |
Definition at line 746 of file pyDAFoam.py.
Referenced by PYDAFOAM.solvePrimal().
nSolveAdjoints |
Definition at line 747 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), PYDAFOAM.writeDesignVariable(), and PYDAFOAM.writeTotalDeriv().
primalFail |
Definition at line 750 of file pyDAFoam.py.
Referenced by PYDAFOAM.evalFunctions(), and PYDAFOAM.solvePrimal().
adjointFail |
Definition at line 751 of file pyDAFoam.py.
Referenced by PYDAFOAM.evalFunctionsSens(), and PYDAFOAM.solveAdjoint().
xvVec |
Definition at line 755 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.mapVector(), PYDAFOAM.solveAdjoint(), and PYDAFOAM.solvePrimal().
wVec |
Definition at line 756 of file pyDAFoam.py.
Referenced by PYDAFOAM.getResiduals(), PYDAFOAM.getStates(), PYDAFOAM.mapVector(), PYDAFOAM.saveMultiPointField(), PYDAFOAM.setMultiPointField(), PYDAFOAM.setStates(), PYDAFOAM.setTimeInstanceField(), PYDAFOAM.solveAdjoint(), and PYDAFOAM.solvePrimal().
allSurfacesGroup |
Definition at line 772 of file pyDAFoam.py.
Referenced by PYDAFOAM.__call__(), PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.mapVector(), and PYDAFOAM.updateVolumePoints().
allWallsGroup |
Definition at line 775 of file pyDAFoam.py.
Referenced by PYDAFOAM.getSurfaceConnectivity(), PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.getTriangulatedMeshSurface(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.setMesh(), PYDAFOAM.setSurfaceCoordinates(), and PYDAFOAM.writeSurfaceSensitivityMap().
designSurfacesGroup |
Definition at line 779 of file pyDAFoam.py.
Referenced by PYDAFOAM.__call__(), PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.mapdXvTodFFD(), and PYDAFOAM.updateVolumePoints().
couplingSurfacesGroup |
Definition at line 791 of file pyDAFoam.py.
Referenced by PYDAFOAM.getForces().
xs0 |
Definition at line 807 of file pyDAFoam.py.
Referenced by PYDAFOAM.__call__(), PYDAFOAM.calcFFD2XvSeedVec(), and PYDAFOAM.updateVolumePoints().
mesh |
Definition at line 811 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.setdXvdFFDMat(), PYDAFOAM.setMesh(), PYDAFOAM.setSurfaceCoordinates(), PYDAFOAM.updateVolumePoints(), and PYDAFOAM.writeSurfaceSensitivityMap().
DVGeo |
Definition at line 812 of file pyDAFoam.py.
Referenced by PYDAFOAM.__call__(), PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.evalFunctionsSens(), PYDAFOAM.getDVsCons(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.setDVGeo(), PYDAFOAM.setdXvdFFDMat(), PYDAFOAM.solveAdjoint(), and PYDAFOAM.updateVolumePoints().
objFuncValuePrevIter |
Definition at line 817 of file pyDAFoam.py.
Referenced by PYDAFOAM.evalFunctions().
objFuncNames4Adj |
Definition at line 820 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
adjTotalDeriv |
Definition at line 824 of file pyDAFoam.py.
Referenced by PYDAFOAM.evalFunctionsSens(), and PYDAFOAM.solveAdjoint().
dRdWTPC |
Definition at line 827 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint().
ksp |
Definition at line 830 of file pyDAFoam.py.
surfGeoDisp |
Definition at line 836 of file pyDAFoam.py.
adjVectors |
Definition at line 839 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint().
solverRegistry |
Definition at line 862 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcdFdAOAAnalytical(), and PYDAFOAM.runColoring().
pointsSet |
Definition at line 884 of file pyDAFoam.py.
Referenced by PYDAFOAM.updateVolumePoints().
dRdW0TPsi |
Definition at line 1006 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
dRdW00TPsi |
Definition at line 1007 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
dR0dW0TPsi |
Definition at line 1008 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
dR0dW00TPsi |
Definition at line 1009 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
dR00dW0TPsi |
Definition at line 1010 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
dR00dW00TPsi |
Definition at line 1011 of file pyDAFoam.py.
Referenced by PYDAFOAM.solveAdjoint(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
stateMat |
Definition at line 1194 of file pyDAFoam.py.
Referenced by PYDAFOAM.setTimeInstanceVar().
stateBCMat |
Definition at line 1200 of file pyDAFoam.py.
Referenced by PYDAFOAM.setTimeInstanceVar().
timeVec |
Definition at line 1206 of file pyDAFoam.py.
Referenced by PYDAFOAM.setTimeInstanceVar().
timeIdxVec |
Definition at line 1207 of file pyDAFoam.py.
Referenced by PYDAFOAM.setTimeInstanceVar().
imOptions |
Definition at line 1675 of file pyDAFoam.py.
Referenced by PYDAFOAM.setOption().
defaultOptions |
Definition at line 1678 of file pyDAFoam.py.
Referenced by PYDAFOAM.getOption(), and PYDAFOAM.setOption().
options |
Definition at line 1683 of file pyDAFoam.py.
Referenced by PYDAFOAM.getOption(), DAFoamGroup.initialize(), DAFoamPrecouplingGroup.initialize(), DAFoamPostcouplingGroup.initialize(), DAFoamSolver.initialize(), DAFoamMeshGroup.initialize(), DAFoamMesh.initialize(), DAFoamFunctions.initialize(), DAFoamWarper.initialize(), DAFoamThermal.initialize(), DAFoamFaceCoords.initialize(), DAFoamForces.initialize(), DAFoamAcoustics.initialize(), DAFoamFvSource.initialize(), DAFoamPropNodes.initialize(), DAFoamActuator.initialize(), PYDAFOAM.runColoring(), PYDAFOAM.setOption(), DAFoamMeshGroup.setup(), PYDAFOAM.updateDAOption(), and PYDAFOAM.vec2ArraySeq().
comm |
Definition at line 1706 of file pyDAFoam.py.
Referenced by DAFoamSolver.apply_linear(), DAFoamFvSource.compute(), DAFoamPropNodes.compute(), DAFoamActuator.compute(), DAFoamFunctions.compute_jacvec_product(), DAFoamFvSource.compute_jacvec_product(), DAFoamPropNodes.compute_jacvec_product(), DAFoamActuator.compute_jacvec_product(), PYDAFOAM.deletePrevPrimalSolTime(), PYDAFOAM.getForces(), PYDAFOAM.getSolverMeshIndices(), PYDAFOAM.getTriangulatedMeshSurface(), PYDAFOAM.mapdXvTodFFD(), DAFoamGroup.mphys_compute_nodes(), DAFoamGroup.mphys_set_masking(), DAFoamGroup.mphys_set_unmasking(), PYDAFOAM.renameSolution(), PYDAFOAM.runDecomposePar(), DAFoamSolver.solve_linear(), PYDAFOAM.vec2ArraySeq(), PYDAFOAM.writeDeformedFFDs(), PYDAFOAM.writeDesignVariable(), PYDAFOAM.writeTotalDeriv(), PYDAFOAM.xvFlatten2XvVec(), and PYDAFOAM.zeroTimeAccurateAdjointVectors().
parallel |
Definition at line 1710 of file pyDAFoam.py.
Referenced by PYDAFOAM.deletePrevPrimalSolTime(), PYDAFOAM.renameSolution(), and PYDAFOAM.writeSurfaceSensitivityMap().
rank |
Definition at line 1715 of file pyDAFoam.py.
Referenced by PYDAFOAM.writeSurfaceSensitivityMap().
nProcs |
Definition at line 1716 of file pyDAFoam.py.
Referenced by PYDAFOAM.vec2ArraySeq().
parallelFlag |
Definition at line 1719 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcdFdAOAAnalytical(), and PYDAFOAM.runColoring().
solver |
Definition at line 2774 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcdFdAOAAnalytical(), PYDAFOAM.calcPrimalResidualStatistics(), PYDAFOAM.convertMPIVec2SeqArray(), PYDAFOAM.deletePrevPrimalSolTime(), PYDAFOAM.evalFunctions(), PYDAFOAM.getAcousticData(), PYDAFOAM.getForces(), PYDAFOAM.getNLocalAdjointStates(), PYDAFOAM.getResiduals(), PYDAFOAM.getStates(), PYDAFOAM.getTimeInstanceObjFunc(), PYDAFOAM.initTimeInstanceMats(), PYDAFOAM.mapVector(), DAFoamGroup.mphys_set_options(), PYDAFOAM.setdXvdFFDMat(), PYDAFOAM.setFieldValue4GlobalCellI(), PYDAFOAM.setFieldValue4LocalCellI(), PYDAFOAM.setPrimalBoundaryConditions(), PYDAFOAM.setStates(), PYDAFOAM.setTimeInstanceField(), PYDAFOAM.setTimeInstanceVar(), PYDAFOAM.solveAdjoint(), PYDAFOAM.solvePrimal(), PYDAFOAM.syncDAOptionToActuatorDVs(), PYDAFOAM.updateBoundaryConditions(), PYDAFOAM.updateDAOption(), PYDAFOAM.xv2XvVec(), and PYDAFOAM.xvFlatten2XvVec().
solverAD |
Definition at line 2780 of file pyDAFoam.py.
Referenced by PYDAFOAM.calcFFD2XvSeedVec(), PYDAFOAM.calcPrimalResidualStatistics(), PYDAFOAM.getForwardADDerivVal(), PYDAFOAM.setFieldValue4GlobalCellI(), PYDAFOAM.setFieldValue4LocalCellI(), PYDAFOAM.setPrimalBoundaryConditions(), PYDAFOAM.setStates(), PYDAFOAM.setTimeInstanceField(), PYDAFOAM.setTimeInstanceVar(), PYDAFOAM.solveAdjoint(), PYDAFOAM.solvePrimal(), PYDAFOAM.syncDAOptionToActuatorDVs(), PYDAFOAM.updateBoundaryConditions(), and PYDAFOAM.updateDAOption().
neighbours |
Definition at line 3130 of file pyDAFoam.py.
xv |
Definition at line 3131 of file pyDAFoam.py.
Referenced by PYDAFOAM.getSurfaceCoordinates(), PYDAFOAM.mapdXvTodFFD(), PYDAFOAM.mapVector(), and PYDAFOAM.solveAdjoint().
basicFamilies |
Definition at line 3243 of file pyDAFoam.py.
Referenced by PYDAFOAM.getSurfaceConnectivity(), PYDAFOAM.getSurfaceCoordinates(), and PYDAFOAM.mapVector().
wallList |
Definition at line 3246 of file pyDAFoam.py.
wVecMPList |
Definition at line 3460 of file pyDAFoam.py.
Referenced by PYDAFOAM.saveMultiPointField(), and PYDAFOAM.setMultiPointField().