34 void Foam::functionObjects::mapFields::evaluateConstraintTypes
36 GeometricField<Type, fvPatchField, volMesh>&
fld 39 auto& bfld =
fld.boundaryFieldRef();
51 for (
auto& pfld : bfld)
55 pfld.type() == pfld.patch().patch().type()
59 pfld.initEvaluate(commsType);
66 for (
auto& pfld : bfld)
70 pfld.type() == pfld.patch().patch().type()
74 pfld.evaluate(commsType);
81 fld.mesh().globalData().patchSchedule();
83 for (
const auto& schedEval : patchSchedule)
85 const label patchi = schedEval.patch;
86 auto& pfld = bfld[patchi];
90 pfld.type() == pfld.patch().patch().type()
96 pfld.initEvaluate(commsType);
100 pfld.evaluate(commsType);
109 bool Foam::functionObjects::mapFields::mapFieldType()
const 111 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
113 const fvMesh& mapRegion = mapRegionPtr_();
115 wordList fieldNames(this->mesh_.sortedNames<VolFieldType>(fieldNames_));
117 const bool processed = !fieldNames.empty();
119 for (
const word& fieldName : fieldNames)
121 const VolFieldType&
field = lookupObject<VolFieldType>(fieldName);
123 auto* mapFieldPtr = mapRegion.getObjectPtr<VolFieldType>(fieldName);
127 mapFieldPtr =
new VolFieldType
139 dimensioned<Type>(
field.dimensions(),
Zero)
142 mapFieldPtr->store();
145 auto& mappedField = *mapFieldPtr;
147 mappedField = interpPtr_->mapTgtToSrc(
field);
149 Log <<
" " << fieldName <<
": interpolated";
159 bool Foam::functionObjects::mapFields::writeFieldType()
const 161 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
163 const fvMesh& mapRegion = mapRegionPtr_();
165 wordList fieldNames(this->mesh_.sortedNames<VolFieldType>(fieldNames_));
167 const bool processed = !fieldNames.empty();
169 for (
const word& fieldName : fieldNames)
171 const VolFieldType& mappedField =
172 mapRegion.template lookupObject<VolFieldType>(fieldName);
176 Log <<
" " << fieldName <<
": written";
commsTypes
Communications types.
static label nRequests() noexcept
Number of outstanding requests (on the internal list of requests)
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Ignore writing from objectRegistry::writeObject()
static void waitRequests()
Wait for all requests to finish.
void evaluateConstraintTypes(GeometricField< Type, fvPatchField, volMesh > &fld)
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
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))
List< word > wordList
List of word.
static commsTypes defaultCommsType
Default commsType.
static bool constraintType(const word &patchType)
Return true if the given type is a constraint type.
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
"buffered" : (MPI_Bsend, MPI_Recv)
Request registration (bool: true)
static constexpr const zero Zero
Global zero (0)