25 const word objFuncName,
26 const word objFuncPart,
27 const dictionary& objFuncDict)
52 const labelList& objFuncFaceSources,
53 const labelList& objFuncCellSources,
54 scalarList& objFuncFaceValues,
55 scalarList& objFuncCellValues,
80 forAll(objFuncFaceSources, idxI)
82 const label& objFuncFaceI = objFuncFaceSources[idxI];
93 const objectRegistry& db =
mesh_.thisDb();
97 const volScalarField& var = db.lookupObject<volScalarField>(
varName_);
100 forAll(objFuncFaceSources, idxI)
102 const label& objFuncFaceI = objFuncFaceSources[idxI];
106 scalar area =
mesh_.magSf().boundaryField()[patchI][faceI];
107 objFuncValue +=
scale_ * area * var.boundaryField()[patchI][faceI] /
areaSum_;
112 const volVectorField& var = db.lookupObject<volVectorField>(
varName_);
115 forAll(objFuncFaceSources, idxI)
117 const label& objFuncFaceI = objFuncFaceSources[idxI];
121 scalar area =
mesh_.magSf().boundaryField()[patchI][faceI];
127 FatalErrorIn(
"DAObjFuncPatchMean::calcObjFunc")
128 <<
"varType not valid. Options are scalar or vector"
129 << abort(FatalError);
133 reduce(objFuncValue, sumOp<scalar>());