52 if (tgtMesh_.
boundary().
size() && patchEdgeMaps_.empty())
81 internalField.oriented() =
fld.oriented();
88 const auto& bfld =
fld.boundaryField();
92 if (patchEdgeMaps_.test(patchi))
99 patchEdgeMaps_[patchi]
119 forAll(newPatchFields, patchi)
121 if (!newPatchFields.set(patchi))
139 std::move(internalField),
142 auto& result = tresult.ref();
144 result.boundaryFieldRef().template evaluateCoupled<processorFaPatch>();
157 if (!internalEdgeMapPtr_)
159 createInternalEdgeMap();
168 *(internalEdgeMapPtr_)
171 DimensionedField<Type, edgeMesh> internalField
176 tgtMesh_.time().timeName(),
184 Field<Type>(
fld.internalField(), mapper)
187 internalField.oriented() =
fld.oriented();
192 PtrList<faePatchField<Type>> newPatchFields(tgtMesh_.boundary().size());
194 const auto& bfld =
fld.boundaryField();
198 if (patchEdgeMaps_.test(patchi))
205 patchEdgeMaps_[patchi]
215 tgtMesh_.boundary()[patchi],
225 forAll(newPatchFields, patchi)
227 if (!newPatchFields.set(patchi))
235 tgtMesh_.boundary()[patchi],
243 return tmp<GeometricField<Type, faePatchField, edgeMesh>>
::New 245 std::move(internalField),
266 return distributeField(
fld);
285 return distributeField(
fld);
304 selectedFields.
empty()
306 : objects.
csorted<fieldType>(selectedFields)
314 Info<<
" Reconstructing " 315 << fieldType::typeName <<
"s\n" <<
nl;
321 tmp<fieldType> tfld(distributeAreaField<Type>(
io));
323 if (isWriteProc_.good())
330 else if (writeHandler_ && writeHandler_->good())
362 selectedFields.
empty()
364 : objects.
csorted<fieldType>(selectedFields)
372 Info<<
" Reconstructing " 373 << fieldType::typeName <<
"s\n" <<
nl;
380 if (isWriteProc_.good())
387 else if (writeHandler_ && writeHandler_->good())
399 if (nFields && verbose_)
Info<<
endl;
407 void Foam::faMeshDistributor::redistributeAndWrite
409 PtrList<GeometricField<Type, faPatchField, areaMesh>>& flds
412 for (
auto&
fld : flds)
416 tmp<GeometricField<Type, faPatchField, areaMesh>> tfld =
417 this->distributeField(
fld);
419 if (isWriteProc_.good())
426 else if (writeHandler_ && writeHandler_->good())
441 void Foam::faMeshDistributor::redistributeAndWrite
443 PtrList<GeometricField<Type, faePatchField, edgeMesh>>& flds
446 for (
auto&
fld : flds)
448 tmp<GeometricField<Type, faePatchField, edgeMesh>> tfld =
449 this->distributeField(
fld);
451 if (isWriteProc_.good())
458 else if (writeHandler_ && writeHandler_->good())
label distributeEdgeFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected area 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.
static const word & emptyType() noexcept
The type name for empty patch fields.
static const DimensionedField< Type, GeoMesh > & null() noexcept
Return a null DimensionedField (reference to a nullObject).
const Time & time() const
Return reference to time.
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.
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.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler()
Generic GeometricField class.
Ignore writing from objectRegistry::writeObject()
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
tmp< GeometricField< Type, faePatchField, edgeMesh > > distributeEdgeField(const IOobject &fieldObject) const
Read and distribute edge field.
Declarations for faPatchField types.
virtual const objectRegistry & thisDb() const
Reference to the mesh database.
#define forAll(list, i)
Loop across all elements in list.
Declarations for faePatchField types.
Generic templated field type.
label size() const noexcept
The number of entries in the list.
A List of wordRe with additional matching capabilities.
const mapDistribute & cellMap() const noexcept
Cell distribute map.
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.
A templated field mapper with direct mapping from local or remote quantities.
DistributedFieldMapper< directFieldMapper > distributedFieldMapper
A directFieldMapper with distributed (with local or remote) quantities.
label distributeAreaFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
Read, distribute and write all/selected area fields.
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
static label commWorld() noexcept
Communicator for all ranks (respecting any local worlds)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static const word & emptyType() noexcept
The type name for empty patch fields.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static const UList< label > & null() noexcept
Return a null UList (reference to a nullObject). Behaves like an empty UList.
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)
DistributedFieldMapper< directFaPatchFieldMapper > distributedFaPatchFieldMapper
A directFaPatchFieldMapper with direct mapping from local or remote quantities.
static const fileOperation & fileHandler()
Return the current file handler. Will create the default file handler if necessary.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
tmp< GeometricField< Type, faPatchField, areaMesh > > distributeField(const GeometricField< Type, faPatchField, areaMesh > &fld) const
Distribute area field.
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.
tmp< GeometricField< Type, faPatchField, areaMesh > > distributeAreaField(const IOobject &fieldObject) const
Read and distribute area field.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.