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 | ofField2State (scalar *states) const |
assign the openfoam fields to the states array More... | |
void | point2OFMesh (const scalar *volCoords) const |
assign the points in fvMesh of OpenFOAM based on the point array More... | |
void | ofMesh2PointVec (Vec xvVec) const |
assign the point vector based on the points in fvMesh of OpenFOAM More... | |
void | ofResField2ResVec (Vec resVec) const |
assign the residual vector based on the residual field in OpenFOAM 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(), DAOption::getOption(), 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 36 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 300 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().
void state2OFField | ( | const scalar * | states | ) | const |
assign the fields in OpenFOAM based on the state array
Definition at line 126 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void ofField2State | ( | scalar * | states | ) | const |
assign the openfoam fields to the states array
Definition at line 213 of file DAField.C.
References DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAField::daIndex_, forAll(), DAIndex::getLocalAdjointStateIndex(), makeState, DAField::mesh_, DAIndex::nLocalInternalFaces, and DAField::stateInfo_.
void point2OFMesh | ( | const scalar * | volCoords | ) | const |
assign the points in fvMesh of OpenFOAM based on the point array
Definition at line 390 of file DAField.C.
References DAField::daIndex_, DAField::daOption_, forAll(), DAOption::getAllOptions(), DAIndex::getLocalXvIndex(), mesh, and DAField::mesh_.
void ofMesh2PointVec | ( | Vec | xvVec | ) | const |
assign the point vector based on the points in fvMesh of OpenFOAM
Definition at line 438 of file DAField.C.
References assignValueCheckAD, DAField::daIndex_, forAll(), DAIndex::getLocalXvIndex(), and DAField::mesh_.
void ofResField2ResVec | ( | Vec | resVec | ) | const |
assign the residual vector based on the residual field in OpenFOAM
Definition at line 477 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 setPrimalBoundaryConditions | ( | const label | printInfo = 1 | ) |
set the boundary conditions based on parameters defined in DAOption
Definition at line 633 of file DAField.C.
References allOptions, alphat, DAField::daOption_, forAll(), DAOption::getAllOptions(), k, DAField::mesh_, MRF, and mu.
void specialBCTreatment | ( | ) |
apply special treatment for boundary conditions
Definition at line 608 of file DAField.C.
References DAField::mesh_, DAField::specialBCs, and U.
Referenced by DAResidual::masterFunction().
void checkSpecialBCs | ( | ) |
check if we need to do special treatment for boundary conditions
Definition at line 568 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::ofField2State(), DAField::ofField2StateVec(), DAField::ofMesh2PointVec(), DAField::ofResField2ResVec(), DAField::point2OFMesh(), DAField::setPrimalBoundaryConditions(), DAField::specialBCTreatment(), DAField::state2OFField(), and DAField::stateVec2OFField().
|
protected |
Foam::DAOption object.
Definition at line 51 of file DAField.H.
Referenced by DAField::point2OFMesh(), and DAField::setPrimalBoundaryConditions().
|
protected |
DAIndex object.
Definition at line 57 of file DAField.H.
Referenced by DAField::ofField2State(), DAField::ofField2StateVec(), DAField::ofMesh2PointVec(), DAField::ofResField2ResVec(), DAField::point2OFMesh(), 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::ofField2State(), DAField::ofField2StateVec(), DAField::ofResField2ResVec(), DAField::state2OFField(), and DAField::stateVec2OFField().
wordList specialBCs |
a list that contains the names of detected special boundary conditions
Definition at line 108 of file DAField.H.
Referenced by DAField::checkSpecialBCs(), DAJacCon::checkSpecialBCs(), DAJacCon::setupdRdWCon(), and DAField::specialBCTreatment().