
Public Member Functions | |
| TypeName ("DASolver") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, DASolver, dictionary,(char *argsAll, PyObject *pyOptions),(argsAll, pyOptions)) | |
| DASolver (char *argsAll, PyObject *pyOptions) | |
| virtual | ~DASolver () |
| virtual void | initSolver ()=0 |
| initialize fields and variables More... | |
| virtual label | solvePrimal ()=0 |
| solve the primal equations More... | |
| virtual label | runFPAdj (Vec dFdW, Vec psi) |
| solve the adjoint equation using the fixed-point iteration method More... | |
| virtual label | solveAdjointFP (Vec dFdW, Vec psi) |
| solve the adjoint equation using the fixed-point iteration method More... | |
| void | setTime (scalar time, label timeIndex) |
| setTime for OF fields More... | |
| label | getDdtSchemeOrder () |
| get the ddtScheme order More... | |
| void | printElapsedTime (const Time &runTime, const label printToScreen) |
| void | calcdRdWT (const label isPC, Mat dRdWT) |
| compute dRdWT More... | |
| void | updateKSPPCMat (Mat PCMat, KSP ksp) |
| Update the preconditioner matrix for the ksp object. More... | |
| label | solveLinearEqn (const KSP ksp, const Vec rhsVec, Vec solVec) |
| solve the linear equation given a ksp and right-hand-side vector More... | |
| void | updateOFFields (const scalar *states) |
| Update the OpenFOAM field values (including both internal and boundary fields) based on the state array. More... | |
| void | updateOFMesh (const scalar *volCoords) |
| Update the OpenFoam mesh point coordinates based on the volume point coords array. More... | |
| void | getOFFields (scalar *states) |
| assign the state variables from OpenFoam layer to the states array More... | |
| void | getOFField (const word fieldName, const word fieldType, double *field) |
| get a field variable from OF layer More... | |
| void | getOFMeshPoints (double *points) |
| get the flatten mesh points coordinates More... | |
| label | getInputSize (const word inputName, const word inputType) |
| get the array size of an input type More... | |
| label | getOutputSize (const word outputName, const word outputType) |
| get the array size of an output type More... | |
| label | getInputDistributed (const word inputName, const word inputType) |
| get whether the input is distributed among processors More... | |
| label | getOutputDistributed (const word outputName, const word outputType) |
| get whether the output is distributed among processors More... | |
| void | calcOutput (const word outputName, const word outputType, double *output) |
| get whether the output is distributed among processors More... | |
| void | runColoring () |
| run the coloring solver More... | |
| void | calcJacTVecProduct (const word inputName, const word inputType, const double *input, const word outputName, const word outputType, const double *seed, double *product) |
| calculate the Jacobian-matrix-transposed and vector product for product = [dOutput/dInput]^T * seed More... | |
| void | setSolverInput (const word inputName, const word inputType, const int inputSize, const double *input, const double *seed) |
| void | createMLRKSPMatrixFree (const Mat jacPCMat, KSP ksp) |
| create a multi-level, Richardson KSP object with matrix-free Jacobians More... | |
| void | calcdRdWOldTPsiAD (const label oldTimeLevel, const double *psi, double *dRdWOldTPsi) |
| compute dRdWOld^T*Psi More... | |
| void | calcCouplingFaceCoords (const scalar *volCoords, scalar *surfCoords) |
| return the face coordinates based on vol coords More... | |
| void | getCouplingPatchList (wordList &patchList, word groupName="NONE") |
| return the coupling patch list if any scenario is active on couplingInfo dict otherwise return design surface More... | |
| void | initializedRdWTMatrixFree () |
| initialize matrix free dRdWT More... | |
| void | destroydRdWTMatrixFree () |
| destroy the matrix free dRdWT More... | |
| void | registerStateVariableInput4AD (const label oldTimeLevel=0) |
| register all state variables as the input for reverse-mode AD More... | |
| void | deactivateStateVariableInput4AD (const label oldTimeLevel=0) |
| deactivate all state variables as the input for reverse-mode AD More... | |
| void | registerResidualOutput4AD () |
| register all residuals as the output for reverse-mode AD More... | |
| void | assignVec2ResidualGradient (const double *vecX) |
| assign the reverse-mode AD input seeds from vecX to the residuals in OpenFOAM More... | |
| void | assignStateGradient2Vec (double *vecY, const label oldTimeLevel=0) |
| set the reverse-mode AD derivatives from the state variables in OpenFOAM to vecY More... | |
| void | normalizeGradientVec (double *vecY) |
| normalize the reverse-mode AD derivatives stored in vecY More... | |
| void | normalizeJacTVecProduct (const word inputName, double *product) |
| normalize the jacobian vector product that has states as the input such as dFdW and dRdW More... | |
| void | initializeGlobalADTape4dRdWT () |
| initialize the CoDiPack reverse-mode AD global tape for computing dRdWT*psi More... | |
| label | hasVolCoordInput () |
| whether the volCoord input is defined More... | |
| void | initDynamicMesh () |
| resetting internal info in fvMesh, which is needed for multiple primal runs More... | |
| label | loop (Time &runTime) |
| return whether to loop the primal solution, similar to runTime::loop() except we don't do file IO More... | |
| void | updateInputFieldUnsteady () |
| assign the inputFieldUnsteady values to the OF field vars More... | |
| void | initInputFieldUnsteady () |
| initialize inputFieldUnsteady from the GlobalVar class More... | |
| void | meanStatesToStates () |
| assign the mean states values to states More... | |
| label | getGlobalXvIndex (const label idxPoint, const label idxCoord) const |
| basically, we call DAIndex::getGlobalXvIndex 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... | |
| 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... | |
| label | getNLocalPoints () const |
| return the number of local points More... | |
| void | setDAFunctionList () |
| initialize DASolver::daFunctionPtrList_ one needs to call this before calling printAllFunctions More... | |
| void | calcAllFunctions (label print=0) |
| calculate the values of all objective functions and print them to screen More... | |
| double | getTimeOpFuncVal (const word functionName) |
| get the function value based on timeOp More... | |
| label | getFunctionListIndex (const word functionName) |
| return the index of a give functionName in daFunctionPtrList_ More... | |
| label | checkMesh () const |
| check the mesh quality and return meshOK More... | |
| scalar | getdFScaling (const word functionName, const label timeIdx) |
| get the scaling factor for dF/d? derivative computation More... | |
| void | printAllOptions () |
| print all DAOption More... | |
| void | calcPrimalResidualStatistics (const word mode, const label writeRes=0) |
| calculate the norms of all residuals and print to screen More... | |
| void | updateDAOption (PyObject *pyOptions) |
| update the allOptions_ dict in DAOption based on the pyOptions from pyDAFoam More... | |
| scalar | getPrevPrimalSolTime () |
| get the solution time folder for previous primal solution More... | |
| void | updateBoundaryConditions (const word fieldName, const word fieldType) |
| update the boundary condition for a field More... | |
| void | updateStateBoundaryConditions () |
| update the boundary conditions for all states and intermediate variables More... | |
| void | calcResiduals (label isPC=0) |
| calculate the residuals More... | |
| const fvMesh & | getMesh () |
| const Time & | getRunTime () |
| return the runTime object More... | |
| const DAOption & | getDAOption () |
| get DAOption object More... | |
| const DAStateInfo & | getDAStateInfo () |
| get DAStateInfo object More... | |
| const DAIndex & | getDAIndex () |
| get DAIndex object More... | |
| const DAModel & | getDAModel () |
| get DAModel object More... | |
| const DAResidual & | getDAResidual () |
| get DAResidual object More... | |
| const DAField & | getDAField () |
| get DAField object More... | |
| const DALinearEqn & | getDALinearEqn () |
| get DALinearEqn object More... | |
| const DACheckMesh & | getDACheckMesh () |
| get DACheckMesh object More... | |
| label | getNRegressionParameters (word modelName) |
| get the number of regression model parameters More... | |
| scalar | getRegressionParameter (word modelName, const label idxI) |
| get the regression parameter More... | |
| void | setRegressionParameter (word modelName, const label idxI, scalar val) |
| set the regression parameter More... | |
| void | regressionModelCompute () |
| call the compute method of the regression model More... | |
| void | setPrimalBoundaryConditions (const label printInfo=1) |
| update the primal state boundary condition based on the primalBC dict More... | |
| void | writeFailedMesh () |
| write the failed mesh to disk More... | |
| void | readStateVars (scalar timeVal, label oldTimeLevel=0) |
| read the state variables from the disk and assign the value to the prescribe time level More... | |
| void | readMeshPoints (const scalar timeVal) |
| read the mesh points from the disk and run movePoints to deform the mesh More... | |
| void | writeMeshPoints (const double *points, const scalar timeVal) |
| write the mesh points to the disk for the given timeVal More... | |
| void | calcPCMatWithFvMatrix (Mat PCMat, const label turbOnly=0) |
| calculate the PC mat using fvMatrix More... | |
| void | initTensorFlowFuncs (pyComputeInterface computeInterface, void *compute, pyJacVecProdInterface jacVecProdInterface, void *jacVecProd, pySetCharInterface setModelNameInterface, void *setModelName) |
| initialize tensorflow functions and interfaces for callback More... | |
| void | writeAdjStates (const label writeMesh, const wordList &additionalOutput) |
| write state variables that are NO_WRITE to disk More... | |
| scalar | getElapsedClockTime () |
| return the elapsed clock time for testing speed More... | |
| scalar | getElapsedCpuTime () |
| return the elapsed CPU time for testing speed More... | |
| template<class classType > | |
| label | validateField (const classType &field) |
| check if a field variable has nan More... | |
| template<class classType > | |
| label | validateVectorField (const classType &field) |
| check if a field variable has nan More... | |
| label | validateStates () |
| check if the state variables have valid values More... | |
| void | getInitStateVals (HashTable< scalar > &initState) |
| calculate the initial value for validate states More... | |
| void | resetStateVals () |
| reset the states to its initial values this usually happens when we have nan in states More... | |
| void | writeSensMapSurface (const word name, const double *dFdXs, const double *Xs, const label size, const double timeName) |
| write the sensitivity map for all wall surfaces More... | |
| void | writeSensMapField (const word name, const double *dFdField, const word fieldType, const double timeName) |
| write the sensitivity map for the entire field More... | |
| scalar | getLatestTime () |
| get the latest time solution from the case folder. More... | |
| void | writeAdjointFields (const word function, const double writeTime, const double *psi) |
| write the adjoint variables for all states More... | |
Static Public Member Functions | |
| static autoPtr< DASolver > | New (char *argsAll, PyObject *pyOptions) |
| static PetscErrorCode | dRdWTMatVecMultFunction (Mat dRdWT, Vec vecX, Vec vecY) |
| matrix free matrix-vector product function to compute vecY=dRdWT*vecX More... | |
Protected Member Functions | |
| label | isPrintTime (const Time &runTime, const label printInterval) const |
| label | checkPrimalFailure () |
| check whether the primal fails based on residual and regression fail flag More... | |
| void | reduceStateResConLevel (const dictionary &maxResConLv4JacPCMat, HashTable< List< List< word >>> &stateResConInfo) const |
| reduce the connectivity level for Jacobian connectivity mat More... | |
| void | writeAssociatedFields () |
| write associated fields such as relative velocity More... | |
Protected Attributes | |
| char * | argsAll_ |
| all the arguments More... | |
| PyObject * | pyOptions_ |
| all options in DAFoam More... | |
| autoPtr< argList > | argsPtr_ |
| args pointer More... | |
| autoPtr< Time > | runTimePtr_ |
| runTime pointer More... | |
| autoPtr< fvMesh > | meshPtr_ |
| fvMesh pointer More... | |
| autoPtr< DAOption > | daOptionPtr_ |
| DAOption pointer. More... | |
| autoPtr< DAModel > | daModelPtr_ |
| DAModel pointer. More... | |
| autoPtr< DAIndex > | daIndexPtr_ |
| DAIndex pointer. More... | |
| autoPtr< DAField > | daFieldPtr_ |
| DAField pointer. More... | |
| UPtrList< DAFunction > | daFunctionPtrList_ |
| a list of DAFunction pointers More... | |
| UPtrList< DATimeOp > | daTimeOpPtrList_ |
| a list of DATimeOp pointers More... | |
| autoPtr< DACheckMesh > | daCheckMeshPtr_ |
| DACheckMesh object pointer. More... | |
| autoPtr< DALinearEqn > | daLinearEqnPtr_ |
| DALinearEqn pointer. More... | |
| autoPtr< DAResidual > | daResidualPtr_ |
| DAResidual pointer. More... | |
| autoPtr< DAStateInfo > | daStateInfoPtr_ |
| DAStateInfo pointer. More... | |
| autoPtr< DARegression > | daRegressionPtr_ |
| DARegression pointer. More... | |
| autoPtr< DAGlobalVar > | daGlobalVarPtr_ |
| DAGlobalVar pointer. More... | |
| autoPtr< pointField > | points0Ptr_ |
| the initial points for dynamicMesh without volCoord inputs More... | |
| HashTable< wordList > | stateInfo_ |
| the stateInfo_ list from DAStateInfo object More... | |
| scalar | prevPrimalSolTime_ = -1e10 |
| the solution time for the previous primal solution More... | |
| Mat | dRdWTMF_ |
| matrix-free dRdWT matrix used in GMRES solution More... | |
| label | globalADTape4dRdWTInitialized = 0 |
| a flag in dRdWTMatVecMultFunction to determine if the global tap is initialized More... | |
| scalar | primalMinResTol_ = 0.0 |
| primal residual tolerance More... | |
| label | printToScreen_ = 0 |
| whether to print primal information to the screen More... | |
| label | regModelFail_ = 0 |
| whether the regModel compute fails More... | |
| label | printInterval_ = 100 |
| how frequent do you want to print the primal info default is every 100 steps More... | |
| label | primalMinIters_ = -1 |
| primal min number of iterations More... | |
| label | printIntervalUnsteady_ = 1 |
| how frequent do you want to print the primal info default is every 100 steps More... | |
| List< scalarList > | functionTimeSteps_ |
| a list list that saves the function value for all time steps More... | |
| label | primalFinalTimeIndex_ |
| the final time index from the primal solve. for steady state cases it can converge before endTime More... | |
| HashTable< scalar > | initStateVals_ |
| initial values for validateStates More... | |
Definition at line 54 of file DASolver.H.
| DASolver | ( | char * | argsAll, |
| PyObject * | pyOptions | ||
| ) |
Definition at line 35 of file DASolver.C.
References allOptions, DASolver::daOptionPtr_, DASolver::hasVolCoordInput(), DASolver::initDynamicMesh(), DASolver::initInputFieldUnsteady(), DASolver::meshPtr_, DASolver::points0Ptr_, DASolver::primalMinIters_, DASolver::primalMinResTol_, DASolver::printInterval_, DASolver::printIntervalUnsteady_, and DASolver::pyOptions_.

