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

Public Member Functions

 TypeName ("DAObjFunc")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, DAObjFunc, dictionary,(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict),(mesh, daOption, daModel, daIndex, daResidual, objFuncName, objFuncPart, objFuncDict))
 
 DAObjFunc (const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)
 
virtual ~DAObjFunc ()
 
void clear ()
 clear up members More...
 
void calcObjFuncSources (labelList &faceSources, labelList &cellSources)
 calculate DAObjFunc::objFuncFaceSources_ and DAObjFunc::objFuncCellSources_ More...
 
virtual void calcObjFunc (const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)=0
 calculate the value of objective function More...
 
scalar getObjFuncValue ()
 calculate the value of objective function More...
 
scalar masterFunction (const dictionary &options, const Vec xvVec, const Vec wVec)
 the master function to compute objective function given the state and point vectors More...
 
word getObjFuncName ()
 return the name of objective function More...
 
word getObjFuncPart ()
 return the part of objective function More...
 
word getObjFuncType ()
 return the part of objective function More...
 
const labelList & getObjFuncFaceSources () const
 return DAObjFunc::objFuncFaceSources_ More...
 
const labelList & getObjFuncCellSources () const
 return DAObjFunc::objFuncCellSources_ More...
 
const scalarList & getObjFuncFaceValues () const
 return DAObjFunc::objFuncFaceValues_ More...
 
const scalarList & getObjFuncCellValues () const
 return DAObjFunc::objFuncCellValues_ More...
 
const List< List< word > > & getObjFuncConInfo () const
 return DAObjFunc::objFuncConInfo_ More...
 

Static Public Member Functions

static autoPtr< DAObjFuncNew (const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)
 

Public Attributes

scalar expSumKS = 1.0
 expSumKS stores sum[exp(coeffKS*x_i)] for KS function which will be used to scale dFdW More...
 
label calcRefCoeffs = 1
 whether to compute reference coefficients for special objFunc treatment such as totalPressureRatio More...
 

Protected Attributes

const fvMesh & mesh_
 fvMesh More...
 
const DAOptiondaOption_
 DAOption object. More...
 
const DAModeldaModel_
 DAModel object. More...
 
const DAIndexdaIndex_
 DAIndex object. More...
 
const DAResidualdaResidual_
 DAResidual object. More...
 
word objFuncName_
 the name of the objective function More...
 
word objFuncPart_
 the part of the objective function More...
 
word objFuncType_
 the type of the objective function More...
 
const dictionary & objFuncDict_
 dictionary containing the information for the objective function More...
 
DAField daField_
 DAField object. More...
 
labelList objFuncFaceSources_
 a sorted list of all face sources for the objective function More...
 
labelList objFuncCellSources_
 a sorted list of all cell sources for the objective function More...
 
scalarList objFuncFaceValues_
 value of the obj function on the discrete faces More...
 
scalarList objFuncCellValues_
 value of the obj function in the discrete cells More...
 
scalar scale_
 scale of the objective function More...
 
scalar objFuncValue_
 the value of the objective function More...
 
List< List< word > > objFuncConInfo_
 the connectivity information for the objective function More...
 

Detailed Description

Definition at line 33 of file DAObjFunc.H.

Constructor & Destructor Documentation

◆ DAObjFunc()

DAObjFunc ( const fvMesh &  mesh,
const DAOption daOption,
const DAModel daModel,
const DAIndex daIndex,
const DAResidual daResidual,
const word  objFuncName,
const word  objFuncPart,
const dictionary &  objFuncDict 
)

◆ ~DAObjFunc()

virtual ~DAObjFunc ( )
inlinevirtual

Definition at line 150 of file DAObjFunc.H.

Member Function Documentation

◆ TypeName()

TypeName ( "DAObjFunc"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
DAObjFunc  ,
dictionary  ,
(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)  ,
(mesh, daOption, daModel, daIndex, daResidual, objFuncName, objFuncPart, objFuncDict)   
)

