Public Member Functions | List of all members
DASolvers Class Reference

Public Member Functions

 DASolvers (char *argsAll, PyObject *pyOptions)
 Construct from components. More...
 
virtual ~DASolvers ()
 Destructor. More...
 
void initSolver ()
 initialize fields and variables More...
 
label solvePrimal (const Vec xvVec, Vec wVec)
 solve the primal equations More...
 
void calcdRdWT (const Vec xvVec, const Vec wVec, const label isPC, Mat dRdWT)
 compute dRdWT More...
 
void calcdFdW (const Vec xvVec, const Vec wVec, const word objFuncName, Vec dFdW)
 compute dFdW More...
 
void calcdFdWAD (const Vec xvVec, const Vec wVec, const word objFuncName, Vec dFdW)
 compute dFdW using reverse-mode AD More...
 
void calcdFdXvAD (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdXv)
 compute dFdXv using reverse-mode AD More...
 
void calcdRdXvTPsiAD (const Vec xvVec, const Vec wVec, const Vec psi, Vec dRdXvTPsi)
 compute dRdXv^T*Psi More...
 
void calcdForcedXvAD (const Vec xvVec, const Vec wVec, const Vec fBarVec, Vec dForcedW)
 compute dForcedXv More...
 
void calcdAcousticsdXvAD (const Vec xvVec, const Vec wVec, const Vec fBarVec, Vec dAcoudW, word varName, word groupName)
 compute dAcoudXv More...
 
void calcdRdActTPsiAD (const Vec xvVec, const Vec wVec, const Vec psi, const word designVarName, Vec dRdActTPsi)
 compute dRdAct^T*Psi More...
 
void calcdForcedWAD (const Vec xvVec, const Vec wVec, const Vec fBarVec, Vec dForcedW)
 compute dForcedW More...
 
void calcdAcousticsdWAD (const Vec xvVec, const Vec wVec, const Vec fBarVec, Vec dAcoudW, word varName, word groupName)
 compute dAcoudW More...
 
void calcdRdAOATPsiAD (const Vec xvVec, const Vec wVec, const Vec psi, const word designVarName, Vec dRdAOATPsi)
 compute dRdAOA^T*Psi More...
 
void createMLRKSP (const Mat jacMat, const Mat jacPCMat, KSP ksp)
 create the multi-level Richardson KSP for solving linear equation More...
 
void createMLRKSPMatrixFree (const Mat jacPCMat, KSP ksp)
 create a multi-level, Richardson KSP object with matrix-free Jacobians More...
 
void initializedRdWTMatrixFree (const Vec xvVec, const Vec wVec)
 initialize matrix free dRdWT More...
 
void destroydRdWTMatrixFree ()
 destroy matrix free dRdWT More...
 
void solveLinearEqn (const KSP ksp, const Vec rhsVec, Vec solVec)
 solve the linear equation More...
 
void convertMPIVec2SeqVec (const Vec mpiVec, Vec seqVec)
 convert the mpi vec to a seq vec More...
 
void calcdRdBC (const Vec xvVec, const Vec wVec, const word designVarName, Mat dRdBC)
 compute dRdBC More...
 
void calcdFdBC (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdBC)
 compute dFdBC More...
 
void calcdFdBCAD (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdBC)
 compute dFdBCAD More...
 
void calcdRdBCTPsiAD (const Vec xvVec, const Vec wVec, const Vec psi, const word designVarName, Vec dRdBCTPsi)
 compute dRdBC^T*Psi More...
 
void calcdRdAOA (const Vec xvVec, const Vec wVec, const word designVarName, Mat dRdAOA)
 compute dRdAOA More...
 
void calcdFdAOA (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdAOA)
 compute dFdAOA More...
 
void calcdRdFFD (const Vec xvVec, const Vec wVec, const word designVarName, Mat dRdFFD)
 compute dRdFFD More...
 
void calcdFdFFD (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdFFD)
 compute dFdFFD More...
 