|
inlinevirtual |
Definition at line 201 of file DASolver.H.
|
protected |
Definition at line 2508 of file DASolver.C.
References runTime.
Referenced by DASolver::loop(), DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), and DAPimpleDyMFoam::solvePrimal().

|
protected |
check whether the primal fails based on residual and regression fail flag
Definition at line 2472 of file DASolver.C.
References DASolver::daGlobalVarPtr_, DASolver::daOptionPtr_, DASolver::primalMinResTol_, and DASolver::regModelFail_.
Referenced by DASolidDisplacementFoam::solvePrimal(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), and DASimpleFoam::solvePrimal().

|
protected |
reduce the connectivity level for Jacobian connectivity mat
Definition at line 422 of file DASolver.C.
References DASolver::daOptionPtr_, and forAll().
Referenced by DASolver::calcdRdWT().


|
protected |
write associated fields such as relative velocity
Definition at line 2526 of file DASolver.C.
References DASolver::meshPtr_, MRF, DASolver::runTimePtr_, U, and URel.
Referenced by DARhoSimpleFoam::solvePrimal(), and DASimpleFoam::solvePrimal().

| TypeName | ( | "DASolver" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| DASolver | , | ||
| dictionary | , | ||
| (char *argsAll, PyObject *pyOptions) | , | ||
| (argsAll, pyOptions) | |||
| ) |
|
static |
Definition at line 104 of file DASolver.C.
References allOptions, and DAUtility::pyDict2OFDict().
Referenced by DASolvers::DASolvers().