◆ New()

autoPtr< DAObjFunc > New ( const fvMesh &  mesh,
const DAOption daOption,
const DAModel daModel,
const DAIndex daIndex,
const DAResidual daResidual,
const word  objFuncName,
const word  objFuncPart,
const dictionary &  objFuncDict 
)
static

◆ clear()

void clear ( )
inline

◆ calcObjFuncSources()

void calcObjFuncSources ( labelList &  faceSources,
labelList &  cellSources 
)

calculate DAObjFunc::objFuncFaceSources_ and DAObjFunc::objFuncCellSources_

Definition at line 123 of file DAObjFunc.C.

References DAObjFunc::mesh_, and DAObjFunc::objFuncDict_.

Referenced by DAObjFunc::DAObjFunc().

Here is the caller graph for this function:

◆ calcObjFunc()

virtual void calcObjFunc ( const labelList &  objFuncFaceSources,
const labelList &  objFuncCellSources,
scalarList &  objFuncFaceValues,
scalarList &  objFuncCellValues,
scalar &  objFuncValue 
)
pure virtual

◆ getObjFuncValue()

scalar getObjFuncValue ( )

calculate the value of objective function

Definition at line 290 of file DAObjFunc.C.

References DAObjFunc::calcObjFunc(), DAObjFunc::objFuncCellSources_, DAObjFunc::objFuncCellValues_, DAObjFunc::objFuncFaceSources_, DAObjFunc::objFuncFaceValues_, and DAObjFunc::objFuncValue_.

Referenced by DASolver::getObjFuncValue(), DAObjFunc::masterFunction(), and DASolver::printAllObjFuncs().

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

◆ masterFunction()

scalar masterFunction ( const dictionary &  options,
const Vec  xvVec,
const Vec  wVec 
)

the master function to compute objective function given the state and point vectors

Definition at line 228 of file DAObjFunc.C.

References DAResidual::correctBoundaryConditions(), DAObjFunc::daField_, daModel(), DAObjFunc::daModel_, DAObjFunc::daResidual_, DAObjFunc::getObjFuncValue(), DAField::pointVec2OFMesh(), DAField::specialBCTreatment(), DAField::stateVec2OFField(), and DAResidual::updateIntermediateVariables().

Here is the call graph for this function:

◆ getObjFuncName()

word getObjFuncName ( )
inline

return the name of objective function

Definition at line 187 of file DAObjFunc.H.

References DAObjFunc::objFuncName_.

Referenced by DASolver::getObjFuncValue(), and DASolver::printAllObjFuncs().

Here is the caller graph for this function:

◆ getObjFuncPart()

word getObjFuncPart ( )
inline

return the part of objective function

Definition at line 193 of file DAObjFunc.H.

References DAObjFunc::objFuncPart_.

Referenced by DASolver::printAllObjFuncs().

Here is the caller graph for this function:

◆ getObjFuncType()

word getObjFuncType ( )
inline

return the part of objective function

Definition at line 199 of file DAObjFunc.H.

References DAObjFunc::objFuncType_.

Referenced by DASolver::printAllObjFuncs().

Here is the caller graph for this function:

◆ getObjFuncFaceSources()

const labelList& getObjFuncFaceSources ( ) const
inline

return DAObjFunc::objFuncFaceSources_

Definition at line 205 of file DAObjFunc.H.

References DAObjFunc::objFuncFaceSources_.

◆ getObjFuncCellSources()

const labelList& getObjFuncCellSources ( ) const
inline

return DAObjFunc::objFuncCellSources_

Definition at line 211 of file DAObjFunc.H.

References DAObjFunc::objFuncCellSources_.

◆ getObjFuncFaceValues()

const scalarList& getObjFuncFaceValues ( ) const
inline

return DAObjFunc::objFuncFaceValues_

Definition at line 217 of file DAObjFunc.H.

References DAObjFunc::objFuncFaceValues_.

◆ getObjFuncCellValues()

const scalarList& getObjFuncCellValues ( ) const
inline