void calcdRdACT (const Vec xvVec, const Vec wVec, const word designVarName, const word designVarType, Mat dRdACT)
 compute dRdACT More...
 
void calcdFdACTAD (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdACT)
 compute dFdACT More...
 
void calcdFdACT (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, const word designVarType, Vec dFdACT)
 compute dFdACT More...
 
void calcdRdFieldTPsiAD (const Vec xvVec, const Vec wVec, const Vec psi, const word designVarName, Vec dRdFieldTPsi)
 compute dRdField More...
 
void calcdFdFieldAD (const Vec xvVec, const Vec wVec, const word objFuncName, const word designVarName, Vec dFdField)
 compute dFdField More...
 
void calcdRdWOldTPsiAD (const label oldTimeLevel, const Vec psi, Vec dRdWOldTPsi)
 compute dRdWOld^T*Psi More...
 
void calcdRdWTPsiAD (const Vec xvVec, const Vec wVec, const Vec psi, Vec dRdWTPsi)
 compute [dRdW]^T*Psi More...
 
void updateOFField (const Vec wVec)
 Update the OpenFOAM field values (including both internal and boundary fields) based on the state vector wVec. More...
 
void updateOFMesh (const Vec xvVec)
 Update the OpenFoam mesh point coordinates based on the point vector xvVec. More...
 
label getGlobalXvIndex (const label idxPoint, const label idxCoord) const
 basically, we call DAIndex::getGlobalXvIndex More...
 
void ofField2StateVec (Vec stateVec) const
 basically, we call DASolver::ofField2StateVec More...
 
void stateVec2OFField (const Vec stateVec) const
 basically, we call DASolver::stateVec2OFField More...
 
label checkMesh () const
 basically, we call DASolver::checkMesh More...
 
label getNCouplingFaces ()
 Get the number of faces for the MDO coupling patches. More...
 
label getNCouplingPoints ()
 Get the number of points for the MDO coupling patches. More...
 
label getNLocalPoints () const
 
label getNLocalAdjointStates () const
 return the number of local adjoint states More...
 
label getNLocalAdjointBoundaryStates () const
 return the number of local adjoint boundary states More...
 
label getNLocalCells () const
 return the number of local cells More...
 
void syncDAOptionToActuatorDVs ()
 synchronize the values in DAOption and actuatorDiskDVs_ More...
 
double getObjFuncValue (const word objFuncName)
 return the value of objective More...
 
void calcCouplingFaceCoords (const double *volCoords, double *surfCoords)
 
void calcCouplingFaceCoordsAD (const double *volCoords, const double *seeds, double *product)
 calc matrix-vector products for calcCouplingFaceCoords More...
 
void getForces (Vec fX, Vec fY, Vec fZ)
 return the force on the FSI patches More...
 
void getThermal (const double *volCoords, const double *states, double *thermal)
 return the thermal (temperature or heat flux) on the conjugate heat transfer patches More...
 
void getThermalAD (const word inputName, const double *volCoords, const double *states, const double *seeds, double *product)
 compute the temperature on the conjugate heat transfer patches AD More...
 
void setThermal (double *thermal)
 set the thermal (temperature or heat flux) BC to the conjugate heat transfer patches More...
 
void calcdRdThermalTPsiAD (const double *volCoords, const double *states, const double *thermal, const double *seeds, double *product)
 
void getAcousticData (Vec x, Vec y, Vec z, Vec nX, Vec nY, Vec nZ, Vec a, Vec fX, Vec fY, Vec fZ, word groupName)
 return the acoustic data values More...
 
void printAllOptions ()
 call DASolver::printAllOptions More...
 
void setdXvdFFDMat (const Mat dXvdFFDMat)
 set values for dXvdFFDMat More...
 
void setFFD2XvSeedVec (Vec vecIn)
 set the value for DASolver::FFD2XvSeedVec_ More...
 
