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()
314 : objects.
csorted<fieldType>(selectedFields)
322 Info<<
" Reconstructing " 323 << fieldType::typeName <<
"s\n" <<
nl;
329 tmp<fieldType> tfld(distributeAreaField<Type>(
io));
331 if (isWriteProc_.good())
338 else if (writeHandler_ && writeHandler_->good())
370 selectedFields.
empty()
372 : objects.
csorted<fieldType>(selectedFields)
380 Info<<
" Reconstructing " 381 << fieldType::typeName <<
"s\n" <<
nl;
388 if (isWriteProc_.good())
395 else if (writeHandler_ && writeHandler_->good())
407 if (nFields && verbose_)
Info<<
endl;
415 void Foam::faMeshDistributor::redistributeAndWrite
417 PtrList<GeometricField<Type, faPatchField, areaMesh>>& flds
420 for (
auto&
fld : flds)
424 tmp<GeometricField<Type, faPatchField, areaMesh>> tfld =
425 this->distributeField(
fld);
427 if (isWriteProc_.good())
434 else if (writeHandler_ && writeHandler_->good())
449 void Foam::faMeshDistributor::redistributeAndWrite
451 PtrList<GeometricField<Type, faePatchField, edgeMesh>>& flds
454 for (
auto&
fld : flds)
456 tmp<GeometricField<Type, faePatchField, edgeMesh>> tfld =
457 this->distributeField(
fld);
459 if (isWriteProc_.good())
466 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.
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.
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.
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 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.
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.
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))
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.
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.