|
pure virtual |
initialize fields and variables
Implemented in DAIrkPimpleFoam, DASimpleFoam, DAPimpleDyMFoam, DAPimpleFoam, DARhoSimpleFoam, DARhoPimpleFoam, DARhoSimpleCFoam, DATurboFoam, DASolidDisplacementFoam, and DAHeatTransferFoam.
|
pure virtual |
solve the primal equations
Implemented in DAIrkPimpleFoam, DASimpleFoam, DAPimpleDyMFoam, DAPimpleFoam, DARhoSimpleFoam, DARhoPimpleFoam, DARhoSimpleCFoam, DATurboFoam, DASolidDisplacementFoam, and DAHeatTransferFoam.
|
virtual |
solve the adjoint equation using the fixed-point iteration method
Reimplemented in DASimpleFoam.
Definition at line 3208 of file DASolver.C.
|
virtual |
solve the adjoint equation using the fixed-point iteration method
Reimplemented in DAPimpleFoam.
Definition at line 3224 of file DASolver.C.
|
inline |
|
inline |
get the ddtScheme order
Definition at line 230 of file DASolver.H.
References DASolver::meshPtr_.
Referenced by DASolver::initDynamicMesh().

|
inline |
Definition at line 256 of file DASolver.H.
References runTime.
Referenced by DAHeatTransferFoam::solvePrimal(), DASolidDisplacementFoam::solvePrimal(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoPimpleFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), DAPimpleDyMFoam::solvePrimal(), and DASimpleFoam::solvePrimal().

| void calcdRdWT | ( | const label | isPC, |
| Mat | dRdWT | ||
| ) |
compute dRdWT
Definition at line 782 of file DASolver.C.
References DAPartDeriv::calcPartDerivMat(), DASolver::calcPrimalResidualStatistics(), DAJacCon::clear(), DASolver::daFieldPtr_, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, DASolver::daStateInfoPtr_, DAJacCon::initializeJacCon(), DAPartDeriv::initializePartDerivMat(), DASolver::meshPtr_, DAJacCon::readJacConColoring(), DASolver::reduceStateResConLevel(), DASolver::runTimePtr_, DAJacCon::setupJacCon(), DAJacCon::setupJacConPreallocation(), and DAUtility::writeMatrixBinary().

| void updateKSPPCMat | ( | Mat | PCMat, |
| KSP | ksp | ||
| ) |
Update the preconditioner matrix for the ksp object.
Definition at line 925 of file DASolver.C.
References DASolver::dRdWTMF_.
| label solveLinearEqn | ( | const KSP | ksp, |
| const Vec | rhsVec, | ||
| Vec | solVec | ||
| ) |
solve the linear equation given a ksp and right-hand-side vector
Definition at line 955 of file DASolver.C.
References DASolver::calcResiduals(), DASolver::daLinearEqnPtr_, DASolver::deactivateStateVariableInput4AD(), DASolver::globalADTape4dRdWTInitialized, and DASolver::updateStateBoundaryConditions().

| void updateOFFields | ( | const scalar * | states | ) |
Update the OpenFOAM field values (including both internal and boundary fields) based on the state array.
Definition at line 1044 of file DASolver.C.
References DASolver::daFieldPtr_, DASolver::daOptionPtr_, and DASolver::updateStateBoundaryConditions().

| void updateOFMesh | ( | const scalar * | volCoords | ) |
Update the OpenFoam mesh point coordinates based on the volume point coords array.
Definition at line 1057 of file DASolver.C.
References DASolver::daFieldPtr_, and DASolver::daOptionPtr_.
Referenced by DASolver::calcCouplingFaceCoords().

|
inline |
assign the state variables from OpenFoam layer to the states array
Definition at line 289 of file DASolver.H.
References DASolver::daFieldPtr_.
| void getOFField | ( | const word | fieldName, |
| const word | fieldType, | ||
| double * | field | ||
| ) |
get a field variable from OF layer
Definition at line 1006 of file DASolver.C.
References assignValueCheckAD, forAll(), and DASolver::meshPtr_.

| void getOFMeshPoints | ( | double * | points | ) |
get the flatten mesh points coordinates
Definition at line 991 of file DASolver.C.
References assignValueCheckAD, forAll(), and DASolver::meshPtr_.

| label getInputSize | ( | const word | inputName, |
| const word | inputType | ||
| ) |
get the array size of an input type
Definition at line 1348 of file DASolver.C.
References DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::meshPtr_, and DAInput::New().

| label getOutputSize | ( | const word | outputName, |
| const word | outputType | ||
| ) |
get the array size of an output type
Definition at line 1364 of file DASolver.C.
References DASolver::daFunctionPtrList_, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, DASolver::meshPtr_, and DAOutput::New().

| label getInputDistributed | ( | const word | inputName, |
| const word | inputType | ||
| ) |
get whether the input is distributed among processors
Definition at line 1411 of file DASolver.C.
References DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::meshPtr_, and DAInput::New().

| label getOutputDistributed | ( | const word | outputName, |
| const word | outputType | ||
| ) |
get whether the output is distributed among processors
Definition at line 1427 of file DASolver.C.
References DASolver::daFunctionPtrList_, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, DASolver::meshPtr_, and DAOutput::New().

