61 if (source_ != stSampledSurface && obr_.foundObject<sf>(fieldName))
63 return filterField(obr_.lookupObject<sf>(fieldName),
true);
65 else if (obr_.foundObject<vf>(fieldName))
67 if (surfacePtr_.valid())
69 return surfacePtr_().sample(obr_.lookupObject<vf>(fieldName));
73 return filterField(obr_.lookupObject<vf>(fieldName),
true);
99 result =
sum(values*magSf)/
sum(magSf);
102 case opAreaIntegrate:
104 result =
sum(values*magSf);
107 case opWeightedAverage:
109 result =
sum(values*weightField)/
sum(weightField);
114 result =
min(values);
119 result =
max(values);
137 const bool ok = validField<Type>(fieldName);
142 Field<Type> values = combineFields(setFieldValues<Type>(fieldName)());
147 if (surfacePtr_.valid())
149 magSf = combineFields(surfacePtr_().magSf());
153 magSf = combineFields(filterField(
mesh().magSf(),
false)());
158 combineFields(setFieldValues<scalar>(weightFieldName_)());
162 Type result = processValues(values, magSf, weightField);
170 fieldName +
"_" + sourceTypeNames_[source_] +
"-"
172 obr_.time().timeName(),
181 outputFilePtr_()<<
tab << result;
185 Info<<
" " << operationTypeNames_[operation_]
186 <<
"(" << sourceName_ <<
") for " << fieldName
187 <<
" = " << result <<
endl;
200 const bool applyOrientation
208 label faceI = faceId_[i];
209 label patchI = facePatchId_[i];
218 "fieldValues::faceSource::filterField"
220 "const GeometricField<Type, fvPatchField, volMesh>&"
222 ) <<
type() <<
" " << name_ <<
": "
223 << sourceTypeNames_[source_] <<
"(" << sourceName_ <<
"):"
225 <<
" Unable to process internal faces for volume field "
230 if (applyOrientation)
234 values[i] *= faceSign_[i];
246 const bool applyOrientation
254 label faceI = faceId_[i];
255 label patchI = facePatchId_[i];
262 values[i] = field[faceI];
266 if (applyOrientation)
270 values[i] *= faceSign_[i];