29 #ifndef Foam_MapConsistentVolFields_H 30 #define Foam_MapConsistentVolFields_H 47 fld.boundaryFieldRef().evaluate_if
49 [](
const auto& pfld) ->
bool 53 pfld.type() == pfld.patch().patch().type()
62 template<
class Type,
class CombineOp>
65 const IOobjectList& objects,
66 const wordRes& selectedFields,
67 const meshToMesh& interp,
71 typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
73 const fvMesh& meshSource =
static_cast<const fvMesh&
>(interp.srcRegion());
74 const fvMesh& meshTarget =
static_cast<const fvMesh&
>(interp.tgtRegion());
81 selectedFields.empty()
82 ? objects.csorted<fieldType>()
83 : objects.csorted<fieldType>(selectedFields)
87 const fieldType fieldSource(
io, meshSource,
false);
92 meshTarget.time().timeName(),
97 if (targetIO.typeHeaderOk<fieldType>(
true))
99 Info<<
" interpolating onto existing field " 100 << targetIO.name() <<
endl;
102 fieldType fieldTarget(targetIO, meshTarget,
false);
104 interp.mapSrcToTgt(fieldSource, cop, fieldTarget);
112 Info<<
" creating new field " 113 << targetIO.name() <<
endl;
117 tmp<fieldType> tfieldTarget
119 interp.mapSrcToTgt(fieldSource, cop)
122 fieldType fieldTarget(targetIO, tfieldTarget);
const word & name() const noexcept
Return the object name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Generic GeometricField class.
void evaluateConstraintTypes(GeometricField< Type, fvPatchField, volMesh > &fld)
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.
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)