void updateDAOption (PyObject *pyOptions)
 update the allOptions_ dict in DAOption based on the pyOptions from pyDAFoam More...
 
double getPrevPrimalSolTime ()
 get the solution time folder for previous primal solution More...
 
void pointVec2OFMesh (const Vec xvVec) const
 assign the points in fvMesh of OpenFOAM based on the point vector More...
 
void ofMesh2PointVec (Vec xvVec) const
 assign the point vector based on the points in fvMesh of OpenFOAM More...
 
void resVec2OFResField (const Vec resVec) const
 assign the OpenFOAM residual fields based on the resVec More...
 
void ofResField2ResVec (Vec resVec) const
 assign the resVec based on OpenFOAM residual fields More...
 
void writeMatrixBinary (const Mat matIn, const word prefix)
 write the matrix in binary format More...
 
void writeMatrixASCII (const Mat matIn, const word prefix)
 write the matrix in ASCII format More...
 
void readMatrixBinary (Mat matIn, const word prefix)
 read petsc matrix in binary format More...
 
void writeVectorASCII (const Vec vecIn, const word prefix)
 write petsc vector in ascii format More...
 
void readVectorBinary (Vec vecIn, const word prefix)
 read petsc vector in binary format More...
 
void writeVectorBinary (const Vec vecIn, const word prefix)
 write petsc vector in binary format More...
 
void setTimeInstanceField (const label instanceI)
 assign primal variables based on the current time instance More...
 
void setTimeInstanceVar (const word mode, Mat stateMat, Mat stateBCMat, Vec timeVec, Vec timeIdxVec)
 assign the time instance mats to/from the lists in the OpenFOAM layer depending on the mode More...
 
double getTimeInstanceObjFunc (const label instanceI, const word objFuncName)
 return the value of objective function at the given time instance and name More...
 
void setFieldValue4GlobalCellI (const word fieldName, const scalar val, const label globalCellI, const label compI=0)
 set the field value More...
 
void setFieldValue4LocalCellI (const word fieldName, const scalar val, const label localCellI, const label compI=0)
 set the field value More...
 
void updateBoundaryConditions (const word fieldName, const word fieldType)
 update the boundary condition for a field More...
 
void calcPrimalResidualStatistics (const word mode)
 Calculate the mean, max, and norm2 for all residuals and print it to screen. More...
 
PetscScalar getForwardADDerivVal (const word objFuncName)
 get forwardADDerivVal_ More...
 
void calcResidualVec (Vec resVec)
 calculate the residual and assign it to the resVec vector More...
 
void setPrimalBoundaryConditions (const label printInfo=1)
 
void calcFvSource (const word propName, Vec aForce, Vec tForce, Vec rDist, Vec targetForce, Vec center, Vec fvSource)
 calculate the fvSource based on the force profile More...
 
void calcdFvSourcedInputsTPsiAD (const word propName, const word mode, Vec aForce, Vec tForce, Vec rDist, Vec targetForce, Vec center, Vec psi, Vec dFvSource)
 
void calcForceProfile (Vec center, Vec aForceL, Vec tForceL, Vec rDistL)
 
void calcdForcedStateTPsiAD (const word mode, Vec xvVec, Vec stateVec, Vec psiVec, Vec prodVec)
 
label runFPAdj (const Vec xvVec, const Vec wVec, Vec dFdW, Vec psi)
 
void initTensorFlowFuncs (pyComputeInterface computeInterface, void *compute, pyJacVecProdInterface jacVecProdInterface, void *jacVecProd)
 initialize the call back function pointer More...
 

Detailed Description

Definition at line 27 of file DASolvers.H.

Constructor & Destructor Documentation

◆ DASolvers()

DASolvers ( char *  argsAll,
PyObject *  pyOptions 
)

Construct from components.

Definition at line 15 of file DASolvers.C.

References DASolver::New().

Here is the call graph for this function:

◆ ~DASolvers()

~DASolvers ( )
virtual

