Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DAJacCondFdW Class Reference
Inheritance diagram for DAJacCondFdW:
Inheritance graph
[legend]
Collaboration diagram for DAJacCondFdW:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("dFdW")
 
 DAJacCondFdW (const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
 
virtual ~DAJacCondFdW ()
 
virtual void initializeJacCon (const dictionary &options)
 
virtual void setupJacCon (const dictionary &options)
 assign 1 to all non-zero elements for the Jacobian connecitivyt matrix More...
 
virtual void setObjFuncVec (scalarList objFuncFaceValues, scalarList objFuncCellValues, Vec objFuncVec) const
 assign values for the objective function vector based on the face and cell value lists More...
 
virtual void clear ()
 clear members in parent and child objects More...
 
- Public Member Functions inherited from DAJacCon
 TypeName ("DAJacCon")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, DAJacCon, dictionary,(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex),(modelType, mesh, daOption, daModel, daIndex))
 
 DAJacCon (const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
 
virtual ~DAJacCon ()
 
virtual void setupJacConPreallocation (const dictionary &options)
 calculate the preallocation vector for initializing the JacCon mat, if necessary More...
 
label getNJacConColors () const
 get the number of JacCon colors More...
 
virtual void preallocatedRdW (Mat dRMat, const label transposed) const
 preallocate dRdW matrix using the preallocVec More...
 
void calcJacConColoring (const word postFix="")
 compute graph coloring for Jacobian connectivity matrix More...
 
void readJacConColoring (const word postFix="")
 read colors for JacCon More...
 
label coloringExists (const word postFix="") const
 whether the coloring file exists More...
 
Vec getJacConColor () const
 return DAJacCon::jacConColors_ More...
 
void calcColoredColumns (const label colorI, Vec coloredColumn) const
 calculate the colored column vector More...
 

Protected Member Functions

void initializePetscVecs ()
 initialize petsc vectors More...
 
label getLocalObjFuncGeoIndex (const word idxType, const label idxI) const
 get the local index of geometry element for objective More...
 
label getGlobalObjFuncGeoIndex (const word idxType, const label idxI) const
 get the global index of geometry element for objective More...
 
- Protected Member Functions inherited from DAJacCon
void initializeStateBoundaryCon ()
 initialize state boundary connection More...
 
void calcNeiBFaceGlobalCompact (labelList &neiBFaceGlobalCompact)
 calculate DAJacCon::neiBFaceGlobalCompact_ More...
 
label getLocalCoupledBFaceIndex (const label localFaceI) const
 given a local face index, return the local index of the coupled boundary face More...
 
void setupStateBoundaryCon (Mat *stateBoundaryCon)
 calculate DAJacCon::stateBoundaryCon_ More...
 
void setupStateBoundaryConID (Mat *stateBoundaryConID)
 calculate DAJacCon::stateBoundaryConID_ More...
 
void createConnectionMat (Mat *connectedStates)
 allocate connectedState matrix More...
 
void addStateConnections (Mat connections, const label cellI, const label connectedLevelLocal, const wordList connectedStatesLocal, const List< List< word >> connectedStateInterProc, const label addFace)
 a high-level function to add connected state column indices to the connectivity matrix More...
 
void setConnections (Mat conMat, const label idx) const
 add value 1 for the colume idx to conMat More...
 
void setupJacobianConnections (Mat conMat, Mat connections, const label idxI)
 assign values in connections to a specific row idxI in conMat More...
 
void combineStateBndCon (Mat *stateBoundaryCon, Mat *stateBoundaryConTmp)
 combine stateBoundaryCon and stateBoundaryConTmp, this is to ensure including all connected states for parallel cases More...
 
void addConMatCell (Mat conMat, const label gRow, const label cellI, const word stateName, const PetscScalar val)
 add val to the gRow row in conMat, the column indice are the state (given by stateName) for a given cellI More...
 
void addConMatNeighbourCells (Mat conMat, const label gRow, const label cellI, const word stateName, const PetscScalar val)
 add val to gRow row in conMat, column indice are the neighbouring states (given by stateName) for a given cellI More...
 
void addConMatCellFaces (Mat conMat, const label gRow, const label cellI, const word stateName, const PetscScalar val)
 add val to gRow row in conMat, column indice are the faces (given by stateName) for a given cellI More...
 
void addBoundaryFaceConnections (Mat conMat, const label gRow, const label cellI, const labelList v, const List< List< word >> connectedStates, const label addFaces)
 add the column index of the (iner-proc) connected states and faces to conMat, given a local face index More...
 
void clearDAJacConMembers ()
 clear members in DAJacCon More...
 
void checkSpecialBCs ()
 check if there is special boundary conditions that need special treatment in jacCon_ More...
 
void setPIVVec (Vec iSPIV, const label idxI)
 function used to add connectivity for pressureInletVelocity More...
 
label addPhi4PIV (const word stateName, const label idxI, const label comp=-1)
 add connectivity phi for pressureInletVelocity More...
 

Protected Attributes

globalIndex globalObjFuncGeoNumbering_
 the global numbering for the discrete source of objective function More...
 
label objFuncFaceSize_ = 0
 the size of objFunc faces More...
 
label objFuncCellSize_ = 0
 the size of objFunc cells More...
 
- Protected Attributes inherited from DAJacCon
const word modelType_
 the name of the jacCon matrix More...
 
const fvMesh & mesh_
 fvMesh More...
 
const DAOptiondaOption_
 DAOption object. More...
 
const DAModeldaModel_
 DAModel object. More...
 
const DAIndexdaIndex_
 DAIndex object. More...
 
DAColoring daColoring_
 DAColoring object. More...
 
DAField daField_
 DAField object. More...
 
HashTable< wordList > stateInfo_
 the regState_ list from DAStateInfo object More...
 
Mat stateBoundaryCon_
 matrix to store boundary connectivity levels for state Jacobians More...
 
Mat stateBoundaryConID_
 matrix to store boundary connectivity ID for state Jacobians More...
 
labelList neiBFaceGlobalCompact_
 neibough face global index for a given local boundary face More...
 
Mat jacCon_
 Jacobian connectivity mat. More...
 
Vec jacConColors_
 jacCon matrix colors More...
 
label nJacConColors_
 number of jacCon colors More...
 
Vec isPIVBCState_
 a vector to show whether a state is connected to a pressureInletVelocity boundary face (3 level max) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DAJacCon
static autoPtr< DAJacConNew (const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
 

Detailed Description

Definition at line 26 of file DAJacCondFdW.H.

Constructor & Destructor Documentation

◆ DAJacCondFdW()

DAJacCondFdW ( const word  modelType,
const fvMesh &  mesh,
const DAOption daOption,
const DAModel daModel,
const DAIndex daIndex 
)

Definition at line 19 of file DAJacCondFdW.C.

References DAJacCondFdW::initializePetscVecs(), and DAJacCon::initializeStateBoundaryCon().

Here is the call graph for this function:

◆ ~DAJacCondFdW()

virtual ~DAJacCondFdW ( )
inlinevirtual

Definition at line 66 of file DAJacCondFdW.H.

Member Function Documentation

◆ initializePetscVecs()

void initializePetscVecs ( )
protected

initialize petsc vectors

Definition at line 47 of file DAJacCondFdW.C.

References DAJacCon::daIndex_, DAJacCon::jacConColors_, and DAIndex::nLocalAdjointStates.

Referenced by DAJacCondFdW::DAJacCondFdW().

Here is the caller graph for this function:

◆ getLocalObjFuncGeoIndex()

label getLocalObjFuncGeoIndex ( const word  idxType,
const label  idxI 
) const
protected

get the local index of geometry element for objective

Definition at line 320 of file DAJacCondFdW.C.

References DAJacCondFdW::objFuncFaceSize_.

Referenced by DAJacCondFdW::getGlobalObjFuncGeoIndex(), and DAJacCondFdW::setObjFuncVec().

Here is the caller graph for this function:

◆ getGlobalObjFuncGeoIndex()

label getGlobalObjFuncGeoIndex ( const word  idxType,
const label  idxI 
) const
protected

get the global index of geometry element for objective

Definition at line 372 of file DAJacCondFdW.C.

References DAJacCondFdW::getLocalObjFuncGeoIndex(), and DAJacCondFdW::globalObjFuncGeoNumbering_.

Referenced by DAJacCondFdW::setupJacCon().

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

◆ TypeName()

TypeName ( "dFdW"  )

◆ initializeJacCon()

void initializeJacCon ( const dictionary &  options)
virtual

calculate the initialize the state Jacobian connectivity matrix

Implements DAJacCon.

Definition at line 63 of file DAJacCondFdW.C.

References DAJacCon::daIndex_, DAUtility::genGlobalIndex(), DAJacCondFdW::globalObjFuncGeoNumbering_, DAJacCon::jacCon_, DAIndex::nLocalAdjointStates, DAJacCondFdW::objFuncCellSize_, and DAJacCondFdW::objFuncFaceSize_.

Here is the call graph for this function:

◆ setupJacCon()

void setupJacCon ( const dictionary &  options)
virtual

◆ setObjFuncVec()

void setObjFuncVec ( scalarList  objFuncFaceValues,
scalarList  objFuncCellValues,
Vec  objFuncVec 
) const
virtual

assign values for the objective function vector based on the face and cell value lists

Reimplemented from DAJacCon.

Definition at line 411 of file DAJacCondFdW.C.

References assignValueCheckAD, forAll(), and DAJacCondFdW::getLocalObjFuncGeoIndex().

Here is the call graph for this function:

◆ clear()

void clear ( )
virtual

clear members in parent and child objects

Implements DAJacCon.

Definition at line 35 of file DAJacCondFdW.C.

References DAJacCon::clearDAJacConMembers(), and DAJacCondFdW::globalObjFuncGeoNumbering_.

Here is the call graph for this function:

Member Data Documentation

◆ globalObjFuncGeoNumbering_

globalIndex globalObjFuncGeoNumbering_
protected

the global numbering for the discrete source of objective function

Definition at line 35 of file DAJacCondFdW.H.

Referenced by DAJacCondFdW::clear(), DAJacCondFdW::getGlobalObjFuncGeoIndex(), and DAJacCondFdW::initializeJacCon().

◆ objFuncFaceSize_

label objFuncFaceSize_ = 0
protected

the size of objFunc faces

Definition at line 48 of file DAJacCondFdW.H.

Referenced by DAJacCondFdW::getLocalObjFuncGeoIndex(), and DAJacCondFdW::initializeJacCon().

◆ objFuncCellSize_

label objFuncCellSize_ = 0
protected

the size of objFunc cells

Definition at line 51 of file DAJacCondFdW.H.

Referenced by DAJacCondFdW::initializeJacCon().


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