39 const word& fieldName,
63 field.primitiveFieldRef() = value.value();
67 forAll(selectedCells, celli)
69 field[selectedCells[celli]] = value.value();
74 Boundary& fieldBf = field.boundaryFieldRef();
98 <<
"Failed writing field " << fieldName <<
endl;
107 const word& fieldName,
132 label nNonProcPatches = 0;
139 nNonProcPatches =
patchi + 1;
150 bool haveWarnedInternal =
false, haveWarnedProc =
false;
151 labelList nonProcPatchNChangedFaces(nNonProcPatches, 0);
154 const label facei = selectedFaces[i];
158 if (!haveWarnedInternal)
161 <<
"Ignoring internal face " << facei
162 <<
". Suppressing further warnings." <<
endl;
163 haveWarnedInternal =
true;
175 if (
patches[i] >= nNonProcPatches)
180 <<
"Ignoring face " << patchFaces[i]
181 <<
" of processor patch " <<
patches[i]
182 <<
". Suppressing further warnings." <<
endl;
183 haveWarnedProc =
true;
188 fieldBfCopy[
patches[i]][patchFaces[i]] = value.value();
189 nonProcPatchNChangedFaces[
patches[i]] ++;
196 nonProcPatchNChangedFaces,
201 nonProcPatchNChangedFaces
207 if (nonProcPatchNChangedFaces[
patchi] > 0)
210 << field.boundaryField()[
patchi].patch().name()
211 <<
" set " << nonProcPatchNChangedFaces[
patchi]
212 <<
" values" <<
endl;
236 const word& fieldName = iter().keyword();
262 #define SetVolField(Type, nullArg) \
269 extrapolatePatches, \
275 #undef SetCellFieldType
280 <<
"Field " << fieldName <<
" not found" <<
endl;
295 const word& fieldName = iter().keyword();
321 #define SetPatchField(Type, nullArg) \
322 setPatchField<Type> \
333 #undef SetCellFieldType
338 <<
"Field " << fieldName <<
" not found" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
bool found(const word &) const
Search DictionaryBase for given keyword.
Generic GeometricBoundaryField class.
Generic GeometricField class.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
bool headerOk()
Read header of local object without type-checking.
const word & headerClassName() const
Return name of the class name read from header.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static const List< label > & null()
Return a null List.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
Template dictionary class which manages the storage associated with it.
static const word & constant()
Return constant name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Generic dimensioned Type class.
const word & name() const
Return const reference to name.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const UCompactListList< label > & polyBFacePatches() const
Return poly-bFace-patch addressing.
const UCompactListList< label > & polyBFacePatchFaces() const
Return poly-bFace-patch-face addressing.
label nInternalFaces() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
A wrapper for matching a List of wordRe.
bool match(const string &, bool literalMatch=false) const
Return true if string matches any of the regular expressions.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
#define WarningInFunction
Report a warning using Foam::Warning.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)