Destructor.

Definition at line 25 of file DASolvers.C.

Member Function Documentation

◆ initSolver()

void initSolver ( )
inline

initialize fields and variables

Definition at line 58 of file DASolvers.H.

◆ solvePrimal()

label solvePrimal ( const Vec  xvVec,
Vec  wVec 
)
inline

solve the primal equations

Definition at line 64 of file DASolvers.H.

◆ calcdRdWT()

void calcdRdWT ( const Vec  xvVec,
const Vec  wVec,
const label  isPC,
Mat  dRdWT 
)
inline

compute dRdWT

Definition at line 72 of file DASolvers.H.

◆ calcdFdW()

void calcdFdW ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
Vec  dFdW 
)
inline

compute dFdW

Definition at line 82 of file DASolvers.H.

◆ calcdFdWAD()

void calcdFdWAD ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
Vec  dFdW 
)
inline

compute dFdW using reverse-mode AD

Definition at line 92 of file DASolvers.H.

◆ calcdFdXvAD()

void calcdFdXvAD ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdXv 
)
inline

compute dFdXv using reverse-mode AD

Definition at line 102 of file DASolvers.H.

◆ calcdRdXvTPsiAD()

void calcdRdXvTPsiAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  psi,
Vec  dRdXvTPsi 
)
inline

compute dRdXv^T*Psi

Definition at line 113 of file DASolvers.H.

References psi.

◆ calcdForcedXvAD()

void calcdForcedXvAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  fBarVec,
Vec  dForcedW 
)
inline

compute dForcedXv

Definition at line 123 of file DASolvers.H.

◆ calcdAcousticsdXvAD()

void calcdAcousticsdXvAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  fBarVec,
Vec  dAcoudW,
word  varName,
word  groupName 
)
inline

compute dAcoudXv

Definition at line 133 of file DASolvers.H.

◆ calcdRdActTPsiAD()

void calcdRdActTPsiAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  psi,
const word  designVarName,
Vec  dRdActTPsi 
)
inline

compute dRdAct^T*Psi

Definition at line 145 of file DASolvers.H.

References psi.

◆ calcdForcedWAD()

void calcdForcedWAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  fBarVec,
Vec  dForcedW 
)
inline

compute dForcedW

Definition at line 156 of file DASolvers.H.

◆ calcdAcousticsdWAD()

void calcdAcousticsdWAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  fBarVec,
Vec  dAcoudW,
word  varName,
word  groupName 
)
inline

compute dAcoudW

Definition at line 166 of file DASolvers.H.

◆ calcdRdAOATPsiAD()

void calcdRdAOATPsiAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  psi,
const word  designVarName,
Vec  dRdAOATPsi 
)
inline

compute dRdAOA^T*Psi

Definition at line 178 of file DASolvers.H.

References psi.

◆ createMLRKSP()

void createMLRKSP ( const Mat  jacMat,
const Mat  jacPCMat,
KSP  ksp 
)
inline

create the multi-level Richardson KSP for solving linear equation

Definition at line 189 of file DASolvers.H.

◆ createMLRKSPMatrixFree()

void createMLRKSPMatrixFree ( const Mat  jacPCMat,
KSP  ksp 
)
inline

create a multi-level, Richardson KSP object with matrix-free Jacobians

Definition at line 198 of file DASolvers.H.

◆ initializedRdWTMatrixFree()

void initializedRdWTMatrixFree ( const Vec  xvVec,
const Vec  wVec 
)
inline

initialize matrix free dRdWT

Definition at line 206 of file DASolvers.H.

◆ destroydRdWTMatrixFree()

void destroydRdWTMatrixFree ( )
inline

destroy matrix free dRdWT

Definition at line 214 of file DASolvers.H.

◆ solveLinearEqn()

void solveLinearEqn ( const KSP  ksp,
const Vec  rhsVec,
Vec  solVec 
)
inline

solve the linear equation

