65 gStarts[i] = gStarts[i-1] + mesh_.
boundary()[i-1].labelList::size();
77 faceProcAddressing_[procI]
86 if(procMeshes_[procI].
boundary().size() > 0)
88 starts[0] = procMeshes_[procI].nInternalEdges();
91 for(label i=1; i<procMeshes_[procI].boundary().size(); i++)
95 + procMeshes_[procI].boundary()[i-1].labelList::size();
98 forAll(boundaryProcAddressing_[procI], patchI)
101 const label curBPatch = boundaryProcAddressing_[procI][patchI];
114 edgeProcAddressing_[procI],
115 procMeshes_[procI].
boundary()[patchI].size(),
124 if (!patchFields.set(curBPatch))
143 const label curPatchStart = gStarts[curBPatch];
153 reverseAddressing[edgeI] =
cp[edgeI] - curPatchStart;
156 patchFields[curBPatch].rmap
174 label curE =
cp[edgeI];
180 label curBPatch = -1;
190 + mesh_.
boundary()[pI].labelList::size()
198 if (!patchFields.set(curBPatch))
217 label curPatchEdge = curE - gStarts[curBPatch];
219 patchFields[curBPatch][curPatchEdge] =
232 isA<emptyFaPatch>(mesh_.
boundary()[patchI])
233 && !patchFields.set(patchI)
263 procFields[0].dimensions(),
285 labelList gStarts(mesh_.boundary().size(), -1);
287 if(mesh_.boundary().size() > 0)
289 gStarts[0] = mesh_.nInternalEdges();
292 for(label i=1; i<mesh_.boundary().size(); i++)
294 gStarts[i] = gStarts[i-1] + mesh_.boundary()[i-1].labelList::size();
298 forAll(procMeshes_, procI)
300 const GeometricField<Type, faePatchField, edgeMesh>& procField =
309 labelList curAddr(edgeProcAddressing_[procI]);
318 procField.internalField(),
327 if(procMeshes_[procI].
boundary().size() > 0)
329 starts[0] = procMeshes_[procI].nInternalEdges();
332 for(label i=1; i<procMeshes_[procI].boundary().size(); i++)
336 + procMeshes_[procI].boundary()[i-1].labelList::size();
339 forAll(boundaryProcAddressing_[procI], patchI)
342 const label curBPatch = boundaryProcAddressing_[procI][patchI];
355 edgeProcAddressing_[procI],
356 procMeshes_[procI].
boundary()[patchI].size(),
365 if (!patchFields.set(curBPatch))
372 procField.boundaryField()[patchI],
373 mesh_.boundary()[curBPatch],
375 faPatchFieldReconstructor
377 mesh_.boundary()[curBPatch].size(),
378 procField.boundaryField()[patchI].size()
384 const label curPatchStart = gStarts[curBPatch];
394 reverseAddressing[edgeI] =
cp[edgeI] - curPatchStart;
397 patchFields[curBPatch].rmap
399 procField.boundaryField()[patchI],
405 const Field<Type>& curProcPatch =
406 procField.boundaryField()[patchI];
413 label curE =
cp[edgeI];
419 if (curE >= mesh_.nInternalEdges())
424 label curBPatch = -1;
426 forAll(mesh_.boundary(), pI)
434 + mesh_.boundary()[pI].labelList::size()
442 if (!patchFields.set(curBPatch))
449 mesh_.boundary()[curBPatch].type(),
450 mesh_.boundary()[curBPatch],
462 label curPatchEdge = curE - gStarts[curBPatch];
464 patchFields[curBPatch][curPatchEdge] =
470 internalField[curE] = curProcPatch[edgeI];
478 forAll(mesh_.boundary(), patchI)
483 isA<emptyFaPatch>(mesh_.boundary()[patchI])
484 && !patchFields.set(patchI)
493 mesh_.boundary()[patchI],
503 return tmp<GeometricField<Type, faePatchField, edgeMesh>>
::New 508 mesh_.thisDb().time().timeName(),
514 procFields[0].dimensions(),
534 forAll(procMeshes_, proci)
544 procMeshes_[proci].thisDb().time().timeName(),
545 procMeshes_[proci].thisDb(),
554 return reconstructField
559 mesh_.thisDb().time().timeName(),
582 forAll(procMeshes_, proci)
592 procMeshes_[proci].thisDb().time().timeName(),
593 procMeshes_[proci].thisDb(),
602 return reconstructField
607 mesh_.thisDb().time().timeName(),
635 Info<<
" Reconstructing " 636 << fieldType::typeName <<
"s\n" <<
nl;
642 reconstructAreaField<Type>(
io)().
write();
670 Info<<
" Reconstructing " 671 << fieldType::typeName <<
"s\n" <<
nl;
677 reconstructEdgeField<Type>(
io)().
write();
696 return reconstructAreaFields<Type>
699 selectedFields.
empty()
700 ? objects.
sorted<fieldType>()
701 : objects.
sorted<fieldType>(selectedFields)
716 return reconstructEdgeFields<Type>
719 selectedFields.
empty()
720 ? objects.
sorted<fieldType>()
721 : 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.
tmp< GeometricField< Type, faePatchField, edgeMesh > > reconstructEdgeField(const IOobject &fieldObject)
Read and reconstruct edge field.
const word & name() const noexcept
Return the object name.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
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).
label reconstructEdgeFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified edge fields.
Generic GeometricField class.
SubList< label > subList
Declare type of subList.
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.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
virtual const objectRegistry & thisDb() const
Return reference to the mesh database.
label nFaces() const noexcept
Number of patch faces.
tmp< GeometricField< Type, faPatchField, areaMesh > > reconstructField(const IOobject &fieldObject, const PtrList< GeometricField< Type, faPatchField, areaMesh >> &) const
Reconstruct area field.
#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)
static const DimensionedField< Type, GeoMesh > & null()
Return a NullObjectRef DimensionedField.
Generic templated field type.
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
const Time & time() const noexcept
Return time registry.
label size() const noexcept
The number of elements in the list.
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...
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
tmp< GeometricField< Type, faPatchField, areaMesh > > reconstructAreaField(const IOobject &fieldObject)
Read and reconstruct area field.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
label nInternalEdges() const noexcept
Number of internal faces.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
label reconstructAreaFields(const UPtrList< const IOobject > &fieldObjects)
Read, reconstruct and write specified area fields.
static tmp< faePatchField< Type > > New(const word &patchFieldType, const faPatch &, const DimensionedField< Type, edgeMesh > &)
Return a pointer to a new patchField created on freestore given.
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< label > labelList
A List of labels.
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
bool isHeaderClass() const
Check if headerClassName() equals Type::typeName.