Go to the documentation of this file.
14 #include "runTimeSelectionTables.H"
15 #include "fvOptions.H"
21 #include "syncTools.H"
118 const label connectedLevelLocal,
119 const wordList connectedStatesLocal,
120 const List<List<word>> connectedStateInterProc,
121 const label addFace);
126 const label idx)
const;
136 Mat* stateBoundaryCon,
137 Mat* stateBoundaryConTmp);
144 const word stateName,
145 const PetscScalar val);
152 const word stateName,
153 const PetscScalar val);
160 const word stateName,
161 const PetscScalar val);
169 const List<List<word>> connectedStates,
170 const label addFaces);
197 const word stateName,
199 const label comp = -1);
209 Vec preallocOffProcT,
216 const Vec preallocOnProc,
217 const Vec preallocOffProc)
const;
220 const HashTable<List<List<word>>>& stateResConInfo,
221 const label isPrealloc);
226 const word modelType,
260 const label transposed)
const;
280 Vec coloredColumn)
const;
const word modelType_
the name of the jacCon matrix
void initializeJacCon(const dictionary &options)
initialize the state Jacobian connectivity matrix
DAColoring daColoring_
DAColoring object.
void setPIVVec(Vec iSPIV, const label idxI)
function used to add connectivity for pressureInletVelocity
void checkSpecialBCs()
check if there is special boundary conditions that need special treatment in jacCon_
void calcColoredColumns(const label colorI, Vec coloredColumn) const
calculate the colored column vector
const fvMesh & mesh_
fvMesh
Mat jacCon_
Jacobian connectivity mat.
const DAOption & daOption_
DAOption object.
void clearDAJacConMembers()
clear members in DAJacCon
label addPhi4PIV(const word stateName, const label idxI, const label comp=-1)
add connectivity phi for pressureInletVelocity
void setupStateBoundaryConID(Mat *stateBoundaryConID)
calculate DAJacCon::stateBoundaryConID_
void setupJacCon(const dictionary &options)
assign 1 to all non-zero elements for the Jacobian connecitivyt matrix
Vec getJacConColor() const
return DAJacCon::jacConColors_
void combineStateBndCon(Mat *stateBoundaryCon, Mat *stateBoundaryConTmp)
combine stateBoundaryCon and stateBoundaryConTmp, this is to ensure including all connected states fo...
label getLocalCoupledBFaceIndex(const label localFaceI) const
given a local face index, return the local index of the coupled boundary face
label getNJacConColors() const
get the number of JacCon colors
const DAModel & daModel_
DAModel object.
void initializeStateBoundaryCon()
initialize state boundary connection
void setupJacobianConnections(Mat conMat, Mat connections, const label idxI)
assign values in connections to a specific row idxI in conMat
void calcNeiBFaceGlobalCompact(labelList &neiBFaceGlobalCompact)
calculate DAJacCon::neiBFaceGlobalCompact_
void clear()
clear members in parent and child objects
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 c...
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 g...
void allocateJacobianConnections(Vec preallocOnProc, Vec preallocOffProc, Vec preallocOnProcT, Vec preallocOffProcT, Mat connections, const label row)
compute preallocation vectors
void preallocatedRdW(Mat dRMat, const label transposed) const
preallocate dRdW matrix using the preallocVec
Vec isPIVBCState_
a vector to show whether a state is connected to a pressureInletVelocity boundary face (3 level max)
Mat stateBoundaryCon_
matrix to store boundary connectivity levels for state Jacobians
DAField daField_
DAField object.
const DAIndex & daIndex_
DAIndex object.
label coloringExists(const word postFix="") const
whether the coloring file exists
void setupStateBoundaryCon(Mat *stateBoundaryCon)
calculate DAJacCon::stateBoundaryCon_
label nJacConColors_
number of jacCon colors
labelList neiBFaceGlobalCompact_
neibough face global index for a given local boundary face
void createConnectionMat(Mat *connectedStates)
allocate connectedState matrix
void setupJacConPreallocation(const dictionary &options)
calculate the preallocation vector for initializing the JacCon mat, if necessary
void setConnections(Mat conMat, const label idx) const
add value 1 for the colume idx to conMat
void calcJacConColoring(const word postFix="")
compute graph coloring for Jacobian connectivity matrix
Mat stateBoundaryConID_
matrix to store boundary connectivity ID for state Jacobians
void preallocateJacobianMatrix(Mat dRMat, const Vec preallocOnProc, const Vec preallocOffProc) const
compute preallocation vectors
Vec jacConColors_
jacCon matrix colors
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
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 inde...
void setupdRdWCon(const HashTable< List< List< word >>> &stateResConInfo, const label isPrealloc)
void readJacConColoring(const word postFix="")
read colors for JacCon
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
HashTable< wordList > stateInfo_
the regState_ list from DAStateInfo object
void initializePetscVecs()
initialize petsc vectors