Definition at line 220 of file DASolvers.H.

◆ convertMPIVec2SeqVec()

void convertMPIVec2SeqVec ( const Vec  mpiVec,
Vec  seqVec 
)
inline

convert the mpi vec to a seq vec

Definition at line 229 of file DASolvers.H.

◆ calcdRdBC()

void calcdRdBC ( const Vec  xvVec,
const Vec  wVec,
const word  designVarName,
Mat  dRdBC 
)
inline

compute dRdBC

Definition at line 237 of file DASolvers.H.

◆ calcdFdBC()

void calcdFdBC ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdBC 
)
inline

compute dFdBC

Definition at line 247 of file DASolvers.H.

◆ calcdFdBCAD()

void calcdFdBCAD ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdBC 
)
inline

compute dFdBCAD

Definition at line 258 of file DASolvers.H.

◆ calcdRdBCTPsiAD()

void calcdRdBCTPsiAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  psi,
const word  designVarName,
Vec  dRdBCTPsi 
)
inline

compute dRdBC^T*Psi

Definition at line 269 of file DASolvers.H.

References psi.

◆ calcdRdAOA()

void calcdRdAOA ( const Vec  xvVec,
const Vec  wVec,
const word  designVarName,
Mat  dRdAOA 
)
inline

compute dRdAOA

Definition at line 280 of file DASolvers.H.

◆ calcdFdAOA()

void calcdFdAOA ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdAOA 
)
inline

compute dFdAOA

Definition at line 290 of file DASolvers.H.

◆ calcdRdFFD()

void calcdRdFFD ( const Vec  xvVec,
const Vec  wVec,
const word  designVarName,
Mat  dRdFFD 
)
inline

compute dRdFFD

Definition at line 301 of file DASolvers.H.

◆ calcdFdFFD()

void calcdFdFFD ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdFFD 
)
inline

compute dFdFFD

Definition at line 311 of file DASolvers.H.

◆ calcdRdACT()

void calcdRdACT ( const Vec  xvVec,
const Vec  wVec,
const word  designVarName,
const word  designVarType,
Mat  dRdACT 
)
inline

compute dRdACT

Definition at line 322 of file DASolvers.H.

◆ calcdFdACTAD()

void calcdFdACTAD ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdACT 
)
inline

compute dFdACT

Definition at line 333 of file DASolvers.H.

◆ calcdFdACT()

void calcdFdACT ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
const word  designVarType,
Vec  dFdACT 
)
inline

compute dFdACT

Definition at line 344 of file DASolvers.H.

◆ calcdRdFieldTPsiAD()

void calcdRdFieldTPsiAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  psi,
const word  designVarName,
Vec  dRdFieldTPsi 
)
inline

compute dRdField

Definition at line 356 of file DASolvers.H.

References psi.

◆ calcdFdFieldAD()

void calcdFdFieldAD ( const Vec  xvVec,
const Vec  wVec,
const word  objFuncName,
const word  designVarName,
Vec  dFdField 
)
inline

compute dFdField

Definition at line 367 of file DASolvers.H.

◆ calcdRdWOldTPsiAD()

void calcdRdWOldTPsiAD ( const label  oldTimeLevel,
const Vec  psi,
Vec  dRdWOldTPsi 
)
inline

compute dRdWOld^T*Psi

Definition at line 378 of file DASolvers.H.

References psi.

◆ calcdRdWTPsiAD()

void calcdRdWTPsiAD ( const Vec  xvVec,
const Vec  wVec,
const Vec  psi,
Vec  dRdWTPsi 
)
inline

compute [dRdW]^T*Psi

Definition at line 387 of file DASolvers.H.

References psi.

◆ updateOFField()

void updateOFField ( const Vec  wVec)
inline

Update the OpenFOAM field values (including both internal and boundary fields) based on the state vector wVec.

Definition at line 397 of file DASolvers.H.

◆ updateOFMesh()

