41 const fvMeshToFvMesh& interp,
43 const HashSet<word>& selectedFields,
47 const fvMesh& srcMesh =
static_cast<const fvMesh&
>(interp.srcMesh());
48 const fvMesh& tgtMesh =
static_cast<const fvMesh&
>(interp.tgtMesh());
54 const word& fieldName = fieldIter()->name();
56 if (!selectedFields.empty() && !selectedFields.found(fieldName))
61 const VolField<Type> fieldSource(*fieldIter(), srcMesh);
63 typeIOobject<VolField<Type>> targetIO
66 tgtMesh.time().name(),
72 if (targetIO.headerOk() && interp.consistent())
75 <<
"Mapping of field " << fieldName <<
" will not utilise "
76 <<
"the corresponding field in the target case, as the map is "
77 <<
"consistent (i.e., all patches are mapped)" <<
endl;
79 if (!targetIO.headerOk() && !interp.consistent())
82 <<
"Cannot map field " << fieldName <<
" because the "
83 <<
"map is not consistent (i.e., not all patches are "
84 <<
"mapped), and there is no corresponding field in "
85 <<
"the target case" <<
endl;
88 if (!targetIO.headerOk() && !cuttingPatches.empty())
91 <<
"Cutting patches will not be used for field " << fieldName
92 <<
" because no there is no corresponding field in the target "
96 if (targetIO.headerOk())
98 Info<<
" mapping into existing field " << fieldName <<
endl;
100 VolField<Type> fieldTarget(targetIO, tgtMesh);
104 interp.srcToTgt(fieldSource, fieldTarget, cuttingPatches)
111 Info<<
" creating new field " << fieldName <<
endl;
113 VolField<Type>(targetIO, interp.srcToTgt(fieldSource)).
write();
124 const fvMeshToFvMesh& interp,
126 const HashSet<word>& selectedFields,
127 const bool noLagrangian
131 const polyMesh& srcMesh = interp.srcMesh();
132 IOobjectList
objects(srcMesh, srcMesh.time().name());
135 #define MapVolTypeFields(Type, nullArg) \
136 mapVolTypeFields<Type> \
144 #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.
static const char *const typeName
virtual Ostream & write(const char)=0
Write character.
#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.
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)