Public Member Functions | |
DASolvers (char *argsAll, PyObject *pyOptions) | |
Construct from components. More... | |
virtual | ~DASolvers () |
Destructor. More... | |
void | initSolver () |
initialize fields and variables More... | |
label | solvePrimal () |
solve the primal equations More... | |
label | getInputSize (const word inputName, const word inputType) |
label | getOutputSize (const word outputName, const word outputType) |
void | calcOutput (const word outputName, const word outputType, double *output) |
label | getInputDistributed (const word inputName, const word inputType) |
label | getOutputDistributed (const word outputName, const word outputType) |
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 | runColoring () |
run the coloring solver More... | |
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... | |
void | createMLRKSPMatrixFree (const Mat jacPCMat, KSP ksp) |
create a multi-level, Richardson KSP object with matrix-free Jacobians More... | |
void | initializedRdWTMatrixFree () |
initialize matrix free dRdWT More... | |
void | destroydRdWTMatrixFree () |
destroy matrix free dRdWT More... | |
label | solveLinearEqn (const KSP ksp, const Vec rhsVec, Vec solVec) |
solve the linear equation More... | |
void | calcdRdWOldTPsiAD (const label oldTimeLevel, const double *psi, double *dRdWOldTPsi) |
compute dRdWOld^T*Psi More... | |
void | updateOFFields (const double *states) |
Update the OpenFOAM field values (including both internal and boundary fields) based on the states array. More... | |
void | getOFMeshPoints (double *points) |
get the flatten mesh points coordinates More... | |
void | getOFFields (double *states) |
Assign the OpenFOAM field values to the states array. More... | |
void | getOFField (const word fieldName, const word fieldType, double *field) |
get a field variable from OF layer More... | |
void | updateOFMesh (const double *volCoords) |
Update the OpenFoam mesh point coordinates based on the point vector xvVec. More... | |
label | getGlobalXvIndex (const label idxPoint, const label idxCoord) const |
basically, we call DAIndex::getGlobalXvIndex More... | |
label | checkMesh () const |
basically, we call DASolver::checkMesh More... | |
label | getNLocalPoints () const |
label | getNLocalAdjointStates () const |
return the number of local adjoint states More... | |
label | getNLocalAdjointBoundaryStates () const |
return the number of local adjoint boundary states More... | |
label | getNLocalCells () const |
return the number of local cells More... | |
double | getTimeOpFuncVal (const word functionName) |
return the value of objective based on timeOp More... | |
double | getdFScaling (const word functionName, const label timeIdx) |
get the scaling factor for dF/d? computation More... | |
void | calcCouplingFaceCoords (const double *volCoords, double *surfCoords) |
double | getElapsedClockTime () |
return the elapsed clock time for testing speed More... | |
double | getElapsedCpuTime () |
return the elapsed CPU time for testing speed More... | |
label | getNRegressionParameters (word modelName) |
get the number of regression model parameters More... | |
void | printAllOptions () |
call DASolver::printAllOptions More... | |
label | hasVolCoordInput () |
whether the volCoord input is defined More... | |
void | updateDAOption (PyObject *pyOptions) |
update the allOptions_ dict in DAOption based on the pyOptions from pyDAFoam More... | |
double | getPrevPrimalSolTime () |
get the solution time folder for previous primal solution More... | |
void | writeFailedMesh () |
void | readStateVars (scalar timeVal, label timeLevel=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) |
calculate the PC mat using fvMatrix More... | |
void | setTime (scalar time, label timeIndex) |
setTime for OF fields More... | |
label | getDdtSchemeOrder () |
get the ddtScheme order More... | |
double | getEndTime () |
return the endTime More... | |
double | getDeltaT () |
return the deltaT 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 | calcPrimalResidualStatistics (const word mode) |
Calculate the mean, max, and norm2 for all residuals and print it to screen. More... | |
void | setPrimalBoundaryConditions (const label printInfo=1) |
label | runFPAdj (Vec dFdW, Vec psi) |
label | solveAdjointFP (Vec dFdW, Vec psi) |
void | initTensorFlowFuncs (pyComputeInterface computeInterface, void *compute, pyJacVecProdInterface jacVecProdInterface, void *jacVecProd, pySetCharInterface setModelNameInterface, void *setModelName) |
initialize the call back function pointer More... | |
void | writeAdjointFields (const word function, const double writeTime, const double *psi) |
write the adjoint variables for all 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... | |
double | getLatestTime () |
get the latest solution time More... | |
void | meanStatesToStates () |
assign the mean states values to states More... | |
void | updateInputFieldUnsteady () |
assign the inputFieldUnsteady values to the OF field vars More... | |
Definition at line 27 of file DASolvers.H.
DASolvers | ( | char * | argsAll, |
PyObject * | pyOptions | ||
) |
Construct from components.
Definition at line 15 of file DASolvers.C.
References DASolver::New().
|
virtual |
Destructor.
Definition at line 25 of file DASolvers.C.
|
inline |
initialize fields and variables
Definition at line 58 of file DASolvers.H.
|
inline |
solve the primal equations
Definition at line 64 of file DASolvers.H.
|
inline |
Definition at line 69 of file DASolvers.H.
|
inline |
Definition at line 76 of file DASolvers.H.
|
inline |
Definition at line 83 of file DASolvers.H.
|
inline |
Definition at line 91 of file DASolvers.H.
|
inline |
Definition at line 98 of file DASolvers.H.
|
inline |
calculate the Jacobian-matrix-transposed and vector product for product = [dOutput/dInput]^T * seed
Definition at line 106 of file DASolvers.H.
|
inline |
Definition at line 125 of file DASolvers.H.
|
inline |
run the coloring solver
Definition at line 141 of file DASolvers.H.
|
inline |
compute dRdWT
Definition at line 147 of file DASolvers.H.
|
inline |
Update the preconditioner matrix for the ksp object.
Definition at line 155 of file DASolvers.H.
|
inline |
create a multi-level, Richardson KSP object with matrix-free Jacobians
Definition at line 163 of file DASolvers.H.
|
inline |
initialize matrix free dRdWT
Definition at line 171 of file DASolvers.H.
|
inline |
destroy matrix free dRdWT
Definition at line 177 of file DASolvers.H.
|
inline |
solve the linear equation
Definition at line 183 of file DASolvers.H.
|
inline |
|
inline |
Update the OpenFOAM field values (including both internal and boundary fields) based on the states array.
Definition at line 201 of file DASolvers.H.
References DASolvers::getNLocalAdjointStates().
|
inline |
get the flatten mesh points coordinates
Definition at line 218 of file DASolvers.H.
|
inline |
Assign the OpenFOAM field values to the states array.
Definition at line 224 of file DASolvers.H.
References DASolvers::getNLocalAdjointStates().
|
inline |
get a field variable from OF layer
Definition at line 241 of file DASolvers.H.
|
inline |
Update the OpenFoam mesh point coordinates based on the point vector xvVec.
Definition at line 250 of file DASolvers.H.
References DASolvers::getNLocalPoints().
|
inline |
basically, we call DAIndex::getGlobalXvIndex
Definition at line 267 of file DASolvers.H.
|
inline |
basically, we call DASolver::checkMesh
Definition at line 275 of file DASolvers.H.
|
inline |
Definition at line 281 of file DASolvers.H.
Referenced by DASolvers::updateOFMesh().
|
inline |
return the number of local adjoint states
Definition at line 287 of file DASolvers.H.
Referenced by DASolvers::getOFFields(), and DASolvers::updateOFFields().
|
inline |
return the number of local adjoint boundary states
Definition at line 293 of file DASolvers.H.
|
inline |
return the number of local cells
Definition at line 299 of file DASolvers.H.
|
inline |
return the value of objective based on timeOp
Definition at line 305 of file DASolvers.H.
|
inline |
get the scaling factor for dF/d? computation
Definition at line 311 of file DASolvers.H.
References assignValueCheckAD.
|
inline |
Definition at line 318 of file DASolvers.H.
|
inline |
return the elapsed clock time for testing speed
Definition at line 331 of file DASolvers.H.
References assignValueCheckAD.
|
inline |
return the elapsed CPU time for testing speed
Definition at line 339 of file DASolvers.H.
References assignValueCheckAD.
|
inline |
get the number of regression model parameters
Definition at line 347 of file DASolvers.H.
|
inline |
call DASolver::printAllOptions
Definition at line 353 of file DASolvers.H.
|
inline |
whether the volCoord input is defined
Definition at line 359 of file DASolvers.H.
|
inline |
update the allOptions_ dict in DAOption based on the pyOptions from pyDAFoam
Definition at line 365 of file DASolvers.H.
Referenced by PYDAFOAM::__call__().
|
inline |
get the solution time folder for previous primal solution
Definition at line 371 of file DASolvers.H.
References assignValueCheckAD.
|
inline |
Definition at line 378 of file DASolvers.H.
|
inline |
read the state variables from the disk and assign the value to the prescribe time level
Definition at line 384 of file DASolvers.H.
|
inline |
read the mesh points from the disk and run movePoints to deform the mesh
Definition at line 392 of file DASolvers.H.
|
inline |
write the mesh points to the disk for the given timeVal
Definition at line 398 of file DASolvers.H.
|
inline |
calculate the PC mat using fvMatrix
Definition at line 404 of file DASolvers.H.
|
inline |
setTime for OF fields
Definition at line 410 of file DASolvers.H.
|
inline |
get the ddtScheme order
Definition at line 416 of file DASolvers.H.
|
inline |
return the endTime
Definition at line 422 of file DASolvers.H.
|
inline |
return the deltaT
Definition at line 432 of file DASolvers.H.
|
inline |
update the boundary condition for a field
Definition at line 442 of file DASolvers.H.
|
inline |
update the boundary conditions for all states and intermediate variables
Definition at line 450 of file DASolvers.H.
|
inline |
Calculate the mean, max, and norm2 for all residuals and print it to screen.
Definition at line 456 of file DASolvers.H.
References dafoam_plot3dtransform::mode.
|
inline |
Definition at line 461 of file DASolvers.H.
|
inline |
Definition at line 466 of file DASolvers.H.
References psi.
|
inline |
Definition at line 473 of file DASolvers.H.
References psi.
|
inline |
initialize the call back function pointer
Definition at line 481 of file DASolvers.H.
|
inline |
write the adjoint variables for all states
Definition at line 494 of file DASolvers.H.
References psi.
|
inline |
write the sensitivity map for all wall surfaces
Definition at line 503 of file DASolvers.H.
|
inline |
write the sensitivity map for the entire field
Definition at line 514 of file DASolvers.H.
|
inline |
get the latest solution time
Definition at line 524 of file DASolvers.H.
|
inline |
assign the mean states values to states
Definition at line 537 of file DASolvers.H.
|
inline |
assign the inputFieldUnsteady values to the OF field vars
Definition at line 543 of file DASolvers.H.