void updateOFMesh ( const Vec  xvVec)
inline

Update the OpenFoam mesh point coordinates based on the point vector xvVec.

Definition at line 403 of file DASolvers.H.

◆ getGlobalXvIndex()

label getGlobalXvIndex ( const label  idxPoint,
const label  idxCoord 
) const
inline

basically, we call DAIndex::getGlobalXvIndex

Definition at line 409 of file DASolvers.H.

◆ ofField2StateVec()

void ofField2StateVec ( Vec  stateVec) const
inline

basically, we call DASolver::ofField2StateVec

Definition at line 417 of file DASolvers.H.

◆ stateVec2OFField()

void stateVec2OFField ( const Vec  stateVec) const
inline

basically, we call DASolver::stateVec2OFField

Definition at line 423 of file DASolvers.H.

◆ checkMesh()

label checkMesh ( ) const
inline

basically, we call DASolver::checkMesh

Definition at line 429 of file DASolvers.H.

◆ getNCouplingFaces()

label getNCouplingFaces ( )
inline

Get the number of faces for the MDO coupling patches.

Definition at line 435 of file DASolvers.H.

◆ getNCouplingPoints()

label getNCouplingPoints ( )
inline

Get the number of points for the MDO coupling patches.

Definition at line 441 of file DASolvers.H.

◆ getNLocalPoints()

label getNLocalPoints ( ) const
inline

Definition at line 447 of file DASolvers.H.

◆ getNLocalAdjointStates()

label getNLocalAdjointStates ( ) const
inline

return the number of local adjoint states

Definition at line 453 of file DASolvers.H.

◆ getNLocalAdjointBoundaryStates()

label getNLocalAdjointBoundaryStates ( ) const
inline

return the number of local adjoint boundary states

Definition at line 459 of file DASolvers.H.

◆ getNLocalCells()

label getNLocalCells ( ) const
inline

return the number of local cells

Definition at line 465 of file DASolvers.H.

◆ syncDAOptionToActuatorDVs()

void syncDAOptionToActuatorDVs ( )
inline

synchronize the values in DAOption and actuatorDiskDVs_

Definition at line 471 of file DASolvers.H.

Referenced by PYDAFOAM::updateDAOption().

Here is the caller graph for this function:

◆ getObjFuncValue()

double getObjFuncValue ( const word  objFuncName)
inline

return the value of objective

Definition at line 477 of file DASolvers.H.

References assignValueCheckAD.

◆ calcCouplingFaceCoords()

void calcCouplingFaceCoords ( const double *  volCoords,
double *  surfCoords 
)
inline

Definition at line 484 of file DASolvers.H.

◆ calcCouplingFaceCoordsAD()

void calcCouplingFaceCoordsAD ( const double *  volCoords,
const double *  seeds,
double *  product 
)
inline

calc matrix-vector products for calcCouplingFaceCoords

Definition at line 497 of file DASolvers.H.

◆ getForces()

void getForces ( Vec  fX,
Vec  fY,
Vec  fZ 
)
inline

return the force on the FSI patches

Definition at line 506 of file DASolvers.H.

◆ getThermal()

void getThermal ( const double *  volCoords,
const double *  states,
double *  thermal 
)
inline

return the thermal (temperature or heat flux) on the conjugate heat transfer patches

Definition at line 512 of file DASolvers.H.

◆ getThermalAD()

void getThermalAD ( const word  inputName,
const double *  volCoords,
const double *  states,
const double *  seeds,
double *  product 
)
inline

compute the temperature on the conjugate heat transfer patches AD

Definition at line 526 of file DASolvers.H.

◆ setThermal()

void setThermal ( double *  thermal)
inline

set the thermal (temperature or heat flux) BC to the conjugate heat transfer patches

Definition at line 537 of file DASolvers.H.

◆ calcdRdThermalTPsiAD()

void calcdRdThermalTPsiAD ( const double *  volCoords,
const double *  states,
const double *  thermal,
const double *  seeds,
double *  product 
)
inline

