Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
DAUtility Class Reference

Public Member Functions

 DAUtility ()
 Constructors. More...
 
virtual ~DAUtility ()
 Destructor. More...
 

Static Public Member Functions

static void pyDict2OFDict (PyObject *pyDict, dictionary &ofDict)
 convert a python dictionary object to OpenFoam dictionary More...
 
template<class classType >
static label isInList (const classType value, const List< classType > &list)
 check whether a value is in the list More...
 
template<class classType >
static label listReplaceVal (List< classType > &listIn, const classType valOrig, const classType valNew)
 replace a value in the list More...
 
template<class classType >
static label listDeleteVal (List< classType > &listIn, const classType valDel)
 delete a value in the list More...
 
static void writeMatrixBinary (const Mat matIn, const word prefix)
 write petsc matrix in binary format More...
 
static void writeMatrixASCII (const Mat matIn, const word prefix)
 write petsc matrix in ascii format More...
 
static void readMatrixBinary (Mat matIn, const word prefix)
 read petsc matrix in binary format More...
 
static void writeVectorASCII (const Vec vecIn, const word prefix)
 write petsc vector in ascii format More...
 
static void readVectorBinary (Vec vecIn, const word prefix)
 read petsc vector in binary format More...
 
static void writeVectorBinary (const Vec vecIn, const word prefix)
 write petsc vector in binary format More...
 
static void boundVar (const dictionary &allOptions, volScalarField &var, const label printToScreen)
 bound a volScalar variable based on parametes defined in DAOption::allOptions_ More...
 
static void boundVar (const dictionary &allOptions, volVectorField &var, const label printToScreen)
 bound a volVector variable based on parametes defined in DAOption::allOptions_ More...
 
static label isValueCloseToRef (const scalar val, const scalar refVal, const scalar tol=1.0e-6)
 check whether a value is close to a reference value by a tolerance More...
 
static globalIndex genGlobalIndex (const label localIndexSize)
 generate global index numbering for local-global index transferring More...
 

Static Public Attributes

static scalar angleOfAttackRadForwardAD = -9999.0
 angle of attack in radian used in forward mode AD More...
 
static void * pyCalcBeta = NULL
 define a function pointer template for Python call back More...
 
static pyComputeInterface pyCalcBetaInterface = NULL
 
static void * pyCalcBetaJacVecProd = NULL
 
static pyJacVecProdInterface pyCalcBetaJacVecProdInterface = NULL
 

Detailed Description

Definition at line 33 of file DAUtility.H.

Constructor & Destructor Documentation

◆ DAUtility()

DAUtility ( )

Constructors.

Definition at line 16 of file DAUtility.C.

◆ ~DAUtility()

~DAUtility ( )
virtual

Destructor.

Definition at line 20 of file DAUtility.C.

Member Function Documentation

◆ pyDict2OFDict()

void pyDict2OFDict ( PyObject *  pyDict,
dictionary &  ofDict 
)
static

convert a python dictionary object to OpenFoam dictionary

Definition at line 24 of file DAUtility.C.

Referenced by DAOption::DAOption(), DASolver::New(), and DAOption::updateDAOption().

Here is the caller graph for this function:

◆ isInList()

label isInList ( const classType  value,
const List< classType > &  list 
)
static

check whether a value is in the list

Definition at line 137 of file DAUtility.H.

References forAll().

Here is the call graph for this function:

◆ listReplaceVal()

label listReplaceVal ( List< classType > &  listIn,
const classType  valOrig,
const classType  valNew 
)
static

replace a value in the list

Definition at line 167 of file DAUtility.H.

References forAll().

Here is the call graph for this function:

◆ listDeleteVal()

label listDeleteVal ( List< classType > &  listIn,
const classType  valDel 
)
static

delete a value in the list

Definition at line 203 of file DAUtility.H.

References forAll().

Here is the call graph for this function:

◆ writeMatrixBinary()

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

◆ writeMatrixASCII()

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

write petsc matrix in ascii format

Definition at line 387 of file DAUtility.C.

Referenced by DASolver::calcdRdACT(), DASolver::calcdRdAOA(), DASolver::calcdRdBC(), DASolver::calcdRdFFD(), and DASolver::writeMatrixASCII().

Here is the caller graph for this function:

◆ readMatrixBinary()

void readMatrixBinary ( Mat  matIn,
const word  prefix 
)
static

read petsc matrix in binary format

Definition at line 322 of file DAUtility.C.

Referenced by DASolver::readMatrixBinary().

Here is the caller graph for this function:

◆ writeVectorASCII()

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

◆ readVectorBinary()

void readVectorBinary ( Vec  vecIn,
const word  prefix 
)
static

read petsc vector in binary format

Definition at line 226 of file DAUtility.C.

Referenced by DAJacCon::readJacConColoring(), and DASolver::readVectorBinary().

Here is the caller graph for this function:

◆ writeVectorBinary()

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

◆ boundVar() [1/2]

void boundVar ( const dictionary &  allOptions,
volScalarField &  var,
const label  printToScreen 
)
static

◆ boundVar() [2/2]

void boundVar ( const dictionary &  allOptions,
volVectorField &  var,
const label  printToScreen 
)
static

bound a volVector variable based on parametes defined in DAOption::allOptions_

Definition at line 506 of file DAUtility.C.

References allOptions, and forAll().

Here is the call graph for this function:

◆ isValueCloseToRef()

label isValueCloseToRef ( const scalar  val,
const scalar  refVal,
const scalar  tol = 1.0e-6 
)
static

check whether a value is close to a reference value by a tolerance

Definition at line 651 of file DAUtility.C.

Referenced by DAJacCon::addPhi4PIV(), DAJacCondRdW::allocateJacobianConnections(), DAJacCon::calcColoredColumns(), DAColoring::parallelD2Coloring(), DAJacCon::setupStateBoundaryConID(), and DAColoring::validateColoring().

Here is the caller graph for this function:

◆ genGlobalIndex()

globalIndex genGlobalIndex ( const label  localIndexSize)
static

generate global index numbering for local-global index transferring

Definition at line 599 of file DAUtility.C.

Referenced by DAJacCondFdW::initializeJacCon().

Here is the caller graph for this function:

Member Data Documentation

◆ angleOfAttackRadForwardAD

scalar angleOfAttackRadForwardAD = -9999.0
static

angle of attack in radian used in forward mode AD

Definition at line 126 of file DAUtility.H.

Referenced by DAObjFuncForce::updateForceDir().

◆ pyCalcBeta

void * pyCalcBeta = NULL
static

define a function pointer template for Python call back

Definition at line 129 of file DAUtility.H.

Referenced by DAkOmegaSSTFIML::calcBetaField(), and DASolver::initTensorFlowFuncs().

◆ pyCalcBetaInterface

pyComputeInterface pyCalcBetaInterface = NULL
static

Definition at line 130 of file DAUtility.H.

Referenced by DAkOmegaSSTFIML::calcBetaField(), and DASolver::initTensorFlowFuncs().

◆ pyCalcBetaJacVecProd

void * pyCalcBetaJacVecProd = NULL
static

Definition at line 132 of file DAUtility.H.

Referenced by DASolver::initTensorFlowFuncs().

◆ pyCalcBetaJacVecProdInterface

pyJacVecProdInterface pyCalcBetaJacVecProdInterface = NULL
static

Definition at line 133 of file DAUtility.H.

Referenced by DASolver::initTensorFlowFuncs().


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