| void calcOutput | ( | const word | outputName, |
| const word | outputType, | ||
| double * | output | ||
| ) |
get whether the output is distributed among processors
Definition at line 1383 of file DASolver.C.
References assignValueCheckAD, DASolver::daFunctionPtrList_, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, forAll(), DASolver::meshPtr_, and DAOutput::New().

| void runColoring | ( | ) |
run the coloring solver
Definition at line 554 of file DASolver.C.
References DAJacCon::calcJacConColoring(), DAJacCon::clear(), DAJacCon::coloringExists(), DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daStateInfoPtr_, DAJacCon::initializeJacCon(), DASolver::meshPtr_, DAJacCon::setupJacCon(), and DAJacCon::setupJacConPreallocation().

| void calcJacTVecProduct | ( | const word | inputName, |
| const word | inputType, | ||
| const double * | input, | ||
| const word | outputName, | ||
| const word | outputType, | ||
| const double * | seed, | ||
| double * | product | ||
| ) |
calculate the Jacobian-matrix-transposed and vector product for product = [dOutput/dInput]^T * seed
Definition at line 1445 of file DASolver.C.
References DASolver::daFunctionPtrList_, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, forAll(), DASolver::meshPtr_, DAInput::New(), DAOutput::New(), DASolver::normalizeJacTVecProduct(), DASolver::runTimePtr_, and DASolver::updateStateBoundaryConditions().

| void setSolverInput | ( | const word | inputName, |
| const word | inputType, | ||
| const int | inputSize, | ||
| const double * | input, | ||
| const double * | seed | ||
| ) |
Definition at line 1310 of file DASolver.C.
References DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, forAll(), DASolver::meshPtr_, and DAInput::New().

| void createMLRKSPMatrixFree | ( | const Mat | jacPCMat, |
| KSP | ksp | ||
| ) |
create a multi-level, Richardson KSP object with matrix-free Jacobians
Definition at line 936 of file DASolver.C.
References DASolver::daLinearEqnPtr_, and DASolver::dRdWTMF_.
| void calcdRdWOldTPsiAD | ( | const label | oldTimeLevel, |
| const double * | psi, | ||
| double * | dRdWOldTPsi | ||
| ) |
compute dRdWOld^T*Psi
Definition at line 1661 of file DASolver.C.
References DASolver::assignStateGradient2Vec(), DASolver::assignVec2ResidualGradient(), DASolver::calcResiduals(), DASolver::deactivateStateVariableInput4AD(), DASolver::normalizeGradientVec(), DASolver::registerResidualOutput4AD(), DASolver::registerStateVariableInput4AD(), DASolver::runTimePtr_, and DASolver::updateStateBoundaryConditions().

| void calcCouplingFaceCoords | ( | const scalar * | volCoords, |
| scalar * | surfCoords | ||
| ) |
return the face coordinates based on vol coords
Definition at line 1592 of file DASolver.C.
References DASolver::daOptionPtr_, forAll(), DASolver::meshPtr_, and DASolver::updateOFMesh().

| void getCouplingPatchList | ( | wordList & | patchList, |
| word | groupName = "NONE" |
||
| ) |
return the coupling patch list if any scenario is active on couplingInfo dict otherwise return design surface
|
static |
matrix free matrix-vector product function to compute vecY=dRdWT*vecX
Definition at line 1119 of file DASolver.C.
Referenced by DASolver::initializedRdWTMatrixFree().

| void initializedRdWTMatrixFree | ( | ) |
initialize matrix free dRdWT
Definition at line 1076 of file DASolver.C.
References DASolver::calcPrimalResidualStatistics(), DASolver::daIndexPtr_, DASolver::daOptionPtr_, DASolver::dRdWTMatVecMultFunction(), and DASolver::dRdWTMF_.

| void destroydRdWTMatrixFree | ( | ) |
destroy the matrix free dRdWT
Definition at line 1108 of file DASolver.C.
References DASolver::dRdWTMF_.
| void registerStateVariableInput4AD | ( | const label | oldTimeLevel = 0 | ) |
register all state variables as the input for reverse-mode AD
Definition at line 1722 of file DASolver.C.
References forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DASolver::calcdRdWOldTPsiAD(), DASolver::initializeGlobalADTape4dRdWT(), and DAPimpleFoam::solveAdjointFP().


| void deactivateStateVariableInput4AD | ( | const label | oldTimeLevel = 0 | ) |
deactivate all state variables as the input for reverse-mode AD
Definition at line 1879 of file DASolver.C.
References forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DASolver::calcdRdWOldTPsiAD(), DAPimpleFoam::solveAdjointFP(), and DASolver::solveLinearEqn().


| void registerResidualOutput4AD | ( | ) |
register all residuals as the output for reverse-mode AD
Definition at line 2035 of file DASolver.C.
References forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DASolver::calcdRdWOldTPsiAD(), DASolver::initializeGlobalADTape4dRdWT(), and DAPimpleFoam::solveAdjointFP().


| void assignVec2ResidualGradient | ( | const double * | vecX | ) |
assign the reverse-mode AD input seeds from vecX to the residuals in OpenFOAM
Definition at line 2208 of file DASolver.C.
References DASolver::daIndexPtr_, forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DAPimpleFoam::calcAdjointResiduals(), and DASolver::calcdRdWOldTPsiAD().


| void assignStateGradient2Vec | ( | double * | vecY, |
| const label | oldTimeLevel = 0 |
||
| ) |
set the reverse-mode AD derivatives from the state variables in OpenFOAM to vecY
Definition at line 2295 of file DASolver.C.
References DASolver::daIndexPtr_, forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DAPimpleFoam::calcAdjointResiduals(), and DASolver::calcdRdWOldTPsiAD().


| void normalizeGradientVec | ( | double * | vecY | ) |
normalize the reverse-mode AD derivatives stored in vecY
Definition at line 2107 of file DASolver.C.
References DASolver::daIndexPtr_, DASolver::daOptionPtr_, forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DASolver::calcdRdWOldTPsiAD().


| void normalizeJacTVecProduct | ( | const word | inputName, |
| double * | product | ||
| ) |
normalize the jacobian vector product that has states as the input such as dFdW and dRdW
Definition at line 1198 of file DASolver.C.
References DASolver::daIndexPtr_, DASolver::daOptionPtr_, forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.
Referenced by DASolver::calcJacTVecProduct().


| void initializeGlobalADTape4dRdWT | ( | ) |
initialize the CoDiPack reverse-mode AD global tape for computing dRdWT*psi
Definition at line 1166 of file DASolver.C.
References DASolver::calcResiduals(), DASolver::registerResidualOutput4AD(), DASolver::registerStateVariableInput4AD(), and DASolver::updateStateBoundaryConditions().

| label hasVolCoordInput | ( | ) |
whether the volCoord input is defined
Definition at line 3744 of file DASolver.C.
References allOptions, DASolver::daOptionPtr_, and forAll().
Referenced by DASolver::DASolver(), and DASolver::initDynamicMesh().


| void initDynamicMesh | ( | ) |
resetting internal info in fvMesh, which is needed for multiple primal runs
Definition at line 3761 of file DASolver.C.
References DASolver::getDdtSchemeOrder(), DASolver::hasVolCoordInput(), DASolver::meshPtr_, DASolver::points0Ptr_, and DASolver::runTimePtr_.
Referenced by DASolver::DASolver(), and DAPimpleDyMFoam::solvePrimal().