Definition at line 547 of file DASolvers.H.

◆ getAcousticData()

void getAcousticData ( Vec  x,
Vec  y,
Vec  z,
Vec  nX,
Vec  nY,
Vec  nZ,
Vec  a,
Vec  fX,
Vec  fY,
Vec  fZ,
word  groupName 
)
inline

return the acoustic data values

Definition at line 558 of file DASolvers.H.

◆ printAllOptions()

void printAllOptions ( )
inline

call DASolver::printAllOptions

Definition at line 564 of file DASolvers.H.

◆ setdXvdFFDMat()

void setdXvdFFDMat ( const Mat  dXvdFFDMat)
inline

set values for dXvdFFDMat

Definition at line 570 of file DASolvers.H.

Referenced by PYDAFOAM::solveAdjoint().

Here is the caller graph for this function:

◆ setFFD2XvSeedVec()

void setFFD2XvSeedVec ( Vec  vecIn)
inline

set the value for DASolver::FFD2XvSeedVec_

Definition at line 576 of file DASolvers.H.

◆ updateDAOption()

void updateDAOption ( PyObject *  pyOptions)
inline

update the allOptions_ dict in DAOption based on the pyOptions from pyDAFoam

Definition at line 582 of file DASolvers.H.

Referenced by PYDAFOAM::solveAdjoint().

Here is the caller graph for this function:

◆ getPrevPrimalSolTime()

double getPrevPrimalSolTime ( )
inline

get the solution time folder for previous primal solution

Definition at line 588 of file DASolvers.H.

References assignValueCheckAD.

◆ pointVec2OFMesh()

void pointVec2OFMesh ( const Vec  xvVec) const
inline

assign the points in fvMesh of OpenFOAM based on the point vector

Definition at line 596 of file DASolvers.H.

◆ ofMesh2PointVec()

void ofMesh2PointVec ( Vec  xvVec) const
inline

assign the point vector based on the points in fvMesh of OpenFOAM

Definition at line 602 of file DASolvers.H.

◆ resVec2OFResField()

void resVec2OFResField ( const Vec  resVec) const
inline

assign the OpenFOAM residual fields based on the resVec

Definition at line 608 of file DASolvers.H.

◆ ofResField2ResVec()

void ofResField2ResVec ( Vec  resVec) const
inline

assign the resVec based on OpenFOAM residual fields

Definition at line 614 of file DASolvers.H.

◆ writeMatrixBinary()

void writeMatrixBinary ( const Mat  matIn,
const word  prefix 
)
inline

write the matrix in binary format

Definition at line 620 of file DASolvers.H.

◆ writeMatrixASCII()

void writeMatrixASCII ( const Mat  matIn,
const word  prefix 
)
inline

write the matrix in ASCII format

Definition at line 628 of file DASolvers.H.

◆ readMatrixBinary()

void readMatrixBinary ( Mat  matIn,
const word  prefix 
)
inline

read petsc matrix in binary format

Definition at line 636 of file DASolvers.H.

◆ writeVectorASCII()

void writeVectorASCII ( const Vec  vecIn,
const word  prefix 
)
inline

write petsc vector in ascii format

Definition at line 644 of file DASolvers.H.

◆ readVectorBinary()

void readVectorBinary ( Vec  vecIn,
const word  prefix 
)
inline

read petsc vector in binary format

Definition at line 652 of file DASolvers.H.

◆ writeVectorBinary()

void writeVectorBinary ( const Vec  vecIn,
const word  prefix 
)
inline

write petsc vector in binary format

Definition at line 660 of file DASolvers.H.

◆ setTimeInstanceField()

void setTimeInstanceField ( const label  instanceI)
inline

assign primal variables based on the current time instance

Definition at line 668 of file DASolvers.H.

◆ setTimeInstanceVar()

