29 #ifndef Foam_MapConsistentVolFields_H 30 #define Foam_MapConsistentVolFields_H 44 auto& bfld =
fld.boundaryFieldRef();
56 for (
auto& pfld : bfld)
60 pfld.type() == pfld.patch().patch().type()
64 pfld.initEvaluate(commsType);
71 for (
auto& pfld : bfld)
75 pfld.type() == pfld.patch().patch().type()
79 pfld.evaluate(commsType);
86 fld.mesh().globalData().patchSchedule();
88 for (
const auto& schedEval : patchSchedule)
90 const label patchi = schedEval.patch;
91 auto& pfld = bfld[patchi];
95 pfld.type() == pfld.patch().patch().type()
101 pfld.initEvaluate(commsType);
105 pfld.evaluate(commsType);
113 template<
class Type,
class CombineOp>
116 const IOobjectList& objects,
117 const wordRes& selectedFields,
118 const meshToMesh& interp,
122 typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
124 const fvMesh& meshSource =
static_cast<const fvMesh&
>(interp.srcRegion());
125 const fvMesh& meshTarget =
static_cast<const fvMesh&
>(interp.tgtRegion());
132 selectedFields.empty()
133 ? objects.csorted<fieldType>()
134 : objects.csorted<fieldType>(selectedFields)
138 const fieldType fieldSource(
io, meshSource,
false);
143 meshTarget.time().timeName(),
148 if (targetIO.typeHeaderOk<fieldType>(
true))
150 Info<<
" interpolating onto existing field " 151 << targetIO.name() <<
endl;
153 fieldType fieldTarget(targetIO, meshTarget,
false);
155 interp.mapSrcToTgt(fieldSource, cop, fieldTarget);
163 Info<<
" creating new field " 164 << targetIO.name() <<
endl;
168 tmp<fieldType> tfieldTarget
170 interp.mapSrcToTgt(fieldSource, cop)
173 fieldType fieldTarget(targetIO, tfieldTarget);
commsTypes
Communications types.
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.
Generic GeometricField class.
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))
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)
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)
"buffered" : (MPI_Bsend, MPI_Recv)