37 const bool forceReference
42 word refCellName = field.
name() +
"RefCell";
43 word refPointName = field.
name() +
"RefPoint";
45 word refValueName = field.
name() +
"RefValue";
47 if (dict.
found(refCellName))
49 if (Pstream::master())
51 refCelli = readLabel(dict.
lookup(refCellName));
53 if (refCelli < 0 || refCelli >= field.
mesh().
nCells())
57 "void Foam::setRefCell\n"
59 " const volScalarField&,\n"
60 " const volScalarField&,\n"
61 " const dictionary&,\n"
66 ) <<
"Illegal master cellID " << refCelli
76 else if (dict.
found(refPointName))
80 label hasRef = (refCelli >= 0 ? 1 : 0);
81 label sumHasRef = returnReduce<label>(hasRef,
sumOp<label>());
86 "void Foam::setRefCell\n"
88 " const volScalarField&,\n"
89 " const volScalarField&,\n"
90 " const dictionary&,\n"
95 ) <<
"Unable to set reference cell for field " << field.
name()
96 <<
nl <<
" Reference point " << refPointName
98 <<
" found on " << sumHasRef <<
" domains (should be one)"
106 "void Foam::setRefCell\n"
108 " const volScalarField&,\n"
109 " const volScalarField&,\n"
110 " const dictionary&,\n"
115 ) <<
"Unable to set reference cell for field " << field.
name()
117 <<
" Please supply either " << refCellName
132 const bool forceReference
135 setRefCell(field, field, dict, refCelli, refValue, forceReference);
145 scalar refCellValue = (refCelli >= 0 ? field[refCelli] : 0.0);