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());
139 selectedFields.empty()
140 ? objects.csorted<fieldType>()
141 : objects.csorted<fieldType>(selectedFields)
145 const fieldType fieldSource(
io, meshSource,
false);
150 meshTarget.time().timeName(),
155 if (targetIO.typeHeaderOk<fieldType>(
true))
157 Info<<
" interpolating onto existing field " 158 << targetIO.name() <<
endl;
160 fieldType fieldTarget(targetIO, meshTarget,
false);
162 interp.mapSrcToTgt(fieldSource, cop, fieldTarget);
170 Info<<
" creating new field " 171 << targetIO.name() <<
endl;
175 tmp<fieldType> tfieldTarget
177 interp.mapSrcToTgt(fieldSource, cop)
180 fieldType fieldTarget(targetIO, tfieldTarget);
"blocking" : (MPI_Bsend, MPI_Recv)
commsTypes
Communications types.
const fvPatch & patch() const noexcept
Return the patch.
const word & name() const noexcept
Return the object name.
static label nRequests() noexcept
Number of outstanding requests (on the internal list of 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.
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))
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets updated() to false.
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)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
const polyPatch & patch() const noexcept
Return the polyPatch.