56 if (tgtMesh_.
boundary().
size() && patchEdgeMaps_.empty())
85 internalField.oriented() =
fld.oriented();
92 const auto& bfld =
fld.boundaryField();
96 if (patchEdgeMaps_.test(patchi))
103 patchEdgeMaps_[patchi]
123 forAll(newPatchFields, patchi)
125 if (!newPatchFields.set(patchi))
143 std::move(internalField),
146 auto& result = tresult.ref();
148 result.boundaryFieldRef().template evaluateCoupled<processorFaPatch>();
165 if (!internalEdgeMap_)
167 createInternalEdgeMap();
179 DimensionedField<Type, edgeMesh> internalField
184 tgtMesh_.time().timeName(),
192 Field<Type>(
fld.internalField(), mapper)
195 internalField.oriented() =
fld.oriented();
200 PtrList<PatchFieldType> newPatchFields(tgtMesh_.boundary().size());
202 const auto& bfld =
fld.boundaryField();
206 if (patchEdgeMaps_.test(patchi))
213 patchEdgeMaps_[patchi]
223 tgtMesh_.boundary()[patchi],
233 forAll(newPatchFields, patchi)
235 if (!newPatchFields.set(patchi))
243 tgtMesh_.boundary()[patchi],
251 return tmp<GeometricField<Type, faePatchField, edgeMesh>>
::New 253 std::move(internalField),
274 return distributeField(
fld);
293 return distributeField(
fld);
312 selectedFields.
empty()
313 ? objects.
sorted<fieldType>()
314 : objects.
sorted<fieldType>(selectedFields)
322 Info<<
" Reconstructing " 323 << fieldType::typeName <<
"s\n" <<
nl;
329 tmp<fieldType> tfld(distributeAreaField<Type>(
io));
356 selectedFields.
empty()
357 ? objects.
sorted<fieldType>()
358 : objects.
sorted<fieldType>(selectedFields)
366 Info<<
" Reconstructing " 367 << fieldType::typeName <<
"s\n" <<
nl;
380 if (nFields && verbose_)
Info<<
endl;
388 void Foam::faMeshDistributor::redistributeAndWrite
390 PtrList<GeometricField<Type, faPatchField, areaMesh>>& flds
393 for (
auto&
fld : flds)
397 tmp<GeometricField<Type, faPatchField, areaMesh>> tfld =
398 this->distributeField(
fld);
409 void Foam::faMeshDistributor::redistributeAndWrite
411 PtrList<GeometricField<Type, faePatchField, edgeMesh>>& flds
414 for (
auto&
fld : flds)
416 tmp<GeometricField<Type, faePatchField, edgeMesh>> tfld =
417 this->distributeField(
fld);
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.
const Time & time() const
Return reference to time.
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.
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.
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.
virtual const objectRegistry & thisDb() const
Return reference to the mesh database.
#define forAll(list, i)
Loop across all elements in list.
static const char *const typeName
Typename for Field.
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.
label size() const noexcept
The number of elements 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 time name of given scalar time 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.
static const UList< label > & null()
Return a UList reference to a nullObject.
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.
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))
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...
messageStream Info
Information stream (stdout output on master, null elsewhere)
DistributedFieldMapper< directFaPatchFieldMapper > distributedFaPatchFieldMapper
A directFaPatchFieldMapper with direct mapping from local or remote quantities.
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...
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.