34 void Foam::functionObjects::mapFields::evaluateConstraintTypes
36 GeometricField<Type, fvPatchField, volMesh>&
fld 39 auto& fldBf =
fld.boundaryFieldRef();
52 fvPatchField<Type>& tgtField = fldBf[patchi];
56 tgtField.type() == tgtField.patch().patch().type()
60 tgtField.initEvaluate(commsType);
72 fvPatchField<Type>& tgtField = fldBf[patchi];
76 tgtField.type() == tgtField.patch().patch().type()
80 tgtField.evaluate(commsType);
87 fld.mesh().globalData().patchSchedule();
89 for (
const auto& schedEval : patchSchedule)
91 const label patchi = schedEval.patch;
93 fvPatchField<Type>& tgtField = fldBf[patchi];
97 tgtField.type() == tgtField.patch().patch().type()
103 tgtField.initEvaluate(commsType);
107 tgtField.evaluate(commsType);
116 bool Foam::functionObjects::mapFields::mapFieldType()
const 118 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
120 const fvMesh& mapRegion = mapRegionPtr_();
122 wordList fieldNames(this->mesh_.sortedNames<VolFieldType>(fieldNames_));
124 const bool processed = !fieldNames.empty();
126 for (
const word& fieldName : fieldNames)
128 const VolFieldType&
field = lookupObject<VolFieldType>(fieldName);
130 auto* mapFieldPtr = mapRegion.getObjectPtr<VolFieldType>(fieldName);
134 mapFieldPtr =
new VolFieldType
146 dimensioned<Type>(
field.dimensions(),
Zero)
149 mapFieldPtr->store();
152 auto& mappedField = *mapFieldPtr;
154 mappedField = interpPtr_->mapTgtToSrc(
field);
156 Log <<
" " << fieldName <<
": interpolated";
166 bool Foam::functionObjects::mapFields::writeFieldType()
const 168 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
170 const fvMesh& mapRegion = mapRegionPtr_();
172 wordList fieldNames(this->mesh_.sortedNames<VolFieldType>(fieldNames_));
174 const bool processed = !fieldNames.empty();
176 for (
const word& fieldName : fieldNames)
178 const VolFieldType& mappedField =
179 mapRegion.template lookupObject<VolFieldType>(fieldName);
183 Log <<
" " << fieldName <<
": written";
"blocking" : (MPI_Bsend, MPI_Recv)
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.
#define forAll(list, i)
Loop across all elements in list.
void evaluateConstraintTypes(GeometricField< Type, fvPatchField, volMesh > &fld)
"scheduled" : (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" : (MPI_Isend, MPI_Irecv)
Request registration (bool: true)
static constexpr const zero Zero
Global zero (0)