DATimeOpFinal.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6 \*---------------------------------------------------------------------------*/
7 
8 #include "DATimeOpFinal.H"
9 
10 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
11 
12 namespace Foam
13 {
14 
15 defineTypeNameAndDebug(DATimeOpFinal, 0);
16 addToRunTimeSelectionTable(DATimeOp, DATimeOpFinal, dictionary);
17 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
18 
20  const word timeOpType,
21  const dictionary options)
22  : DATimeOp(timeOpType, options)
23 {
24 }
25 
27  const scalarList& valList,
28  const label iStart,
29  const label iEnd)
30 {
31  // just return the last value from valList
32  return valList[iEnd];
33 }
34 
36  const scalarList& valList,
37  const label iStart,
38  const label iEnd,
39  const label timeIdx)
40 {
41  // the dFScaling is alway 1
42  return 1.0;
43 }
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 } // End namespace Foam
48 
49 // ************************************************************************* //
Foam::DATimeOpFinal::compute
virtual scalar compute(const scalarList &valList, const label iStart, const label iEnd)
compute the timeOp value based on valList
Definition: DATimeOpFinal.C:26
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(DAFunction, DAFunctionForce, dictionary)
Foam::DATimeOp
Definition: DATimeOp.H:27
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(DAFunction, 0)
Foam
Definition: checkGeometry.C:32
Foam::DATimeOpFinal::DATimeOpFinal
DATimeOpFinal(const word timeOpType, const dictionary options)
Definition: DATimeOpFinal.C:19
DATimeOpFinal.H
Foam::DATimeOpFinal::dFScaling
virtual scalar dFScaling(const scalarList &valList, const label iStart, const label iEnd, const label timeIdx)
compute the scaling factor for dF/d? calculation.
Definition: DATimeOpFinal.C:35