40 const fvMeshToFvMesh& interp,
42 const HashSet<word>& selectedFields,
46 const fvMesh& srcMesh =
static_cast<const fvMesh&
>(interp.srcMesh());
47 const fvMesh& tgtMesh =
static_cast<const fvMesh&
>(interp.tgtMesh());
53 const word& fieldName = fieldIter()->name();
55 if (!selectedFields.empty() && !selectedFields.found(fieldName))
60 const VolField<Type> fieldSource(*fieldIter(), srcMesh);
62 typeIOobject<VolField<Type>> targetIO
65 tgtMesh.time().name(),
71 if (targetIO.headerOk() && interp.consistent())
74 <<
"Mapping of field " << fieldName <<
" will not utilise "
75 <<
"the corresponding field in the target case, as the map is "
76 <<
"consistent (i.e., all patches are mapped)" <<
endl;
78 if (!targetIO.headerOk() && !interp.consistent())
81 <<
"Cannot map field " << fieldName <<
" because the "
82 <<
"map is not consistent (i.e., not all patches are "
83 <<
"mapped), and there is no corresponding field in "
84 <<
"the target case" <<
endl;
87 if (!targetIO.headerOk() && !cuttingPatches.empty())
90 <<
"Cutting patches will not be used for field " << fieldName
91 <<
" because no there is no corresponding field in the target "
95 if (targetIO.headerOk())
97 Info<<
" mapping into existing field " << fieldName <<
endl;
99 VolField<Type> fieldTarget(targetIO, tgtMesh);
103 interp.srcToTgt(fieldSource, fieldTarget, cuttingPatches)
110 Info<<
" creating new field " << fieldName <<
endl;
112 VolField<Type>(targetIO, interp.srcToTgt(fieldSource)).
write();
123 const fvMeshToFvMesh& interp,
125 const HashSet<word>& selectedFields,
126 const bool noLagrangian
130 const polyMesh& srcMesh = interp.srcMesh();
131 IOobjectList
objects(srcMesh, srcMesh.time().name());
134 #define MapVolTypeFields(Type, nullArg) \
135 mapVolTypeFields<Type> \
143 #undef MapVolTypeFields
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
virtual Ostream & write(const token &)
Write token.
#define FOR_ALL_FIELD_TYPES(Macro,...)
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
void mapGeometricFields(const fvMeshToFvMesh &interp, const wordReList &cuttingPatches, const HashSet< word > &selectedFields, const bool noLagrangian)
List< wordRe > wordReList
A List of wordRe (word or regular expression)