39 const word& fieldName,
58 field.primitiveFieldRef() = value;
62 forAll(selectedCells, celli)
64 field[selectedCells[celli]] = value;
69 Boundary& fieldBf = field.boundaryFieldRef();
93 <<
"Failed writing field " << fieldName <<
endl;
102 const word& fieldName,
122 label nNonProcPatches = 0;
129 nNonProcPatches =
patchi + 1;
140 bool haveWarnedInternal =
false, haveWarnedProc =
false;
141 labelList nonProcPatchNChangedFaces(nNonProcPatches, 0);
144 const label facei = selectedFaces[i];
148 if (!haveWarnedInternal)
151 <<
"Ignoring internal face " << facei
152 <<
". Suppressing further warnings." <<
endl;
153 haveWarnedInternal =
true;
165 if (
patches[i] >= nNonProcPatches)
170 <<
"Ignoring face " << patchFaces[i]
171 <<
" of processor patch " <<
patches[i]
172 <<
". Suppressing further warnings." <<
endl;
173 haveWarnedProc =
true;
178 fieldBfCopy[
patches[i]][patchFaces[i]] = value;
179 nonProcPatchNChangedFaces[
patches[i]] ++;
186 nonProcPatchNChangedFaces,
191 nonProcPatchNChangedFaces
197 if (nonProcPatchNChangedFaces[
patchi] > 0)
200 << field.boundaryField()[
patchi].patch().name()
201 <<
" set " << nonProcPatchNChangedFaces[
patchi]
202 <<
" values" <<
endl;
226 const word& fieldName = iter().keyword();
252 #define SetVolField(Type, nullArg) \
259 extrapolatePatches, \
265 #undef SetCellFieldType
270 <<
"Field " << fieldName <<
" not found" <<
endl;
285 const word& fieldName = iter().keyword();
311 #define SetPatchField(Type, nullArg) \
312 setPatchField<Type> \
323 #undef SetCellFieldType
328 <<
"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.
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(makeFieldSourceTypedef)