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

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 DAOptiondaOption_
 Foam::DAOption object. More...
 
const DAModeldaModel_
 DAModel object. More...
 
const DAIndexdaIndex_
 DAIndex object. More...
 
HashTable< wordList > stateInfo_
 the StateInfo_ list from DAStateInfo object More...
 

Detailed Description

Definition at line 36 of file DAField.H.

Constructor & Destructor Documentation

◆ DAField()

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_.

Here is the call graph for this function:

◆ ~DAField()

virtual ~DAField ( )
inlinevirtual

Destructor.

Definition at line 71 of file DAField.H.

Member Function Documentation

◆ ofField2StateVec()

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_.

Here is the call graph for this function:

◆ stateVec2OFField()

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().

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

◆ state2OFField()

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_.

Here is the call graph for this function:

◆ pointVec2OFMesh()

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().

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

◆ point2OFMesh()

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_.

Here is the call graph for this function:

◆ resetOFSeeds()

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_.

Here is the call graph for this function:

◆ ofMesh2PointVec()

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_.

Here is the call graph for this function:

◆ resVec2OFResField()

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_.

Here is the call graph for this function:

◆ ofResField2ResVec()

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().

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

◆ ofField2List()

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_.

Here is the call graph for this function:

◆ list2OFField()

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_.

Here is the call graph for this function:

◆ setPrimalBoundaryConditions()

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.

Here is the call graph for this function:

◆ specialBCTreatment()

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().

Here is the caller graph for this function:

◆ checkSpecialBCs()

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().

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

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

◆ daOption_

const DAOption& daOption_
protected

Foam::DAOption object.

Definition at line 51 of file DAField.H.

Referenced by DAField::setPrimalBoundaryConditions().

◆ daModel_

const DAModel& daModel_
protected

DAModel object.

Definition at line 54 of file DAField.H.

◆ daIndex_

const DAIndex& daIndex_
protected

◆ stateInfo_

HashTable<wordList> stateInfo_
protected

◆ specialBCs

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().


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