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_.names(VolFieldType::typeName));
124 const labelList selected(fieldNames_.matching(fieldNames));
126 for (
const label fieldi : selected)
128 const word& fieldName = fieldNames[fieldi];
130 const VolFieldType&
field = lookupObject<VolFieldType>(fieldName);
132 if (!mapRegion.foundObject<VolFieldType>(fieldName))
134 VolFieldType* tmappedField =
146 dimensioned<Type>(
field.dimensions(),
Zero)
149 tmappedField->store();
152 VolFieldType& mappedField =
153 mapRegion.template lookupObjectRef<VolFieldType>(fieldName);
155 mappedField = interpPtr_->mapTgtToSrc(
field);
157 Log <<
" " << fieldName <<
": interpolated";
162 return !selected.empty();
167 bool Foam::functionObjects::mapFields::writeFieldType()
const 169 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
171 const fvMesh& mapRegion = mapRegionPtr_();
173 wordList fieldNames(this->mesh_.names(VolFieldType::typeName));
175 const labelList selected(fieldNames_.matching(fieldNames));
177 for (
const label fieldi : selected)
179 const word& fieldName = fieldNames[fieldi];
181 const VolFieldType& mappedField =
182 mapRegion.template lookupObject<VolFieldType>(fieldName);
186 Log <<
" " << fieldName <<
": written";
189 return !selected.empty();
"blocking" : (MPI_Bsend, MPI_Recv)
commsTypes
Types of communications.
static label nRequests() noexcept
Number of outstanding requests.
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Ignore writing from objectRegistry::writeObject()
#define forAll(list, i)
Loop across all elements in list.
void evaluateConstraintTypes(GeometricField< Type, fvPatchField, volMesh > &fld)
"scheduled" : (MPI_Send, MPI_Recv)
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
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
A List of words.
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)
List< label > labelList
A List of labels.
static constexpr const zero Zero
Global zero (0)