Go to the documentation of this file.
25 const word objFuncName,
26 const word objFuncPart,
27 const dictionary& objFuncDict)
50 const labelList& objFuncFaceSources,
51 const labelList& objFuncCellSources,
52 scalarList& objFuncFaceValues,
53 scalarList& objFuncCellValues,
76 forAll(objFuncCellValues, idxI)
78 objFuncCellValues[idxI] = 0.0;
83 const objectRegistry& db =
mesh_.thisDb();
84 const volScalarField&
rho = db.lookupObject<volScalarField>(
"solid:rho");
87 forAll(objFuncCellSources, idxI)
89 const label& cellI = objFuncCellSources[idxI];
90 scalar volume =
mesh_.V()[cellI];
91 objFuncCellValues[idxI] =
scale_ * volume *
rho[cellI];
92 objFuncValue += objFuncCellValues[idxI];
96 reduce(objFuncValue, sumOp<scalar>());
word objFuncType_
the type of the objective function
forAll(pseudoP.boundaryField(), patchI)
DAOption daOption(mesh, pyOptions_)
const fvMesh & mesh_
fvMesh
virtual void calcObjFunc(const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)
calculate the value of objective function
DAObjFuncMass(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)
defineTypeNameAndDebug(DAFvSource, 0)
addToRunTimeSelectionTable(DAFvSource, DAFvSourceActuatorDisk, dictionary)
scalar scale_
scale of the objective function
DAModel daModel(mesh, daOption)
List< List< word > > objFuncConInfo_
the connectivity information for the objective function
DAIndex daIndex(mesh, daOption, daModel)
const dictionary & objFuncDict_
dictionary containing the information for the objective function