Public Member Functions | |
TypeName ("location") | |
DAFunctionLocation (const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName) | |
virtual | ~DAFunctionLocation () |
virtual scalar | calcFunction () |
calculate the value of objective function More... | |
void | findGlobalSnappedCenter (label snappedCenterCellI, vector ¢er) |
![]() | |
TypeName ("DAFunction") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, DAFunction, dictionary,(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName),(mesh, daOption, daModel, daIndex, functionName)) | |
DAFunction (const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName) | |
virtual | ~DAFunction () |
void | clear () |
clear up members More... | |
void | calcFunctionSources () |
calculate DAFunction::faceSources_ and DAFunction::cellSources_ More... | |
word | getFunctionName () |
return the name of objective function More... | |
word | getFunctionType () |
return the part of objective function More... | |
word | getFunctionTimeOp () |
return the time operator such as final, sum, average, variance More... | |
const labelList & | getFaceSources () const |
return DAFunction::faceSources_ More... | |
const labelList & | getCellSources () const |
return DAFunction::cellSources_ More... | |
void | calcRefVar (scalar &functionValue) |
calculate (var-ref)^2 More... | |
Protected Attributes | |
scalar | coeffKS_ = 1.0 |
coefficient for the KS function More... | |
word | mode_ |
location mode to use More... | |
vector | axis_ = {1, 0, 0} |
axis for radius computation More... | |
vector | center_ = {0, 0, 0} |
center for radius computation More... | |
label | maxRPatchI_ = -1 |
maxRadius patchI More... | |
label | maxRFaceI_ = -1 |
maxRadius patchI More... | |
label | snapCenter2Cell_ = 0 |
whether to snap the center to a cell in the mesh if yes the center will move with the mesh More... | |
label | snappedCenterCellI_ = -1 |
the cell index for the center if snapCenter2Cell_ = 1 More... | |
![]() | |
const fvMesh & | mesh_ |
fvMesh More... | |
const DAOption & | daOption_ |
DAOption object. More... | |
const DAModel & | daModel_ |
DAModel object. More... | |
const DAIndex & | daIndex_ |
DAIndex object. More... | |
word | functionName_ |
the name of the objective function More... | |
word | functionType_ |
the type of the objective function More... | |
word | timeOp_ |
time operator such as final, sum, or average More... | |
dictionary | functionDict_ |
dictionary containing the information for the objective function More... | |
labelList | faceSources_ |
a sorted list of all face sources for the objective function More... | |
labelList | cellSources_ |
a sorted list of all cell sources for the objective function More... | |
scalar | scale_ |
scale of the objective function More... | |
label | calcRefVar_ |
whether to calculate (obj-ref)^2 More... | |
scalarList | ref_ |
if calcRefVar_ is True, set the reference value list More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< DAFunction > | New (const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName) |
Definition at line 26 of file DAFunctionLocation.H.
DAFunctionLocation | ( | const fvMesh & | mesh, |
const DAOption & | daOption, | ||
const DAModel & | daModel, | ||
const DAIndex & | daIndex, | ||
const word | functionName | ||
) |
Definition at line 19 of file DAFunctionLocation.C.
References DAFunctionLocation::axis_, DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAFunctionLocation::center_, DAFunctionLocation::coeffKS_, DAFunction::daIndex_, DAFunction::faceSources_, DAFunctionLocation::findGlobalSnappedCenter(), forAll(), DAFunction::functionDict_, DAFunctionLocation::maxRFaceI_, DAFunctionLocation::maxRPatchI_, DAFunction::mesh_, DAFunctionLocation::mode_, DAUtility::myFindCell(), DAIndex::nLocalInternalFaces, DAFunctionLocation::snapCenter2Cell_, and DAFunctionLocation::snappedCenterCellI_.
|
inlinevirtual |
Definition at line 68 of file DAFunctionLocation.H.
TypeName | ( | "location" | ) |
|
virtual |
calculate the value of objective function
Implements DAFunction.
Definition at line 153 of file DAFunctionLocation.C.
References DAFunctionLocation::axis_, DAIndex::bFaceFaceI, DAIndex::bFacePatchI, DAFunction::calcRefVar(), DAFunctionLocation::center_, DAFunctionLocation::coeffKS_, DAFunction::daIndex_, DAFunction::faceSources_, DAFunctionLocation::findGlobalSnappedCenter(), forAll(), DAFunctionLocation::maxRFaceI_, DAFunctionLocation::maxRPatchI_, DAFunction::mesh_, DAFunctionLocation::mode_, DAIndex::nLocalInternalFaces, DAFunctionLocation::snapCenter2Cell_, and DAFunctionLocation::snappedCenterCellI_.
void findGlobalSnappedCenter | ( | label | snappedCenterCellI, |
vector & | center | ||
) |
Definition at line 129 of file DAFunctionLocation.C.
References DAFunction::mesh_.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
coefficient for the KS function
Definition at line 32 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
location mode to use
Definition at line 35 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
axis for radius computation
Definition at line 38 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
center for radius computation
Definition at line 41 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
maxRadius patchI
Definition at line 44 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
maxRadius patchI
Definition at line 47 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
whether to snap the center to a cell in the mesh if yes the center will move with the mesh
Definition at line 50 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().
|
protected |
the cell index for the center if snapCenter2Cell_ = 1
Definition at line 53 of file DAFunctionLocation.H.
Referenced by DAFunctionLocation::calcFunction(), and DAFunctionLocation::DAFunctionLocation().