29 #ifndef MapConsistentVolFields_H 30 #define MapConsistentVolFields_H 44 auto& fldBf =
fld.boundaryFieldRef();
61 tgtField.type() == tgtField.
patch().
patch().type()
81 tgtField.type() == tgtField.
patch().
patch().type()
92 fld.mesh().globalData().patchSchedule();
94 for (
const auto& schedEval : patchSchedule)
96 const label patchi = schedEval.patch;
102 tgtField.type() == tgtField.
patch().
patch().type()
120 template<
class Type,
class CombineOp>
123 const IOobjectList& objects,
124 const wordRes& selectedFields,
125 const meshToMesh& interp,
129 typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
131 const fvMesh& meshSource =
static_cast<const fvMesh&
>(interp.srcRegion());
132 const fvMesh& meshTarget =
static_cast<const fvMesh&
>(interp.tgtRegion());
137 selectedFields.empty()
138 ? objects.sortedNames<fieldType>()
139 : objects.sortedNames<fieldType>(selectedFields)
142 for (
const word& fieldName : fieldNames)
144 const fieldType fieldSource(*(objects[fieldName]), meshSource,
false);
149 meshTarget.time().timeName(),
154 if (targetIO.typeHeaderOk<fieldType>(
true))
156 Info<<
" interpolating onto existing field " 157 << fieldName <<
endl;
159 fieldType fieldTarget(targetIO, meshTarget,
false);
161 interp.mapSrcToTgt(fieldSource, cop, fieldTarget);
169 Info<<
" creating new field " 170 << fieldName <<
endl;
174 tmp<fieldType> tfieldTarget
176 interp.mapSrcToTgt(fieldSource, cop)
179 fieldType fieldTarget(targetIO, tfieldTarget);
"blocking" : (MPI_Bsend, MPI_Recv)
commsTypes
Types of communications.
const fvPatch & patch() const noexcept
Return the patch.
static label nRequests() noexcept
Number of outstanding requests.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise the evaluation of the patch field.
Generic GeometricField class.
#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))
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets Updated to false.
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)
messageStream Info
Information stream (stdout output on master, null elsewhere)
void MapVolFields(const IOobjectList &objects, const meshToMesh0 &meshToMesh0Interp, const meshToMesh0::order &mapOrder, const CombineOp &cop)
const polyPatch & patch() const noexcept
Return the polyPatch.