Public Member Functions | |
DAField (const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex) | |
Constructors. More... | |
virtual | ~DAField () |
Destructor. More... | |
void | ofField2StateVec (Vec stateVec) const |
set the state vector based on the latest fields in OpenFOAM More... | |
void | stateVec2OFField (const Vec stateVec) const |
assign the fields in OpenFOAM based on the state vector More... | |
void | state2OFField (const scalar *states) const |
assign the fields in OpenFOAM based on the state array More... | |
void | pointVec2OFMesh (const Vec xvVec) const |
assign the points in fvMesh of OpenFOAM based on the point vector More... | |
void | point2OFMesh (const scalar *volCoords) const |
assign the points in fvMesh of OpenFOAM based on the point array More... | |
void | resetOFSeeds () |
reset the seeds for both state and mesh variables in OpenFOAM by setting their gradient() to zeros More... | |
void | ofMesh2PointVec (Vec xvVec) const |
assign the point vector based on the points in fvMesh of OpenFOAM More... | |
void | resVec2OFResField (const Vec resVec) const |
assign the residual field in OpenFOAM based on the residual vector More... | |
void | ofResField2ResVec (Vec resVec) const |
assign the residual vector based on the residual field in OpenFOAM More... | |
void | ofField2List (scalarList &stateList, scalarList &stateBoundaryList) const |
set the scalar list of states based on the latest fields in OpenFOAM More... | |
void | list2OFField (const scalarList &stateList, const scalarList &stateBounaryList, const label oldTimeLevel) const |
assign the fields in OpenFOAM based on the scalar list of states More... | |
void | setPrimalBoundaryConditions (const label printInfo=1) |
set the boundary conditions based on parameters defined in DAOption More... | |
void | specialBCTreatment () |
apply special treatment for boundary conditions More... | |
void | checkSpecialBCs () |
check if we need to do special treatment for boundary conditions More... | |
Public Attributes | |
wordList | specialBCs |
a list that contains the names of detected special boundary conditions More... | |
Protected Attributes | |
const fvMesh & | mesh_ |
Foam::fvMesh object. More... | |
const DAOption & | daOption_ |
Foam::DAOption object. More... | |
const DAModel & | daModel_ |
DAModel object. More... | |
const DAIndex & | daIndex_ |
DAIndex object. More... | |
HashTable< wordList > | stateInfo_ |
the StateInfo_ list from DAStateInfo object More... | |
DAField | ( | const fvMesh & | mesh, |
const DAOption & | daOption, | ||
const DAModel & | daModel, | ||
const DAIndex & | daIndex | ||
) |
Constructors.
Definition at line 17 of file DAField.C.
References DAField::checkSpecialBCs(), daModel(), daOption(), mesh, DAStateInfo::New(), solverName, and DAField::stateInfo_.
void ofField2StateVec | ( | Vec | stateVec | ) | const |
set the state vector based on the latest fields in OpenFOAM
Definition at line 198 of file DAField.C.
References assignValueCheckAD, DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void stateVec2OFField | ( | const Vec | stateVec | ) | const |
assign the fields in OpenFOAM based on the state vector
Definition at line 375 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
Referenced by DAResidual::masterFunction(), and DAObjFunc::masterFunction().
void state2OFField | ( | const scalar * | states | ) | const |
assign the fields in OpenFOAM based on the state array
Definition at line 288 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void pointVec2OFMesh | ( | const Vec | xvVec | ) | const |
assign the points in fvMesh of OpenFOAM based on the point vector
Definition at line 506 of file DAField.C.
References DAField::daIndex_, forAll(), DAIndex::getLocalXvIndex(), mesh, and DAField::mesh_.
Referenced by DAResidual::masterFunction(), and DAObjFunc::masterFunction().
void point2OFMesh | ( | const scalar * | volCoords | ) | const |
assign the points in fvMesh of OpenFOAM based on the point array
Definition at line 465 of file DAField.C.
References DAField::daIndex_, forAll(), DAIndex::getLocalXvIndex(), mesh, and DAField::mesh_.
void resetOFSeeds | ( | ) |
reset the seeds for both state and mesh variables in OpenFOAM by setting their gradient() to zeros
Definition at line 36 of file DAField.C.
References forAll(), makeState, mesh, DAField::mesh_, and DAField::stateInfo_.
void ofMesh2PointVec | ( | Vec | xvVec | ) | const |
assign the point vector based on the points in fvMesh of OpenFOAM
Definition at line 552 of file DAField.C.
References assignValueCheckAD, DAField::daIndex_, forAll(), DAIndex::getLocalXvIndex(), and DAField::mesh_.
void resVec2OFResField | ( | const Vec | resVec | ) | const |
assign the residual field in OpenFOAM based on the residual vector
Definition at line 682 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeStateRes, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void ofResField2ResVec | ( | Vec | resVec | ) | const |
assign the residual vector based on the residual field in OpenFOAM
Definition at line 591 of file DAField.C.
References assignValueCheckAD, DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeStateRes, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
Referenced by DAResidual::masterFunction().
void ofField2List | ( | scalarList & | stateList, |
scalarList & | stateBoundaryList | ||
) | const |
set the scalar list of states based on the latest fields in OpenFOAM
Definition at line 1420 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void list2OFField | ( | const scalarList & | stateList, |
const scalarList & | stateBounaryList, | ||
const label | oldTimeLevel | ||
) | const |
assign the fields in OpenFOAM based on the scalar list of states
Definition at line 1552 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void setPrimalBoundaryConditions | ( | const label | printInfo = 1 | ) |
set the boundary conditions based on parameters defined in DAOption
Definition at line 837 of file DAField.C.
References allOptions, DAField::daOption_, forAll(), fvSource, DAOption::getAllOptions(), k, DAField::mesh_, MRF, and mu.
void specialBCTreatment | ( | ) |
apply special treatment for boundary conditions
Definition at line 812 of file DAField.C.
References DAField::mesh_, DAField::specialBCs, and U.
Referenced by DAResidual::masterFunction(), and DAObjFunc::masterFunction().
void checkSpecialBCs | ( | ) |
check if we need to do special treatment for boundary conditions
Definition at line 772 of file DAField.C.
References forAll(), DAField::mesh_, DAField::specialBCs, and U.
Referenced by DAField::DAField().
|
protected |
Foam::fvMesh object.
Definition at line 48 of file DAField.H.
Referenced by DAField::checkSpecialBCs(), DAField::list2OFField(), DAField::ofField2List(), DAField::ofField2StateVec(), DAField::ofMesh2PointVec(), DAField::ofResField2ResVec(), DAField::point2OFMesh(), DAField::pointVec2OFMesh(), DAField::resetOFSeeds(), DAField::resVec2OFResField(), DAField::setPrimalBoundaryConditions(), DAField::specialBCTreatment(), DAField::state2OFField(), and DAField::stateVec2OFField().
|
protected |
Foam::DAOption object.
Definition at line 51 of file DAField.H.
Referenced by DAField::setPrimalBoundaryConditions().
|
protected |
DAIndex object.
Definition at line 57 of file DAField.H.
Referenced by DAField::list2OFField(), DAField::ofField2List(), DAField::ofField2StateVec(), DAField::ofMesh2PointVec(), DAField::ofResField2ResVec(), DAField::point2OFMesh(), DAField::pointVec2OFMesh(), DAField::resVec2OFResField(), DAField::state2OFField(), and DAField::stateVec2OFField().
|
protected |
the StateInfo_ list from DAStateInfo object
Definition at line 60 of file DAField.H.
Referenced by DAField::DAField(), DAField::list2OFField(), DAField::ofField2List(), DAField::ofField2StateVec(), DAField::ofResField2ResVec(), DAField::resetOFSeeds(), DAField::resVec2OFResField(), DAField::state2OFField(), and DAField::stateVec2OFField().
wordList specialBCs |
a list that contains the names of detected special boundary conditions
Definition at line 125 of file DAField.H.
Referenced by DAField::checkSpecialBCs(), DAJacCon::checkSpecialBCs(), DAJacCondRdW::setupdRdWCon(), and DAField::specialBCTreatment().