64 gStarts[i] = gStarts[i-1] + mesh_.
boundary()[i-1].labelList::size();
76 faceProcAddressing_[procI]
85 if(procMeshes_[procI].
boundary().size() > 0)
87 starts[0] = procMeshes_[procI].nInternalEdges();
90 for(label i=1; i<procMeshes_[procI].boundary().size(); i++)
94 + procMeshes_[procI].boundary()[i-1].labelList::size();
97 forAll(boundaryProcAddressing_[procI], patchI)
100 const label curBPatch = boundaryProcAddressing_[procI][patchI];
113 edgeProcAddressing_[procI],
114 procMeshes_[procI].
boundary()[patchI].size(),
123 if (!patchFields.set(curBPatch))
142 const label curPatchStart = gStarts[curBPatch];
152 reverseAddressing[edgeI] =
cp[edgeI] - curPatchStart;
155 patchFields[curBPatch].rmap
173 label curE =
cp[edgeI];
179 label curBPatch = -1;
189 + mesh_.
boundary()[pI].labelList::size()
197 if (!patchFields.set(curBPatch))
216 label curPatchEdge = curE - gStarts[curBPatch];
218 patchFields[curBPatch][curPatchEdge] =
231 isA<emptyFaPatch>(mesh_.
boundary()[patchI])
232 && !patchFields.set(patchI)
262 procFields[0].dimensions(),
284 labelList gStarts(mesh_.boundary().size(), -1);
286 if(mesh_.boundary().size() > 0)
288 gStarts[0] = mesh_.nInternalEdges();
291 for(label i=1; i<mesh_.boundary().size(); i++)
293 gStarts[i] = gStarts[i-1] + mesh_.boundary()[i-1].labelList::size();
297 forAll(procMeshes_, procI)
299 const GeometricField<Type, faePatchField, edgeMesh>& procField =
308 labelList curAddr(edgeProcAddressing_[procI]);
317 procField.internalField(),
326 if(procMeshes_[procI].
boundary().size() > 0)
328 starts[0] = procMeshes_[procI].nInternalEdges();
331 for(label i=1; i<procMeshes_[procI].boundary().size(); i++)
335 + procMeshes_[procI].boundary()[i-1].labelList::size();
338 forAll(boundaryProcAddressing_[procI], patchI)
341 const label curBPatch = boundaryProcAddressing_[procI][patchI];
354 edgeProcAddressing_[procI],
355 procMeshes_[procI].
boundary()[patchI].size(),
364 if (!patchFields.set(curBPatch))
371 procField.boundaryField()[patchI],
372 mesh_.boundary()[curBPatch],
374 faPatchFieldReconstructor
376 mesh_.boundary()[curBPatch].size(),
377 procField.boundaryField()[patchI].size()
383 const label curPatchStart = gStarts[curBPatch];
393 reverseAddressing[edgeI] =
cp[edgeI] - curPatchStart;
396 patchFields[curBPatch].rmap
398 procField.boundaryField()[patchI],
404 const Field<Type>& curProcPatch =
405 procField.boundaryField()[patchI];
412 label curE =
cp[edgeI];
418 if (curE >= mesh_.nInternalEdges())
423 label curBPatch = -1;
425 forAll(mesh_.boundary(), pI)
433 + mesh_.boundary()[pI].labelList::size()
441 if (!patchFields.set(curBPatch))
448 mesh_.boundary()[curBPatch].type(),
449 mesh_.boundary()[curBPatch],
460 label curPatchEdge = curE - gStarts[curBPatch];
462 patchFields[curBPatch][curPatchEdge] =
468 internalField[curE] = curProcPatch[edgeI];
476 forAll(mesh_.boundary(), patchI)
481 isA<emptyFaPatch>(mesh_.boundary()[patchI])
482 && !patchFields.set(patchI)
491 mesh_.boundary()[patchI],
501 return tmp<GeometricField<Type, faePatchField, edgeMesh>>
::New 506 mesh_.thisDb().time().timeName(),
512 procFields[0].dimensions(),
532 forAll(procMeshes_, proci)
542 procMeshes_[proci].thisDb().time().timeName(),
543 procMeshes_[proci].thisDb(),
552 return reconstructField
557 mesh_.thisDb().time().timeName(),
580 forAll(procMeshes_, proci)
590 procMeshes_[proci].thisDb().time().timeName(),
591 procMeshes_[proci].thisDb(),
600 return reconstructField
605 mesh_.thisDb().time().timeName(),
633 Info<<
" Reconstructing " 634 << fieldType::typeName <<
"s\n" <<
nl;
640 reconstructAreaField<Type>(
io)().
write();
668 Info<<
" Reconstructing " 669 << fieldType::typeName <<
"s\n" <<
nl;
675 reconstructEdgeField<Type>(
io)().
write();
694 return reconstructAreaFields<Type>
697 selectedFields.
empty()
699 : objects.
csorted<fieldType>(selectedFields)
714 return reconstructEdgeFields<Type>
717 selectedFields.
empty()
719 : objects.
csorted<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.
static const word & emptyType() noexcept
The type name for empty patch fields.
tmp< GeometricField< Type, faePatchField, edgeMesh > > reconstructEdgeField(const IOobject &fieldObject)
Read and reconstruct edge field.
static const DimensionedField< Type, GeoMesh > & null() noexcept
Return a null DimensionedField (reference to a nullObject).
const word & name() const noexcept
Return the object name.
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 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.
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()
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
label nFaces() const noexcept
Number of patch faces.
Declarations for faPatchField types.
tmp< GeometricField< Type, faPatchField, areaMesh > > reconstructField(const IOobject &fieldObject, const PtrList< GeometricField< Type, faPatchField, areaMesh >> &) const
Reconstruct area field.
virtual const objectRegistry & thisDb() const
Reference to the mesh database.
#define forAll(list, i)
Loop across all elements in list.
A List obtained as a section of another List.
Declarations for faePatchField types.
Generic templated field type.
const Time & time() const noexcept
Return time registry.
label size() const noexcept
The number of entries 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 a time name for the given scalar time value 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.
static const word & emptyType() noexcept
The type name for empty patch fields.
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.
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.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
bool isHeaderClass() const
Check if headerClassName() equals Type::typeName.