diff --git a/src/adjoint/DAObjFunc/DAObjFuncFieldMaxKS.C b/src/adjoint/DAObjFunc/DAObjFuncFieldMaxKS.C new file mode 100755 index 00000000..826c15f1 --- /dev/null +++ b/src/adjoint/DAObjFunc/DAObjFuncFieldMaxKS.C @@ -0,0 +1,133 @@ +/*---------------------------------------------------------------------------*\ + + DAFoam : Discrete Adjoint with OpenFOAM + Version : v3 + +\*---------------------------------------------------------------------------*/ + +#include "DAObjFuncFieldMaxKS.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +defineTypeNameAndDebug(DAObjFuncFieldMaxKS, 0); +addToRunTimeSelectionTable(DAObjFunc, DAObjFuncFieldMaxKS, dictionary); +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +DAObjFuncFieldMaxKS::DAObjFuncFieldMaxKS( + 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( + mesh, + daOption, + daModel, + daIndex, + daResidual, + objFuncName, + objFuncPart, + objFuncDict) +{ + // Assign type, this is common for all objectives + objFuncDict_.readEntry("type", objFuncType_); + + objFuncDict_.readEntry("varName", varName_); + + objFuncDict_.readEntry("varType", varType_); + + objFuncDict_.readEntry