57 cellProcAddressing_[proci]
65 procFields[0].dimensions(),
69 tfield.ref().oriented() = procFields[0].oriented();
91 const auto& procField = procFields[proci];
96 procField.primitiveField(),
97 cellProcAddressing_[proci]
101 forAll(boundaryProcAddressing_[proci], patchi)
104 const label curBPatch = boundaryProcAddressing_[proci][patchi];
108 procField.mesh().boundary()[patchi].patchSlice
110 faceProcAddressing_[proci]
118 if (!patchFields.set(curBPatch))
125 procField.boundaryField()[patchi],
126 mesh_.boundary()[curBPatch],
128 fvPatchFieldReconstructor
130 mesh_.boundary()[curBPatch].size()
136 const label curPatchStart =
137 mesh_.boundaryMesh()[curBPatch].start();
147 <<
"Processor " << proci
149 << procField.mesh().boundary()[patchi].name()
151 <<
" originates from reversed face since " 158 reverseAddressing[facei] =
cp[facei] - 1 - curPatchStart;
162 patchFields[curBPatch].rmap
164 procField.boundaryField()[patchi],
171 procField.boundaryField()[patchi];
179 label curF =
cp[facei] - 1;
182 if (curF >= mesh_.nInternalFaces())
184 label curBPatch = mesh_.boundaryMesh().whichPatch(curF);
186 if (!patchFields.set(curBPatch))
193 mesh_.boundary()[curBPatch].type(),
194 mesh_.boundary()[curBPatch],
203 [curBPatch].whichFace(curF);
205 patchFields[curBPatch][curPatchFace] =
213 forAll(mesh_.boundary(), patchi)
218 isType<emptyFvPatch>(mesh_.boundary()[patchi])
219 && !patchFields.set(patchi)
228 mesh_.boundary()[patchi],
238 auto tfield = tmp<GeometricField<Type, fvPatchField, volMesh>>
::New 242 procFields[0].dimensions(),
247 tfield.ref().oriented() = procFields[0].oriented();
268 forAll(procMeshes_, proci)
270 const auto& procField = procFields[proci];
281 Field<Type> procInternalField(procField.primitiveField());
283 labelList curAddr(procInternalField.size());
285 forAll(procInternalField, addrI)
290 procInternalField[addrI] = -procInternalField[addrI];
295 internalField.rmap(procInternalField, curAddr);
299 forAll(boundaryProcAddressing_[proci], patchi)
302 const label curBPatch = boundaryProcAddressing_[proci][patchi];
306 procMeshes_[proci].boundary()[patchi].patchSlice
308 faceProcAddressing_[proci]
316 if (!patchFields.set(curBPatch))
323 procField.boundaryField()[patchi],
324 mesh_.boundary()[curBPatch],
326 fvPatchFieldReconstructor
328 mesh_.boundary()[curBPatch].size()
334 const label curPatchStart =
335 mesh_.boundaryMesh()[curBPatch].start();
343 reverseAddressing[facei] =
cp[facei] - 1 - curPatchStart;
346 patchFields[curBPatch].rmap
348 procField.boundaryField()[patchi],
355 procField.boundaryField()[patchi];
361 label curF =
cp[facei] - 1;
367 if (curF >= mesh_.nInternalFaces())
370 mesh_.boundaryMesh().whichPatch(curF);
372 if (!patchFields.set(curBPatch))
379 mesh_.boundary()[curBPatch].type(),
380 mesh_.boundary()[curBPatch],
389 [curBPatch].whichFace(curF);
391 patchFields[curBPatch][curPatchFace] =
397 internalField[curF] = curProcPatch[facei];
405 forAll(mesh_.boundary(), patchi)
410 isType<emptyFvPatch>(mesh_.boundary()[patchi])
411 && !patchFields.set(patchi)
420 mesh_.boundary()[patchi],
430 auto tfield = tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
::New 434 procFields[0].dimensions(),
439 tfield.ref().oriented() = procFields[0].oriented();
458 forAll(procMeshes_, proci)
468 procMeshes_[proci].thisDb().time().timeName(),
469 procMeshes_[proci].thisDb(),
478 return reconstructField
483 mesh_.thisDb().time().timeName(),
506 forAll(procMeshes_, proci)
516 procMeshes_[proci].thisDb().time().timeName(),
517 procMeshes_[proci].thisDb(),
526 return reconstructField
531 mesh_.thisDb().time().timeName(),
554 forAll(procMeshes_, proci)
564 procMeshes_[proci].thisDb().time().timeName(),
565 procMeshes_[proci].thisDb(),
574 return reconstructField
579 mesh_.thisDb().time().timeName(),
607 Info<<
" Reconstructing " 608 << fieldType::typeName <<
"s\n" <<
nl;
614 reconstructInternalField<Type>(
io)().
write();
642 Info<<
" Reconstructing " 643 << fieldType::typeName <<
"s\n" <<
nl;
649 reconstructVolumeField<Type>(
io)().
write();
677 Info<<
" Reconstructing " 678 << fieldType::typeName <<
"s\n" <<
nl;
685 reconstructSurfaceField<Type>(
io)().
write();
704 return reconstructInternalFields<Type>
707 selectedFields.
empty()
709 : objects.
csorted<fieldType>(selectedFields)
724 return reconstructVolumeFields<Type>
727 selectedFields.
empty()
729 : objects.
csorted<fieldType>(selectedFields)
744 return reconstructSurfaceFields<Type>
747 selectedFields.
empty()
749 : objects.
csorted<fieldType>(selectedFields)
static const word & emptyType() noexcept
The type name for empty patch fields.
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...
static const word & emptyType() noexcept
The type name for empty patch fields.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const DimensionedField< Type, GeoMesh > & null() noexcept
Return a null DimensionedField (reference to a nullObject).
const word & name() const noexcept
Return the object name.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List 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< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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()
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.
A List obtained as a section of another List.
tmp< DimensionedField< Type, volMesh > > reconstructInternalField(const IOobject &fieldObject) const
Read and reconstruct volume internal field.
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.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
UPtrList< const IOobject > csorted() const
The sorted list of IOobjects with headerClassName == Type::typeName.
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.