| label loop | ( | Time & | runTime | ) |
return whether to loop the primal solution, similar to runTime::loop() except we don't do file IO
Definition at line 147 of file DASolver.C.
References DASolver::calcAllFunctions(), DASolver::daGlobalVarPtr_, DASolver::daRegressionPtr_, DASolver::isPrintTime(), DASolver::prevPrimalSolTime_, DASolver::primalFinalTimeIndex_, DASolver::primalMinIters_, DASolver::primalMinResTol_, DASolver::printInterval_, DASolver::printToScreen_, and runTime.
Referenced by DAHeatTransferFoam::solvePrimal(), DASolidDisplacementFoam::solvePrimal(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), and DASimpleFoam::solvePrimal().


| void updateInputFieldUnsteady | ( | ) |
assign the inputFieldUnsteady values to the OF field vars
Definition at line 3924 of file DASolver.C.
References DASolver::daOptionPtr_, forAll(), DAGlobalVar::inputFieldUnsteady, DASolver::meshPtr_, and DASolver::runTimePtr_.
Referenced by DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), DAPimpleDyMFoam::solvePrimal(), and DASolver::updateStateBoundaryConditions().


| void initInputFieldUnsteady | ( | ) |
initialize inputFieldUnsteady from the GlobalVar class
Definition at line 3885 of file DASolver.C.
References DASolver::daOptionPtr_, forAll(), DAGlobalVar::inputFieldUnsteady, and DASolver::meshPtr_.
Referenced by DASolver::DASolver().


| void meanStatesToStates | ( | ) |
assign the mean states values to states
Definition at line 3805 of file DASolver.C.
References DASolver::daIndexPtr_, forAll(), DASolver::meshPtr_, DASolver::stateInfo_, and DASolver::updateStateBoundaryConditions().

|
inline |
basically, we call DAIndex::getGlobalXvIndex
Definition at line 427 of file DASolver.H.
References DASolver::daIndexPtr_.
|
inline |
write the matrix in binary format
Definition at line 435 of file DASolver.H.
References DAUtility::writeMatrixBinary().

|
inline |
write the matrix in ASCII format
Definition at line 443 of file DASolver.H.
References DAUtility::writeMatrixASCII().

|
inline |
read petsc matrix in binary format
Definition at line 451 of file DASolver.H.
References DAUtility::readMatrixBinary().

|
inline |
write petsc vector in ascii format
Definition at line 459 of file DASolver.H.
References DAUtility::writeVectorASCII().

|
inline |
read petsc vector in binary format
Definition at line 467 of file DASolver.H.
References DAUtility::readVectorBinary().

|
inline |
write petsc vector in binary format
Definition at line 475 of file DASolver.H.
References DAUtility::writeVectorBinary().

|
inline |
return the number of local adjoint states
Definition at line 483 of file DASolver.H.
References DASolver::daIndexPtr_.
|
inline |
return the number of local adjoint boundary states
Definition at line 489 of file DASolver.H.
References DASolver::daIndexPtr_.
|
inline |
return the number of local cells
Definition at line 495 of file DASolver.H.
References DASolver::meshPtr_.
|
inline |
return the number of local points
Definition at line 501 of file DASolver.H.
References DASolver::meshPtr_.
| void setDAFunctionList | ( | ) |
initialize DASolver::daFunctionPtrList_ one needs to call this before calling printAllFunctions
Definition at line 330 of file DASolver.C.
References allOptions, DASolver::daFunctionPtrList_, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daTimeOpPtrList_, forAll(), DASolver::functionTimeSteps_, DASolver::meshPtr_, DATimeOp::New(), DAFunction::New(), and DASolver::runTimePtr_.

| void calcAllFunctions | ( | label | print = 0 | ) |
calculate the values of all objective functions and print them to screen
Definition at line 204 of file DASolver.C.
References DAFunction::calcFunction(), DASolver::daFunctionPtrList_, DASolver::daOptionPtr_, DASolver::daTimeOpPtrList_, forAll(), DASolver::functionTimeSteps_, DAFunction::getFunctionName(), DAFunction::getFunctionTimeOp(), and DASolver::runTimePtr_.
Referenced by DASolver::loop(), DAHeatTransferFoam::solvePrimal(), DASolidDisplacementFoam::solvePrimal(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoPimpleFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), DAPimpleDyMFoam::solvePrimal(), and DASimpleFoam::solvePrimal().


| double getTimeOpFuncVal | ( | const word | functionName | ) |
get the function value based on timeOp
Definition at line 261 of file DASolver.C.
References DASolver::daFunctionPtrList_, DASolver::daOptionPtr_, DASolver::daTimeOpPtrList_, forAll(), DASolver::functionTimeSteps_, DAFunction::getFunctionName(), and DASolver::primalFinalTimeIndex_.

|
inline |
return the index of a give functionName in daFunctionPtrList_
Definition at line 516 of file DASolver.H.
References DASolver::daFunctionPtrList_, forAll(), and DAFunction::getFunctionName().

|
inline |
check the mesh quality and return meshOK
Definition at line 530 of file DASolver.H.
References DASolver::daCheckMeshPtr_.
| scalar getdFScaling | ( | const word | functionName, |
| const label | timeIdx | ||
| ) |
get the scaling factor for dF/d? derivative computation
Definition at line 302 of file DASolver.C.
References DASolver::daFunctionPtrList_, DASolver::daOptionPtr_, DASolver::daTimeOpPtrList_, forAll(), DASolver::functionTimeSteps_, DAFunction::getFunctionName(), and DASolver::primalFinalTimeIndex_.

|
inline |
| void calcPrimalResidualStatistics | ( | const word | mode, |
| const label | writeRes = 0 |
||
| ) |
calculate the norms of all residuals and print to screen
Definition at line 591 of file DASolver.C.
References DASolver::calcResiduals(), forAll(), DASolver::meshPtr_, dafoam_plot3dtransform::mode, and DASolver::stateInfo_.
Referenced by DASolver::calcdRdWT(), and DASolver::initializedRdWTMatrixFree().


|
inline |
update the allOptions_ dict in DAOption based on the pyOptions from pyDAFoam
Definition at line 551 of file DASolver.H.
References DASolver::daOptionPtr_.
Referenced by PYDAFOAM::__call__().

|
inline |
get the solution time folder for previous primal solution
Definition at line 557 of file DASolver.H.
References DASolver::prevPrimalSolTime_.
| void updateBoundaryConditions | ( | const word | fieldName, |
| const word | fieldType | ||
| ) |
update the boundary condition for a field
Definition at line 2559 of file DASolver.C.
References DASolver::meshPtr_.
| void updateStateBoundaryConditions | ( | ) |
update the boundary conditions for all states and intermediate variables
Definition at line 2608 of file DASolver.C.
References DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, DASolver::regressionModelCompute(), and DASolver::updateInputFieldUnsteady().
Referenced by DASolver::calcdRdWOldTPsiAD(), DASolver::calcJacTVecProduct(), DASolver::initializeGlobalADTape4dRdWT(), DASolver::meanStatesToStates(), DASolver::readStateVars(), DASolver::resetStateVals(), DAPimpleFoam::solveAdjointFP(), DASolver::solveLinearEqn(), and DASolver::updateOFFields().


