37 const word& fieldName,
55 field.primitiveFieldRef() = value;
59 forAll(selectedCells, celli)
61 field[selectedCells[celli]] = value;
66 Boundary& fieldBf = field.boundaryFieldRef();
76 <<
"Failed writing field " << fieldName <<
endl;
85 const word& fieldName,
105 label nNonProcPatches = 0;
112 nNonProcPatches =
patchi + 1;
123 bool haveWarnedInternal =
false, haveWarnedProc =
false;
124 labelList nonProcPatchNChangedFaces(nNonProcPatches, 0);
127 const label facei = selectedFaces[i];
131 if (!haveWarnedInternal)
134 <<
"Ignoring internal face " << facei
135 <<
". Suppressing further warnings." <<
endl;
136 haveWarnedInternal =
true;
148 if (
patches[i] >= nNonProcPatches)
153 <<
"Ignoring face " << patchFaces[i]
154 <<
" of processor patch " <<
patches[i]
155 <<
". Suppressing further warnings." <<
endl;
156 haveWarnedProc =
true;
161 fieldBfCopy[
patches[i]][patchFaces[i]] = value;
162 nonProcPatchNChangedFaces[
patches[i]] ++;
169 nonProcPatchNChangedFaces,
174 nonProcPatchNChangedFaces
180 if (nonProcPatchNChangedFaces[
patchi] > 0)
183 << field.boundaryField()[
patchi].patch().name()
184 <<
" set " << nonProcPatchNChangedFaces[
patchi]
185 <<
" values" <<
endl;
208 const word& fieldName = iter().keyword();
234 #define SetVolField(Type, nullArg) \
246 #undef SetCellFieldType
251 <<
"Field " << fieldName <<
" not found" <<
endl;
266 const word& fieldName = iter().keyword();
292 #define SetPatchField(Type, nullArg) \
293 setPatchField<Type> \
304 #undef SetCellFieldType
309 <<
"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.
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.
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 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)