58 cellProcAddressing_[proci]
66 procFields[0].dimensions(),
70 tfield.ref().oriented() = procFields[0].oriented();
92 const auto& procField = procFields[proci];
97 procField.primitiveField(),
98 cellProcAddressing_[proci]
102 forAll(boundaryProcAddressing_[proci], patchi)
105 const label curBPatch = boundaryProcAddressing_[proci][patchi];
109 procField.
mesh().boundary()[patchi].patchSlice
111 faceProcAddressing_[proci]
119 if (!patchFields(curBPatch))
126 procField.boundaryField()[patchi],
127 mesh_.boundary()[curBPatch],
131 mesh_.boundary()[curBPatch].size()
137 const label curPatchStart =
138 mesh_.boundaryMesh()[curBPatch].start();
148 <<
"Processor " << proci
150 << procField.mesh().boundary()[patchi].name()
152 <<
" originates from reversed face since "
159 reverseAddressing[facei] =
cp[facei] - 1 - curPatchStart;
163 patchFields[curBPatch].rmap
165 procField.boundaryField()[patchi],
172 procField.boundaryField()[patchi];
180 label curF =
cp[facei] - 1;
183 if (curF >= mesh_.nInternalFaces())
185 label curBPatch = mesh_.boundaryMesh().whichPatch(curF);
187 if (!patchFields(curBPatch))
194 mesh_.boundary()[curBPatch].type(),
195 mesh_.boundary()[curBPatch],
204 [curBPatch].whichFace(curF);
206 patchFields[curBPatch][curPatchFace] =
214 forAll(mesh_.boundary(), patchi)
219 isType<emptyFvPatch>(mesh_.boundary()[patchi])
220 && !patchFields(patchi)
229 mesh_.boundary()[patchi],
243 procFields[0].dimensions(),
248 tfield.ref().oriented() = procFields[0].oriented();
269 forAll(procMeshes_, proci)
271 const auto& procField = procFields[proci];
282 Field<Type> procInternalField(procField.primitiveField());
286 forAll(procInternalField, addrI)
291 procInternalField[addrI] = -procInternalField[addrI];
296 internalField.
rmap(procInternalField, curAddr);
300 forAll(boundaryProcAddressing_[proci], patchi)
303 const label curBPatch = boundaryProcAddressing_[proci][patchi];
307 procMeshes_[proci].boundary()[patchi].patchSlice
309 faceProcAddressing_[proci]
317 if (!patchFields(curBPatch))
324 procField.boundaryField()[patchi],
325 mesh_.boundary()[curBPatch],
329 mesh_.boundary()[curBPatch].size()
335 const label curPatchStart =
336 mesh_.boundaryMesh()[curBPatch].start();
344 reverseAddressing[facei] =
cp[facei] - 1 - curPatchStart;
347 patchFields[curBPatch].rmap
349 procField.boundaryField()[patchi],
356 procField.boundaryField()[patchi];
362 label curF =
cp[facei] - 1;
368 if (curF >= mesh_.nInternalFaces())
371 mesh_.boundaryMesh().whichPatch(curF);
373 if (!patchFields(curBPatch))
380 mesh_.boundary()[curBPatch].type(),
381 mesh_.boundary()[curBPatch],
391 [curBPatch].whichFace(curF);
393 patchFields[curBPatch][curPatchFace] =
399 internalField[curF] = curProcPatch[facei];
407 forAll(mesh_.boundary(), patchi)
412 isType<emptyFvPatch>(mesh_.boundary()[patchi])
413 && !patchFields(patchi)
422 mesh_.boundary()[patchi],
436 procFields[0].dimensions(),
441 tfield.ref().oriented() = procFields[0].oriented();
460 forAll(procMeshes_, proci)
470 procMeshes_[proci].thisDb().time().timeName(),
471 procMeshes_[proci].thisDb(),
480 return reconstructField
485 mesh_.thisDb().time().timeName(),
508 forAll(procMeshes_, proci)
518 procMeshes_[proci].thisDb().time().timeName(),
519 procMeshes_[proci].thisDb(),
528 return reconstructField
533 mesh_.thisDb().time().timeName(),
556 forAll(procMeshes_, proci)
566 procMeshes_[proci].thisDb().time().timeName(),
567 procMeshes_[proci].thisDb(),
576 return reconstructField
581 mesh_.thisDb().time().timeName(),
609 Info<<
" Reconstructing "
610 << fieldType::typeName <<
"s\n" <<
nl;
616 reconstructInternalField<Type>(
io)().
write();
621 if (verbose_ && nFields)
Info<<
endl;
644 Info<<
" Reconstructing "
645 << fieldType::typeName <<
"s\n" <<
nl;
651 reconstructVolumeField<Type>(
io)().
write();
656 if (verbose_ && nFields)
Info<<
endl;
679 Info<<
" Reconstructing "
680 << fieldType::typeName <<
"s\n" <<
nl;
687 reconstructSurfaceField<Type>(
io)().
write();
692 if (verbose_ && nFields)
Info<<
endl;
706 return reconstructInternalFields<Type>
709 selectedFields.
empty()
710 ? objects.
sorted<fieldType>()
711 : objects.
sorted<fieldType>(selectedFields)
726 return reconstructVolumeFields<Type>
729 selectedFields.
empty()
730 ? objects.
sorted<fieldType>()
731 : objects.
sorted<fieldType>(selectedFields)
746 return reconstructSurfaceFields<Type>
749 selectedFields.
empty()
750 ? objects.
sorted<fieldType>()
751 : objects.
sorted<fieldType>(selectedFields)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Mesh & mesh() const
Return mesh.
const Field< Type > & field() const
Return field.
Generic templated field type.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Generic GeometricField class.
List of IOobjects with searching and retrieving facilities.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool isHeaderClass() const
Check if headerClassName() equals Type::typeName.
const word & name() const noexcept
Return the object name.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const T * set(const label i) const
A List obtained as a section of another List.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
This boundary condition provides an 'empty' condition for reduced dimensions cases,...
Foam::emptyFvsPatchField.
Mapper for sizing only - does not do any actual mapping.
tmp< GeometricField< Type, fvPatchField, volMesh > > reconstructVolumeField(const IOobject &fieldObject) const
Read and reconstruct volume field.
label reconstructInternalFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified volume internal fields.
label reconstructVolumeFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified volume fields.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > reconstructSurfaceField(const IOobject &fieldObject) const
Read and reconstruct surface field.
label reconstructSurfaceFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified surface fields.
tmp< DimensionedField< Type, volMesh > > reconstructInternalField(const IOobject &fieldObject) const
Read and reconstruct volume internal field.
tmp< DimensionedField< Type, volMesh > > reconstructField(const IOobject &fieldObject, const PtrList< DimensionedField< Type, volMesh > > &procFields) const
Reconstruct volume internal field.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
label nCells() const noexcept
Number of mesh cells.
A class for managing temporary objects.
A List of wordRe with additional matching capabilities.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
const volScalarField & cp
#define forAll(list, i)
Loop across all elements in list.