| void calcResiduals | ( | label | isPC = 0 | ) |
calculate the residuals
Definition at line 2592 of file DASolver.C.
References DASolver::daModelPtr_, and DASolver::daResidualPtr_.
Referenced by DASolver::calcdRdWOldTPsiAD(), DASolver::calcPrimalResidualStatistics(), DASolver::initializeGlobalADTape4dRdWT(), DAPimpleFoam::solveAdjointFP(), and DASolver::solveLinearEqn().

|
inline |
Accessing members return the mesh object
Definition at line 575 of file DASolver.H.
References DASolver::meshPtr_.
|
inline |
return the runTime object
Definition at line 581 of file DASolver.H.
References DASolver::runTimePtr_.
|
inline |
|
inline |
get DAStateInfo object
Definition at line 593 of file DASolver.H.
References DASolver::daStateInfoPtr_.
|
inline |
|
inline |
|
inline |
get DAResidual object
Definition at line 611 of file DASolver.H.
References DASolver::daResidualPtr_.
|
inline |
|
inline |
get DALinearEqn object
Definition at line 623 of file DASolver.H.
References DASolver::daLinearEqnPtr_.
|
inline |
get DACheckMesh object
Definition at line 629 of file DASolver.H.
References DASolver::daCheckMeshPtr_.
|
inline |
get the number of regression model parameters
Definition at line 635 of file DASolver.H.
References DASolver::daRegressionPtr_.
|
inline |
get the regression parameter
Definition at line 641 of file DASolver.H.
References DASolver::daRegressionPtr_.
|
inline |
set the regression parameter
Definition at line 647 of file DASolver.H.
References DASolver::daRegressionPtr_.
|
inline |
call the compute method of the regression model
Definition at line 653 of file DASolver.H.
References DASolver::daRegressionPtr_.
Referenced by DASolver::updateStateBoundaryConditions().

| void setPrimalBoundaryConditions | ( | const label | printInfo = 1 | ) |
update the primal state boundary condition based on the primalBC dict
Definition at line 3187 of file DASolver.C.
References DASolver::daFieldPtr_, and DASolver::daOptionPtr_.
| void writeFailedMesh | ( | ) |
write the failed mesh to disk
Definition at line 3172 of file DASolver.C.
References DASolver::daOptionPtr_, and DASolver::runTimePtr_.
| void readStateVars | ( | scalar | timeVal, |
| label | oldTimeLevel = 0 |
||
| ) |
read the state variables from the disk and assign the value to the prescribe time level
Definition at line 2938 of file DASolver.C.
References forAll(), mesh, DASolver::meshPtr_, DASolver::stateInfo_, and DASolver::updateStateBoundaryConditions().

| void readMeshPoints | ( | const scalar | timeVal | ) |
read the mesh points from the disk and run movePoints to deform the mesh
Definition at line 2875 of file DASolver.C.
References DASolver::meshPtr_.
| void writeMeshPoints | ( | const double * | points, |
| const scalar | timeVal | ||
| ) |
write the mesh points to the disk for the given timeVal
Definition at line 2898 of file DASolver.C.
References forAll(), DASolver::meshPtr_, and DASolver::runTimePtr_.

| void calcPCMatWithFvMatrix | ( | Mat | PCMat, |
| const label | turbOnly = 0 |
||
| ) |
calculate the PC mat using fvMatrix
Definition at line 2633 of file DASolver.C.
References assignValueCheckAD, D, DASolver::daIndexPtr_, DASolver::daModelPtr_, DASolver::daOptionPtr_, DASolver::daResidualPtr_, forAll(), DATurbulenceModel::getFvMatrixFields(), DASolver::meshPtr_, and DASolver::stateInfo_.

|
inline |
initialize tensorflow functions and interfaces for callback
Definition at line 679 of file DASolver.H.
References DAUtility::pyCalcBeta, DAUtility::pyCalcBetaInterface, DAUtility::pyCalcBetaJacVecProd, DAUtility::pyCalcBetaJacVecProdInterface, DAUtility::pySetModelName, and DAUtility::pySetModelNameInterface.
| void writeAdjStates | ( | const label | writeMesh, |
| const wordList & | additionalOutput | ||
| ) |
write state variables that are NO_WRITE to disk
Definition at line 2778 of file DASolver.C.
References forAll(), DASolver::meshPtr_, DASolver::runTimePtr_, and DASolver::stateInfo_.
Referenced by DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), and DAPimpleDyMFoam::solvePrimal().


|
inline |
return the elapsed clock time for testing speed
Definition at line 703 of file DASolver.H.
References DASolver::runTimePtr_.
|
inline |
return the elapsed CPU time for testing speed
Definition at line 709 of file DASolver.H.
References DASolver::runTimePtr_.
| label validateField | ( | const classType & | field | ) |
check if a field variable has nan
Definition at line 771 of file DASolver.H.
References forAll().
Referenced by DASolver::validateStates().


| label validateVectorField | ( | const classType & | field | ) |
check if a field variable has nan
Definition at line 802 of file DASolver.H.
References forAll().
Referenced by DASolver::validateStates().


| label validateStates | ( | ) |
check if the state variables have valid values
Definition at line 3382 of file DASolver.C.
References forAll(), DASolver::meshPtr_, DASolver::resetStateVals(), DASolver::stateInfo_, DASolver::validateField(), and DASolver::validateVectorField().
Referenced by DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), and DAPimpleDyMFoam::solvePrimal().


| void getInitStateVals | ( | HashTable< scalar > & | initState | ) |
calculate the initial value for validate states
Definition at line 3240 of file DASolver.C.
References DASolver::daIndexPtr_, forAll(), DASolver::meshPtr_, and DASolver::stateInfo_.

| void resetStateVals | ( | ) |
reset the states to its initial values this usually happens when we have nan in states
Definition at line 3310 of file DASolver.C.
References forAll(), DASolver::initStateVals_, DASolver::meshPtr_, DASolver::stateInfo_, U, and DASolver::updateStateBoundaryConditions().
Referenced by DASolver::validateStates().


| void writeSensMapSurface | ( | const word | name, |
| const double * | dFdXs, | ||
| const double * | Xs, | ||
| const label | size, | ||
| const double | timeName | ||
| ) |
write the sensitivity map for all wall surfaces
Definition at line 3435 of file DASolver.C.
References forAll(), DASolver::meshPtr_, and DASolver::runTimePtr_.

| void writeSensMapField | ( | const word | name, |
| const double * | dFdField, | ||
| const word | fieldType, | ||
| const double | timeName | ||
| ) |
write the sensitivity map for the entire field
Definition at line 3557 of file DASolver.C.
References forAll(), DASolver::meshPtr_, and DASolver::runTimePtr_.

|
inline |
get the latest time solution from the case folder.
Definition at line 754 of file DASolver.H.
References DASolver::runTimePtr_.
| void writeAdjointFields | ( | const word | function, |
| const double | writeTime, | ||
| const double * | psi | ||
| ) |
write the adjoint variables for all states
Definition at line 3650 of file DASolver.C.
References DASolver::daIndexPtr_, forAll(), DASolver::meshPtr_, psi, DASolver::runTimePtr_, and DASolver::stateInfo_.