return DAObjFunc::objFuncCellValues_

Definition at line 223 of file DAObjFunc.H.

References DAObjFunc::objFuncCellValues_.

◆ getObjFuncConInfo()

const List<List<word> >& getObjFuncConInfo ( ) const
inline

return DAObjFunc::objFuncConInfo_

Definition at line 229 of file DAObjFunc.H.

References DAObjFunc::objFuncConInfo_.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

◆ daOption_

const DAOption& daOption_
protected

◆ daModel_

const DAModel& daModel_
protected

DAModel object.

Definition at line 51 of file DAObjFunc.H.

Referenced by DAObjFunc::masterFunction().

◆ daIndex_

const DAIndex& daIndex_
protected

◆ daResidual_

const DAResidual& daResidual_
protected

DAResidual object.

Definition at line 57 of file DAObjFunc.H.

Referenced by DAObjFunc::masterFunction().

◆ objFuncName_

word objFuncName_
protected

the name of the objective function

Definition at line 60 of file DAObjFunc.H.

Referenced by DAObjFunc::getObjFuncName().

◆ objFuncPart_

word objFuncPart_
protected

the part of the objective function

Definition at line 63 of file DAObjFunc.H.

Referenced by DAObjFunc::getObjFuncPart().

◆ objFuncType_

word objFuncType_
protected

◆ objFuncDict_

const dictionary& objFuncDict_
protected

◆ daField_

DAField daField_
protected

DAField object.

Definition at line 72 of file DAObjFunc.H.

Referenced by DAObjFunc::masterFunction().

◆ objFuncFaceSources_

labelList objFuncFaceSources_
protected

a sorted list of all face sources for the objective function

Definition at line 75 of file DAObjFunc.H.

Referenced by DAObjFunc::clear(), DAObjFunc::DAObjFunc(), DAObjFunc::getObjFuncFaceSources(), and DAObjFunc::getObjFuncValue().

◆ objFuncCellSources_

labelList objFuncCellSources_
protected

a sorted list of all cell sources for the objective function

Definition at line 78 of file DAObjFunc.H.

Referenced by DAObjFunc::clear(), DAObjFunc::DAObjFunc(), DAObjFunc::getObjFuncCellSources(), and DAObjFunc::getObjFuncValue().

◆ objFuncFaceValues_

scalarList objFuncFaceValues_
protected

value of the obj function on the discrete faces

Definition at line 81 of file DAObjFunc.H.

Referenced by DAObjFunc::clear(), DAObjFunc::DAObjFunc(), DAObjFunc::getObjFuncFaceValues(), and DAObjFunc::getObjFuncValue().

◆ objFuncCellValues_

scalarList objFuncCellValues_
protected

value of the obj function in the discrete cells

Definition at line 84 of file DAObjFunc.H.

Referenced by DAObjFunc::clear(), DAObjFunc::DAObjFunc(), DAObjFunc::getObjFuncCellValues(), and DAObjFunc::getObjFuncValue().

◆ scale_

scalar scale_
protected

◆ objFuncValue_

scalar objFuncValue_
protected

the value of the objective function

Definition at line 90 of file DAObjFunc.H.

Referenced by DAObjFunc::getObjFuncValue().

◆ objFuncConInfo_

List<List<word> > objFuncConInfo_
protected

◆ expSumKS

scalar expSumKS = 1.0

expSumKS stores sum[exp(coeffKS*x_i)] for KS function which will be used to scale dFdW

Definition at line 235 of file DAObjFunc.H.

Referenced by DAObjFuncVonMisesStressKS::calcObjFunc().

◆ calcRefCoeffs

label calcRefCoeffs = 1

whether to compute reference coefficients for special objFunc treatment such as totalPressureRatio

Definition at line 238 of file DAObjFunc.H.

Referenced by DAObjFuncTotalPressureRatio::calcObjFunc(), and DAObjFuncTotalTemperatureRatio::calcObjFunc().


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