void setTimeInstanceVar ( const word  mode,
Mat  stateMat,
Mat  stateBCMat,
Vec  timeVec,
Vec  timeIdxVec 
)
inline

assign the time instance mats to/from the lists in the OpenFOAM layer depending on the mode

Definition at line 674 of file DASolvers.H.

References dafoam_plot3dtransform::mode.

◆ getTimeInstanceObjFunc()

double getTimeInstanceObjFunc ( const label  instanceI,
const word  objFuncName 
)
inline

return the value of objective function at the given time instance and name

Definition at line 685 of file DASolvers.H.

References assignValueCheckAD.

◆ setFieldValue4GlobalCellI()

void setFieldValue4GlobalCellI ( const word  fieldName,
const scalar  val,
const label  globalCellI,
const label  compI = 0 
)
inline

set the field value

Definition at line 695 of file DASolvers.H.

◆ setFieldValue4LocalCellI()

void setFieldValue4LocalCellI ( const word  fieldName,
const scalar  val,
const label  localCellI,
const label  compI = 0 
)
inline

set the field value

Definition at line 705 of file DASolvers.H.

◆ updateBoundaryConditions()

void updateBoundaryConditions ( const word  fieldName,
const word  fieldType 
)
inline

update the boundary condition for a field

Definition at line 715 of file DASolvers.H.

◆ calcPrimalResidualStatistics()

void calcPrimalResidualStatistics ( const word  mode)
inline

Calculate the mean, max, and norm2 for all residuals and print it to screen.

Definition at line 723 of file DASolvers.H.

References dafoam_plot3dtransform::mode.

◆ getForwardADDerivVal()

PetscScalar getForwardADDerivVal ( const word  objFuncName)
inline

get forwardADDerivVal_

Definition at line 729 of file DASolvers.H.

◆ calcResidualVec()

void calcResidualVec ( Vec  resVec)
inline

calculate the residual and assign it to the resVec vector

Definition at line 735 of file DASolvers.H.

◆ setPrimalBoundaryConditions()

void setPrimalBoundaryConditions ( const label  printInfo = 1)
inline

Definition at line 740 of file DASolvers.H.

◆ calcFvSource()

void calcFvSource ( const word  propName,
Vec  aForce,
Vec  tForce,
Vec  rDist,
Vec  targetForce,
Vec  center,
Vec  fvSource 
)
inline

calculate the fvSource based on the force profile

Definition at line 746 of file DASolvers.H.

References fvSource.

◆ calcdFvSourcedInputsTPsiAD()

void calcdFvSourcedInputsTPsiAD ( const word  propName,
const word  mode,
Vec  aForce,
Vec  tForce,
Vec  rDist,
Vec  targetForce,
Vec  center,
Vec  psi,
Vec  dFvSource 
)
inline

Definition at line 758 of file DASolvers.H.

References dafoam_plot3dtransform::mode, and psi.

◆ calcForceProfile()

void calcForceProfile ( Vec  center,
Vec  aForceL,
Vec  tForceL,
Vec  rDistL 
)
inline

Definition at line 772 of file DASolvers.H.

◆ calcdForcedStateTPsiAD()

void calcdForcedStateTPsiAD ( const word  mode,
Vec  xvVec,
Vec  stateVec,
Vec  psiVec,
Vec  prodVec 
)
inline

Definition at line 781 of file DASolvers.H.

References dafoam_plot3dtransform::mode.

◆ runFPAdj()

label runFPAdj ( const Vec  xvVec,
const Vec  wVec,
Vec  dFdW,
Vec  psi 
)
inline

Definition at line 791 of file DASolvers.H.

References psi.

◆ initTensorFlowFuncs()

void initTensorFlowFuncs ( pyComputeInterface  computeInterface,
void *  compute,
pyJacVecProdInterface  jacVecProdInterface,
void *  jacVecProd 
)
inline

initialize the call back function pointer

Definition at line 801 of file DASolvers.H.


The documentation for this class was generated from the following files: