DAObjFuncMeshQualityKS.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6  Description:
7  Child class for mesh quality with KS function
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAObjFuncMeshQualityKS_H
12 #define DAObjFuncMeshQualityKS_H
13 
14 #include "DAObjFunc.H"
15 #include "polyMeshTools.H"
16 #include "addToRunTimeSelectionTable.H"
17 
18 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
19 
20 namespace Foam
21 {
22 
23 /*---------------------------------------------------------------------------*\
24  Class DAObjFuncMeshQualityKS Declaration
25 \*---------------------------------------------------------------------------*/
26 
28  : public DAObjFunc
29 {
30 
31 protected:
32 
34  scalar coeffKS_;
35 
37  word metric_;
38 
39 
40 public:
41  TypeName("meshQualityKS");
42  // Constructors
43 
44  //- Construct from components
46  const fvMesh& mesh,
47  const DAOption& daOption,
48  const DAModel& daModel,
49  const DAIndex& daIndex,
50  const DAResidual& daResidual,
51  const word objFuncName,
52  const word objFuncPart,
53  const dictionary& objFuncDict);
54 
55  //- Destructor
57  {
58  }
59 
61  virtual void calcObjFunc(
62  const labelList& objFuncFaceSources,
63  const labelList& objFuncCellSources,
64  scalarList& objFuncFaceValues,
65  scalarList& objFuncCellValues,
66  scalar& objFuncValue);
67 };
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 } // End namespace Foam
72 
73 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 
75 #endif
76 
77 // ************************************************************************* //
Foam::DAObjFuncMeshQualityKS::DAObjFuncMeshQualityKS
DAObjFuncMeshQualityKS(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)
Definition: DAObjFuncMeshQualityKS.C:19
Foam::DAObjFuncMeshQualityKS::calcObjFunc
virtual void calcObjFunc(const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)
calculate the value of objective function
Definition: DAObjFuncMeshQualityKS.C:51
Foam::DAObjFuncMeshQualityKS
Definition: DAObjFuncMeshQualityKS.H:27
Foam::DAOption
Definition: DAOption.H:29
Foam::DAObjFuncMeshQualityKS::~DAObjFuncMeshQualityKS
virtual ~DAObjFuncMeshQualityKS()
Definition: DAObjFuncMeshQualityKS.H:56
daOption
DAOption daOption(mesh, pyOptions_)
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAModel
Definition: DAModel.H:59
Foam::DAObjFuncMeshQualityKS::TypeName
TypeName("meshQualityKS")
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAObjFuncMeshQualityKS::coeffKS_
scalar coeffKS_
coefficient for the KS function
Definition: DAObjFuncMeshQualityKS.H:34
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DAObjFuncMeshQualityKS::metric_
word metric_
which mesh quality metric to use
Definition: DAObjFuncMeshQualityKS.H:37
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)
DAObjFunc.H
Foam::DAObjFunc
Definition: DAObjFunc.H:33