Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DASolver Class Referenceabstract
Inheritance diagram for DASolver:
Inheritance graph
[legend]

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 DAOptiongetDAOption ()
 get DAOption object More...
 
const DAStateInfogetDAStateInfo ()
 get DAStateInfo object More...
 
const DAIndexgetDAIndex ()
 get DAIndex object More...
 
const DAModelgetDAModel ()
 get DAModel object More...
 
const DAResidualgetDAResidual ()
 get DAResidual object More...
 
const DAFieldgetDAField ()
 get DAField object More...
 
const DALinearEqngetDALinearEqn ()
 get DALinearEqn object More...
 
const DACheckMeshgetDACheckMesh ()
 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< DASolverNew (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< DAOptiondaOptionPtr_
 DAOption pointer. More...
 
autoPtr< DAModeldaModelPtr_
 DAModel pointer. More...
 
autoPtr< DAIndexdaIndexPtr_
 DAIndex pointer. More...
 
autoPtr< DAFielddaFieldPtr_
 DAField pointer. More...
 
UPtrList< DAFunctiondaFunctionPtrList_
 a list of DAFunction pointers More...
 
UPtrList< DATimeOpdaTimeOpPtrList_
 a list of DATimeOp pointers More...
 
autoPtr< DACheckMeshdaCheckMeshPtr_
 DACheckMesh object pointer. More...
 
autoPtr< DALinearEqndaLinearEqnPtr_
 DALinearEqn pointer. More...
 
autoPtr< DAResidualdaResidualPtr_
 DAResidual pointer. More...
 
autoPtr< DAStateInfodaStateInfoPtr_
 DAStateInfo pointer. More...
 
autoPtr< DARegressiondaRegressionPtr_
 DARegression pointer. More...
 
autoPtr< DAGlobalVardaGlobalVarPtr_
 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...
 

Detailed Description

Definition at line 54 of file DASolver.H.

Constructor & Destructor Documentation

◆ DASolver()

DASolver ( char *  argsAll,
PyObject *  pyOptions 
)

◆ ~DASolver()

virtual ~DASolver ( )
inlinevirtual

Definition at line 201 of file DASolver.H.

Member Function Documentation

◆ isPrintTime()

label isPrintTime ( const Time &  runTime,
const label  printInterval 
) const
protected

Definition at line 2508 of file DASolver.C.

References runTime.

Referenced by DASolver::loop(), DARhoPimpleFoam::solvePrimal(), DAPimpleFoam::solvePrimal(), and DAPimpleDyMFoam::solvePrimal().

Here is the caller graph for this function:

◆ checkPrimalFailure()

label checkPrimalFailure ( )
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().

Here is the caller graph for this function:

◆ reduceStateResConLevel()

void reduceStateResConLevel ( const dictionary &  maxResConLv4JacPCMat,
HashTable< List< List< word >>> &  stateResConInfo 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeAssociatedFields()

void writeAssociatedFields ( )
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().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "DASolver"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
DASolver  ,
dictionary  ,
(char *argsAll, PyObject *pyOptions)  ,
(argsAll, pyOptions)   
)

◆ New()

autoPtr< DASolver > New ( char *  argsAll,
PyObject *  pyOptions 
)
static

Definition at line 104 of file DASolver.C.

References allOptions, and DAUtility::pyDict2OFDict().

Referenced by DASolvers::DASolvers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSolver()

virtual void initSolver ( )
pure virtual

◆ solvePrimal()

virtual label solvePrimal ( )
pure virtual

◆ runFPAdj()

label runFPAdj ( Vec  dFdW,
Vec  psi 
)
virtual

solve the adjoint equation using the fixed-point iteration method

Reimplemented in DASimpleFoam.

Definition at line 3208 of file DASolver.C.

◆ solveAdjointFP()

label solveAdjointFP ( Vec  dFdW,
Vec  psi 
)
virtual

solve the adjoint equation using the fixed-point iteration method

Reimplemented in DAPimpleFoam.

Definition at line 3224 of file DASolver.C.

◆ setTime()

void setTime ( scalar  time,
label  timeIndex 
)
inline

setTime for OF fields

Definition at line 224 of file DASolver.H.

References DASolver::runTimePtr_.

◆ getDdtSchemeOrder()

label getDdtSchemeOrder ( )
inline

get the ddtScheme order

Definition at line 230 of file DASolver.H.

References DASolver::meshPtr_.

Referenced by DASolver::initDynamicMesh().

Here is the caller graph for this function:

◆ printElapsedTime()

void printElapsedTime ( const Time &  runTime,
const label  printToScreen 
)
inline

◆ calcdRdWT()

void calcdRdWT ( const label  isPC,
Mat  dRdWT 
)

◆ updateKSPPCMat()

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_.

◆ solveLinearEqn()

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().

Here is the call graph for this function:

◆ updateOFFields()

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().

Here is the call graph for this function:

◆ updateOFMesh()

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().

Here is the caller graph for this function:

◆ getOFFields()

void getOFFields ( scalar *  states)
inline

assign the state variables from OpenFoam layer to the states array

Definition at line 289 of file DASolver.H.

References DASolver::daFieldPtr_.

◆ getOFField()

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_.

Here is the call graph for this function:

◆ getOFMeshPoints()

void getOFMeshPoints ( double *  points)

get the flatten mesh points coordinates

Definition at line 991 of file DASolver.C.

References assignValueCheckAD, forAll(), and DASolver::meshPtr_.

Here is the call graph for this function:

◆ getInputSize()

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().

Here is the call graph for this function:

◆ getOutputSize()

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().

Here is the call graph for this function:

◆ getInputDistributed()

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().

Here is the call graph for this function:

◆ getOutputDistributed()

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().

Here is the call graph for this function:

◆ calcOutput()

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().

Here is the call graph for this function:

◆ runColoring()

void runColoring ( )

◆ calcJacTVecProduct()

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().

Here is the call graph for this function:

◆ setSolverInput()

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().

Here is the call graph for this function:

◆ createMLRKSPMatrixFree()

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_.

◆ calcdRdWOldTPsiAD()

void calcdRdWOldTPsiAD ( const label  oldTimeLevel,
const double *  psi,
double *  dRdWOldTPsi 
)

◆ calcCouplingFaceCoords()

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().

Here is the call graph for this function:

◆ getCouplingPatchList()

void getCouplingPatchList ( wordList &  patchList,
word  groupName = "NONE" 
)

return the coupling patch list if any scenario is active on couplingInfo dict otherwise return design surface

◆ dRdWTMatVecMultFunction()

PetscErrorCode dRdWTMatVecMultFunction ( Mat  dRdWT,
Vec  vecX,
Vec  vecY 
)
static

matrix free matrix-vector product function to compute vecY=dRdWT*vecX

Definition at line 1119 of file DASolver.C.

Referenced by DASolver::initializedRdWTMatrixFree().

Here is the caller graph for this function:

◆ 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_.

Here is the call graph for this function:

◆ destroydRdWTMatrixFree()

void destroydRdWTMatrixFree ( )

destroy the matrix free dRdWT

Definition at line 1108 of file DASolver.C.

References DASolver::dRdWTMF_.

◆ registerStateVariableInput4AD()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deactivateStateVariableInput4AD()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerResidualOutput4AD()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignVec2ResidualGradient()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignStateGradient2Vec()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalizeGradientVec()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalizeJacTVecProduct()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeGlobalADTape4dRdWT()

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().

Here is the call graph for this function:

◆ hasVolCoordInput()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loop()

label loop ( Time &  runTime)

◆ updateInputFieldUnsteady()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initInputFieldUnsteady()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meanStatesToStates()

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().

Here is the call graph for this function:

◆ getGlobalXvIndex()

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

basically, we call DAIndex::getGlobalXvIndex

Definition at line 427 of file DASolver.H.

References DASolver::daIndexPtr_.

◆ writeMatrixBinary()

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

write the matrix in binary format

Definition at line 435 of file DASolver.H.

References DAUtility::writeMatrixBinary().

Here is the call graph for this function:

◆ writeMatrixASCII()

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

write the matrix in ASCII format

Definition at line 443 of file DASolver.H.

References DAUtility::writeMatrixASCII().

Here is the call graph for this function:

◆ readMatrixBinary()

void readMatrixBinary ( Mat  matIn,
const word  prefix 
)
inline

read petsc matrix in binary format

Definition at line 451 of file DASolver.H.

References DAUtility::readMatrixBinary().

Here is the call graph for this function:

◆ writeVectorASCII()

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

write petsc vector in ascii format

Definition at line 459 of file DASolver.H.

References DAUtility::writeVectorASCII().

Here is the call graph for this function:

◆ readVectorBinary()

void readVectorBinary ( Vec  vecIn,
const word  prefix 
)
inline

read petsc vector in binary format

Definition at line 467 of file DASolver.H.

References DAUtility::readVectorBinary().

Here is the call graph for this function:

◆ writeVectorBinary()

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

write petsc vector in binary format

Definition at line 475 of file DASolver.H.

References DAUtility::writeVectorBinary().

Here is the call graph for this function:

◆ getNLocalAdjointStates()

label getNLocalAdjointStates ( ) const
inline

return the number of local adjoint states

Definition at line 483 of file DASolver.H.

References DASolver::daIndexPtr_.

◆ getNLocalAdjointBoundaryStates()

label getNLocalAdjointBoundaryStates ( ) const
inline

return the number of local adjoint boundary states

Definition at line 489 of file DASolver.H.

References DASolver::daIndexPtr_.

◆ getNLocalCells()

label getNLocalCells ( ) const
inline

return the number of local cells

Definition at line 495 of file DASolver.H.

References DASolver::meshPtr_.

◆ getNLocalPoints()

label getNLocalPoints ( ) const
inline

return the number of local points

Definition at line 501 of file DASolver.H.

References DASolver::meshPtr_.

◆ setDAFunctionList()

void setDAFunctionList ( )

◆ calcAllFunctions()

void calcAllFunctions ( label  print = 0)

◆ getTimeOpFuncVal()

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_.

Here is the call graph for this function:

◆ getFunctionListIndex()

label getFunctionListIndex ( const word  functionName)
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().

Here is the call graph for this function:

◆ checkMesh()

label checkMesh ( ) const
inline

check the mesh quality and return meshOK

Definition at line 530 of file DASolver.H.

References DASolver::daCheckMeshPtr_.

◆ getdFScaling()

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_.

Here is the call graph for this function:

◆ printAllOptions()

void printAllOptions ( )
inline

print all DAOption

Definition at line 539 of file DASolver.H.

References DASolver::daOptionPtr_.

◆ calcPrimalResidualStatistics()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDAOption()

void updateDAOption ( PyObject *  pyOptions)
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__().

Here is the caller graph for this function:

◆ getPrevPrimalSolTime()

scalar getPrevPrimalSolTime ( )
inline

get the solution time folder for previous primal solution

Definition at line 557 of file DASolver.H.

References DASolver::prevPrimalSolTime_.

◆ updateBoundaryConditions()

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_.

◆ updateStateBoundaryConditions()

void updateStateBoundaryConditions ( )

◆ calcResiduals()

void calcResiduals ( label  isPC = 0)

◆ getMesh()

const fvMesh& getMesh ( )
inline

Accessing members return the mesh object

Definition at line 575 of file DASolver.H.

References DASolver::meshPtr_.

◆ getRunTime()

const Time& getRunTime ( )
inline

return the runTime object

Definition at line 581 of file DASolver.H.

References DASolver::runTimePtr_.

◆ getDAOption()

const DAOption& getDAOption ( )
inline

get DAOption object

Definition at line 587 of file DASolver.H.

References DASolver::daOptionPtr_.

◆ getDAStateInfo()

const DAStateInfo& getDAStateInfo ( )
inline

get DAStateInfo object

Definition at line 593 of file DASolver.H.

References DASolver::daStateInfoPtr_.

◆ getDAIndex()

const DAIndex& getDAIndex ( )
inline

get DAIndex object

Definition at line 599 of file DASolver.H.

References DASolver::daIndexPtr_.

◆ getDAModel()

const DAModel& getDAModel ( )
inline

get DAModel object

Definition at line 605 of file DASolver.H.

References DASolver::daModelPtr_.

◆ getDAResidual()

const DAResidual& getDAResidual ( )
inline

get DAResidual object

Definition at line 611 of file DASolver.H.

References DASolver::daResidualPtr_.

◆ getDAField()

const DAField& getDAField ( )
inline

get DAField object

Definition at line 617 of file DASolver.H.

References DASolver::daFieldPtr_.

◆ getDALinearEqn()

const DALinearEqn& getDALinearEqn ( )
inline

get DALinearEqn object

Definition at line 623 of file DASolver.H.

References DASolver::daLinearEqnPtr_.

◆ getDACheckMesh()

const DACheckMesh& getDACheckMesh ( )
inline

get DACheckMesh object

Definition at line 629 of file DASolver.H.

References DASolver::daCheckMeshPtr_.

◆ getNRegressionParameters()

label getNRegressionParameters ( word  modelName)
inline

get the number of regression model parameters

Definition at line 635 of file DASolver.H.

References DASolver::daRegressionPtr_.

◆ getRegressionParameter()

scalar getRegressionParameter ( word  modelName,
const label  idxI 
)
inline

get the regression parameter

Definition at line 641 of file DASolver.H.

References DASolver::daRegressionPtr_.

◆ setRegressionParameter()

void setRegressionParameter ( word  modelName,
const label  idxI,
scalar  val 
)
inline

set the regression parameter

Definition at line 647 of file DASolver.H.

References DASolver::daRegressionPtr_.

◆ regressionModelCompute()

void regressionModelCompute ( )
inline

call the compute method of the regression model

Definition at line 653 of file DASolver.H.

References DASolver::daRegressionPtr_.

Referenced by DASolver::updateStateBoundaryConditions().

Here is the caller graph for this function:

◆ setPrimalBoundaryConditions()

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_.

◆ writeFailedMesh()

void writeFailedMesh ( )

write the failed mesh to disk

Definition at line 3172 of file DASolver.C.

References DASolver::daOptionPtr_, and DASolver::runTimePtr_.

◆ readStateVars()

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().

Here is the call graph for this function:

◆ readMeshPoints()

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_.

◆ writeMeshPoints()

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_.

Here is the call graph for this function:

◆ calcPCMatWithFvMatrix()

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_.

Here is the call graph for this function:

◆ initTensorFlowFuncs()

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

◆ writeAdjStates()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getElapsedClockTime()

scalar getElapsedClockTime ( )
inline

return the elapsed clock time for testing speed

Definition at line 703 of file DASolver.H.

References DASolver::runTimePtr_.

◆ getElapsedCpuTime()

scalar getElapsedCpuTime ( )
inline

return the elapsed CPU time for testing speed

Definition at line 709 of file DASolver.H.

References DASolver::runTimePtr_.

◆ validateField()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateVectorField()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInitStateVals()

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_.

Here is the call graph for this function:

◆ resetStateVals()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeSensMapSurface()

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_.

Here is the call graph for this function:

◆ writeSensMapField()

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_.

Here is the call graph for this function:

◆ getLatestTime()

scalar getLatestTime ( )
inline

get the latest time solution from the case folder.

Definition at line 754 of file DASolver.H.

References DASolver::runTimePtr_.

◆ writeAdjointFields()

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_.

Here is the call graph for this function:

Member Data Documentation

◆ argsAll_

char* argsAll_
protected

all the arguments

Definition at line 66 of file DASolver.H.

◆ pyOptions_

PyObject* pyOptions_
protected

all options in DAFoam

Definition at line 69 of file DASolver.H.

Referenced by DASolver::DASolver(), and DAIrkPimpleFoam::initSolver().

◆ argsPtr_

autoPtr<argList> argsPtr_
protected

◆ runTimePtr_

autoPtr<Time> runTimePtr_
protected

◆ meshPtr_

autoPtr<fvMesh> meshPtr_
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().

◆ daOptionPtr_

autoPtr<DAOption> daOptionPtr_
protected

◆ daModelPtr_

autoPtr<DAModel> daModelPtr_
protected

◆ daIndexPtr_

autoPtr<DAIndex> daIndexPtr_
protected

◆ daFieldPtr_

autoPtr<DAField> daFieldPtr_
protected

◆ daFunctionPtrList_

UPtrList<DAFunction> daFunctionPtrList_
protected

◆ daTimeOpPtrList_

UPtrList<DATimeOp> daTimeOpPtrList_
protected

◆ daCheckMeshPtr_

autoPtr<DACheckMesh> daCheckMeshPtr_
protected

DACheckMesh object pointer.

Definition at line 99 of file DASolver.H.

Referenced by DASolver::checkMesh(), and DASolver::getDACheckMesh().

◆ daLinearEqnPtr_

autoPtr<DALinearEqn> daLinearEqnPtr_
protected

◆ daResidualPtr_

autoPtr<DAResidual> daResidualPtr_
protected

◆ daStateInfoPtr_

autoPtr<DAStateInfo> daStateInfoPtr_
protected

DAStateInfo pointer.

Definition at line 108 of file DASolver.H.

Referenced by DASolver::calcdRdWT(), DASolver::getDAStateInfo(), and DASolver::runColoring().

◆ daRegressionPtr_

autoPtr<DARegression> daRegressionPtr_
protected

◆ daGlobalVarPtr_

autoPtr<DAGlobalVar> daGlobalVarPtr_
protected

◆ points0Ptr_

autoPtr<pointField> points0Ptr_
protected

the initial points for dynamicMesh without volCoord inputs

Definition at line 117 of file DASolver.H.

Referenced by DASolver::DASolver(), and DASolver::initDynamicMesh().

◆ stateInfo_

HashTable<wordList> stateInfo_
protected

◆ prevPrimalSolTime_

scalar prevPrimalSolTime_ = -1e10
protected

the solution time for the previous primal solution

Definition at line 123 of file DASolver.H.

Referenced by DASolver::getPrevPrimalSolTime(), and DASolver::loop().

◆ dRdWTMF_

Mat dRdWTMF_
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().

◆ globalADTape4dRdWTInitialized

label globalADTape4dRdWTInitialized = 0
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().

◆ primalMinResTol_

scalar primalMinResTol_ = 0.0
protected

primal residual tolerance

Definition at line 147 of file DASolver.H.

Referenced by DASolver::checkPrimalFailure(), DASolver::DASolver(), and DASolver::loop().

◆ printToScreen_

label printToScreen_ = 0
protected

◆ regModelFail_

label regModelFail_ = 0
protected

◆ printInterval_

label printInterval_ = 100
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().

◆ primalMinIters_

label primalMinIters_ = -1
protected

primal min number of iterations

Definition at line 159 of file DASolver.H.

Referenced by DASolver::DASolver(), and DASolver::loop().

◆ printIntervalUnsteady_

label printIntervalUnsteady_ = 1
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().

◆ functionTimeSteps_

List<scalarList> functionTimeSteps_
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().

◆ primalFinalTimeIndex_

label primalFinalTimeIndex_
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().

◆ initStateVals_

HashTable<scalar> initStateVals_
protected

initial values for validateStates

Definition at line 171 of file DASolver.H.

Referenced by DASolver::resetStateVals().


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