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.set(curBPatch))
126 procField.boundaryField()[patchi],
127 mesh_.boundary()[curBPatch],
129 fvPatchFieldReconstructor
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.set(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.set(patchi)
229 mesh_.boundary()[patchi],
239 auto tfield = tmp<GeometricField<Type, fvPatchField, volMesh>>
::New 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());
284 labelList curAddr(procInternalField.size());
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.set(curBPatch))
324 procField.boundaryField()[patchi],
325 mesh_.boundary()[curBPatch],
327 fvPatchFieldReconstructor
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.set(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.set(patchi)
422 mesh_.boundary()[patchi],
432 auto tfield = tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
::New 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();
644 Info<<
" Reconstructing " 645 << fieldType::typeName <<
"s\n" <<
nl;
651 reconstructVolumeField<Type>(
io)().
write();
679 Info<<
" Reconstructing " 680 << fieldType::typeName <<
"s\n" <<
nl;
687 reconstructSurfaceField<Type>(
io)().
write();
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)
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word & name() const noexcept
Return the object name.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy the source to the destination (recursively if necessary).
tmp< GeometricField< Type, fvPatchField, volMesh > > reconstructVolumeField(const IOobject &fieldObject) const
Read and reconstruct volume field.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > reconstructSurfaceField(const IOobject &fieldObject) const
Read and reconstruct surface field.
Generic GeometricField class.
Ignore writing from objectRegistry::writeObject()
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
#define forAll(list, i)
Loop across all elements in list.
static const char *const typeName
Typename for Field.
A List obtained as a section of another List.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
tmp< DimensionedField< Type, volMesh > > reconstructInternalField(const IOobject &fieldObject) const
Read and reconstruct volume internal field.
static const DimensionedField< Type, GeoMesh > & null()
Return a NullObjectRef DimensionedField.
Generic templated field type.
A List of wordRe with additional matching capabilities.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
label reconstructVolumeFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified volume fields.
label reconstructInternalFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified volume internal fields.
const Field< Type > & field() const noexcept
Return const-reference to the field values.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
label nCells() const noexcept
Number of mesh cells.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
tmp< DimensionedField< Type, volMesh > > reconstructField(const IOobject &fieldObject, const PtrList< DimensionedField< Type, volMesh >> &procFields) const
Reconstruct volume internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
messageStream Info
Information stream (stdout output on master, null elsewhere)
label reconstructSurfaceFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified surface fields.
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
static tmp< fvsPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Return a pointer to a new patchField created on freestore given.
bool isHeaderClass() const
Check if headerClassName() equals Type::typeName.