|
protected |
all the arguments
Definition at line 66 of file DASolver.H.
|
protected |
all options in DAFoam
Definition at line 69 of file DASolver.H.
Referenced by DASolver::DASolver(), and DAIrkPimpleFoam::initSolver().
|
protected |
args pointer
Definition at line 72 of file DASolver.H.
Referenced by DATurboFoam::initSolver(), DARhoSimpleCFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), and DAIrkPimpleFoam::solvePrimal().
|
protected |
runTime pointer
Definition at line 75 of file DASolver.H.
Referenced by DASolver::calcAllFunctions(), DASolver::calcdRdWOldTPsiAD(), DASolver::calcdRdWT(), DASolver::calcJacTVecProduct(), DASolver::getElapsedClockTime(), DASolver::getElapsedCpuTime(), DASolver::getLatestTime(), DASolver::getRunTime(), DASolver::initDynamicMesh(), DAHeatTransferFoam::initSolver(), DASolidDisplacementFoam::initSolver(), DATurboFoam::initSolver(), DARhoSimpleCFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), DAPimpleFoam::initSolver(), DAPimpleDyMFoam::initSolver(), DASimpleFoam::initSolver(), DASolver::setDAFunctionList(), DASolver::setTime(), DAPimpleFoam::solveAdjointFP(), DASolver::updateInputFieldUnsteady(), DASolver::writeAdjointFields(), DASolver::writeAdjStates(), DASolver::writeAssociatedFields(), DASolver::writeFailedMesh(), DASolver::writeMeshPoints(), DASolver::writeSensMapField(), and DASolver::writeSensMapSurface().
|
protected |
fvMesh pointer
Definition at line 78 of file DASolver.H.
Referenced by DASolver::assignStateGradient2Vec(), DASolver::assignVec2ResidualGradient(), DASimpleFoam::calcAdjointResidual(), DASolver::calcCouplingFaceCoords(), DASolver::calcdRdWT(), DASolver::calcJacTVecProduct(), DASimpleFoam::calcLduResiduals(), DASolver::calcOutput(), DASolver::calcPCMatWithFvMatrix(), DASolver::calcPrimalResidualStatistics(), DAPimpleDyMFoam::DAPimpleDyMFoam(), DAPimpleFoam::DAPimpleFoam(), DASimpleFoam::DASimpleFoam(), DASolver::DASolver(), DASolver::deactivateStateVariableInput4AD(), DASolver::getDdtSchemeOrder(), DASolver::getInitStateVals(), DASolver::getInputDistributed(), DASolver::getInputSize(), DASolver::getMesh(), DASolver::getNLocalCells(), DASolver::getNLocalPoints(), DASolver::getOFField(), DASolver::getOFMeshPoints(), DASolver::getOutputDistributed(), DASolver::getOutputSize(), DASolver::initDynamicMesh(), DASolver::initInputFieldUnsteady(), DAHeatTransferFoam::initSolver(), DASolidDisplacementFoam::initSolver(), DATurboFoam::initSolver(), DARhoSimpleCFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), DAPimpleFoam::initSolver(), DAPimpleDyMFoam::initSolver(), DASimpleFoam::initSolver(), DAIrkPimpleFoam::initSolver(), DASimpleFoam::L2norm(), DASolver::meanStatesToStates(), DASolver::normalizeGradientVec(), DASolver::normalizeJacTVecProduct(), DASolver::readMeshPoints(), DASolver::readStateVars(), DASolver::registerResidualOutput4AD(), DASolver::registerStateVariableInput4AD(), DASolver::resetStateVals(), DASolver::runColoring(), DASimpleFoam::runFPAdj(), DASolver::setDAFunctionList(), DASolver::setSolverInput(), DAPimpleFoam::solveAdjointFP(), DASolver::updateBoundaryConditions(), DASolver::updateInputFieldUnsteady(), DASolver::validateStates(), DASimpleFoam::vec2Fields(), DASolver::writeAdjointFields(), DASolver::writeAdjStates(), DASolver::writeAssociatedFields(), DASolver::writeMeshPoints(), DASolver::writeSensMapField(), and DASolver::writeSensMapSurface().
|
protected |
DAOption pointer.
Definition at line 81 of file DASolver.H.
Referenced by DASolver::calcAllFunctions(), DASolver::calcCouplingFaceCoords(), DASolver::calcdRdWT(), DASolver::calcJacTVecProduct(), DASolver::calcOutput(), DASolver::calcPCMatWithFvMatrix(), DASolver::checkPrimalFailure(), DASolver::DASolver(), DASolver::getDAOption(), DASolver::getdFScaling(), DASolver::getInputDistributed(), DASolver::getInputSize(), DASolver::getOutputDistributed(), DASolver::getOutputSize(), DASolver::getTimeOpFuncVal(), DASolver::hasVolCoordInput(), DASolver::initializedRdWTMatrixFree(), DASolver::initInputFieldUnsteady(), DAHeatTransferFoam::initSolver(), DATurboFoam::initSolver(), DARhoSimpleCFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), DAPimpleFoam::initSolver(), DAPimpleDyMFoam::initSolver(), DASimpleFoam::initSolver(), DAIrkPimpleFoam::initSolver(), DASolver::normalizeGradientVec(), DASolver::normalizeJacTVecProduct(), DASolver::printAllOptions(), DASolver::reduceStateResConLevel(), DASolver::runColoring(), DASimpleFoam::runFPAdj(), DASolver::setDAFunctionList(), DASolver::setPrimalBoundaryConditions(), DASolver::setSolverInput(), DAPimpleFoam::solveAdjointFP(), DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), DAPimpleDyMFoam::solvePrimal(), DASolver::updateDAOption(), DASolver::updateInputFieldUnsteady(), DASolver::updateOFFields(), DASolver::updateOFMesh(), DASolver::updateStateBoundaryConditions(), and DASolver::writeFailedMesh().
|
protected |
DAModel pointer.
Definition at line 84 of file DASolver.H.
Referenced by DASolver::calcdRdWT(), DASolver::calcJacTVecProduct(), DASolver::calcOutput(), DASolver::calcPCMatWithFvMatrix(), DASolver::calcResiduals(), DASolver::getDAModel(), DASolver::getInputDistributed(), DASolver::getInputSize(), DASolver::getOutputDistributed(), DASolver::getOutputSize(), DAHeatTransferFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), DAPimpleFoam::initSolver(), DAPimpleDyMFoam::initSolver(), DASimpleFoam::initSolver(), DASolver::runColoring(), DASolver::setDAFunctionList(), DASolver::setSolverInput(), DAPimpleFoam::solveAdjointFP(), and DASolver::updateStateBoundaryConditions().
|
protected |
DAIndex pointer.
Definition at line 87 of file DASolver.H.
Referenced by DASolver::assignStateGradient2Vec(), DASolver::assignVec2ResidualGradient(), DAPimpleFoam::calcAdjointResiduals(), DASolver::calcdRdWT(), DASolver::calcJacTVecProduct(), DASolver::calcOutput(), DASolver::calcPCMatWithFvMatrix(), DASolver::getDAIndex(), DASolver::getGlobalXvIndex(), DASolver::getInitStateVals(), DASolver::getInputDistributed(), DASolver::getInputSize(), DASolver::getNLocalAdjointBoundaryStates(), DASolver::getNLocalAdjointStates(), DASolver::getOutputDistributed(), DASolver::getOutputSize(), DASolver::initializedRdWTMatrixFree(), DAHeatTransferFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), DAPimpleFoam::initSolver(), DAPimpleDyMFoam::initSolver(), DASimpleFoam::initSolver(), DASolver::meanStatesToStates(), DASolver::normalizeGradientVec(), DASolver::normalizeJacTVecProduct(), DASolver::runColoring(), DASolver::setDAFunctionList(), DASolver::setSolverInput(), DAPimpleFoam::solveAdjointFP(), DASimpleFoam::vec2Fields(), and DASolver::writeAdjointFields().
|
protected |
DAField pointer.
Definition at line 90 of file DASolver.H.
Referenced by DASolver::calcdRdWT(), DASolver::getDAField(), DASolver::getOFFields(), DASolver::setPrimalBoundaryConditions(), DASolver::updateOFFields(), and DASolver::updateOFMesh().
|
protected |
a list of DAFunction pointers
Definition at line 93 of file DASolver.H.
Referenced by DASolver::calcAllFunctions(), DASolver::calcJacTVecProduct(), DASolver::calcOutput(), DASolver::getdFScaling(), DASolver::getFunctionListIndex(), DASolver::getOutputDistributed(), DASolver::getOutputSize(), DASolver::getTimeOpFuncVal(), and DASolver::setDAFunctionList().
|
protected |
a list of DATimeOp pointers
Definition at line 96 of file DASolver.H.
Referenced by DASolver::calcAllFunctions(), DASolver::getdFScaling(), DASolver::getTimeOpFuncVal(), and DASolver::setDAFunctionList().
|
protected |
DACheckMesh object pointer.
Definition at line 99 of file DASolver.H.
Referenced by DASolver::checkMesh(), and DASolver::getDACheckMesh().
|
protected |
DALinearEqn pointer.
Definition at line 102 of file DASolver.H.
Referenced by DASolver::createMLRKSPMatrixFree(), DASolver::getDALinearEqn(), and DASolver::solveLinearEqn().
|
protected |
DAResidual pointer.
Definition at line 105 of file DASolver.H.
Referenced by DASolver::calcdRdWT(), DASolver::calcJacTVecProduct(), DASolver::calcOutput(), DASolver::calcPCMatWithFvMatrix(), DASolver::calcResiduals(), DASolver::getDAResidual(), DASolver::getOutputDistributed(), DASolver::getOutputSize(), and DASolver::updateStateBoundaryConditions().
|
protected |
DAStateInfo pointer.
Definition at line 108 of file DASolver.H.
Referenced by DASolver::calcdRdWT(), DASolver::getDAStateInfo(), and DASolver::runColoring().
|
protected |
DARegression pointer.
Definition at line 111 of file DASolver.H.
Referenced by DASolver::getNRegressionParameters(), DASolver::getRegressionParameter(), DASolver::loop(), DASolver::regressionModelCompute(), DASolver::setRegressionParameter(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoPimpleFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), DAPimpleDyMFoam::solvePrimal(), and DASimpleFoam::solvePrimal().
|
protected |
DAGlobalVar pointer.
Definition at line 114 of file DASolver.H.
Referenced by DASolver::checkPrimalFailure(), DASolver::loop(), DAHeatTransferFoam::solvePrimal(), and DASolidDisplacementFoam::solvePrimal().
|
protected |
the initial points for dynamicMesh without volCoord inputs
Definition at line 117 of file DASolver.H.
Referenced by DASolver::DASolver(), and DASolver::initDynamicMesh().
|
protected |
the stateInfo_ list from DAStateInfo object
Definition at line 120 of file DASolver.H.
Referenced by DASolver::assignStateGradient2Vec(), DASolver::assignVec2ResidualGradient(), DASolver::calcPCMatWithFvMatrix(), DASolver::calcPrimalResidualStatistics(), DASolver::deactivateStateVariableInput4AD(), DASolver::getInitStateVals(), DASolver::meanStatesToStates(), DASolver::normalizeGradientVec(), DASolver::normalizeJacTVecProduct(), DASolver::readStateVars(), DASolver::registerResidualOutput4AD(), DASolver::registerStateVariableInput4AD(), DASolver::resetStateVals(), DAPimpleFoam::solveAdjointFP(), DASolver::validateStates(), DASolver::writeAdjointFields(), and DASolver::writeAdjStates().
|
protected |
the solution time for the previous primal solution
Definition at line 123 of file DASolver.H.
Referenced by DASolver::getPrevPrimalSolTime(), and DASolver::loop().
|
protected |
matrix-free dRdWT matrix used in GMRES solution
Definition at line 141 of file DASolver.H.
Referenced by DASolver::createMLRKSPMatrixFree(), DASolver::destroydRdWTMatrixFree(), DASolver::initializedRdWTMatrixFree(), and DASolver::updateKSPPCMat().
|
protected |
a flag in dRdWTMatVecMultFunction to determine if the global tap is initialized
Definition at line 144 of file DASolver.H.
Referenced by DASolver::solveLinearEqn().
|
protected |
primal residual tolerance
Definition at line 147 of file DASolver.H.
Referenced by DASolver::checkPrimalFailure(), DASolver::DASolver(), and DASolver::loop().
|
protected |
whether to print primal information to the screen
Definition at line 150 of file DASolver.H.
Referenced by DASolver::loop(), DAHeatTransferFoam::solvePrimal(), DASolidDisplacementFoam::solvePrimal(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoPimpleFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), DAPimpleDyMFoam::solvePrimal(), and DASimpleFoam::solvePrimal().
|
protected |
whether the regModel compute fails
Definition at line 153 of file DASolver.H.
Referenced by DASolver::checkPrimalFailure(), DATurboFoam::solvePrimal(), DARhoSimpleCFoam::solvePrimal(), DARhoSimpleFoam::solvePrimal(), and DASimpleFoam::solvePrimal().
|
protected |
how frequent do you want to print the primal info default is every 100 steps
Definition at line 156 of file DASolver.H.
Referenced by DASolver::DASolver(), and DASolver::loop().
|
protected |
primal min number of iterations
Definition at line 159 of file DASolver.H.
Referenced by DASolver::DASolver(), and DASolver::loop().
|
protected |
how frequent do you want to print the primal info default is every 100 steps
Definition at line 162 of file DASolver.H.
Referenced by DASolver::DASolver(), DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), and DAPimpleDyMFoam::solvePrimal().
|
protected |
a list list that saves the function value for all time steps
Definition at line 165 of file DASolver.H.
Referenced by DASolver::calcAllFunctions(), DASolver::getdFScaling(), DASolver::getTimeOpFuncVal(), and DASolver::setDAFunctionList().
|
protected |
the final time index from the primal solve. for steady state cases it can converge before endTime
Definition at line 168 of file DASolver.H.
Referenced by DASolver::getdFScaling(), DASolver::getTimeOpFuncVal(), DASolver::loop(), DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), and DAPimpleDyMFoam::solvePrimal().
|
protected |
initial values for validateStates
Definition at line 171 of file DASolver.H.
Referenced by DASolver::resetStateVals().