35 #ifndef mappedFvPatchBaseBase_H
36 #define mappedFvPatchBaseBase_H
43 #define DEFINE_MAPPED_FV_PATCH_BASE__NEIGHBOUR(Type, FromTo, Modifier) \
45 virtual tmp<Field<Type>> FromTo##Neighbour \
50 virtual tmp<Field<Type>> FromTo##Neighbour \
52 const tmp<Field<Type>>& \
56 #define DEFINE_MAPPED_FV_PATCH_BASE_FROM_AND_TO_NEIGHBOUR(Type, Modifier) \
58 DEFINE_MAPPED_FV_PATCH_BASE__NEIGHBOUR(Type, from, Modifier) \
60 DEFINE_MAPPED_FV_PATCH_BASE__NEIGHBOUR(Type, to, Modifier)
63 #define IMPLEMENT_MAPPED_FV_PATCH_BASE__NEIGHBOUR(Type, PatchType, FromTo) \
65 Foam::tmp<Foam::Field<Foam::Type>> Foam::PatchType::FromTo##Neighbour \
67 const Field<Type>& nbrFldFld \
70 return FromTo##Neighbour<Type>(nbrFldFld); \
73 Foam::tmp<Foam::Field<Foam::Type>> Foam::PatchType::FromTo##Neighbour \
75 const tmp<Field<Type>>& nbrFldFld \
78 tmp<Field<Type>> tResult = FromTo##Neighbour<Type>(nbrFldFld()); \
79 if (&tResult() == &nbrFldFld()) \
91 #define IMPLEMENT_MAPPED_FV_PATCH_BASE_FROM_AND_TO_NEIGHBOUR(Type, PatchType) \
93 IMPLEMENT_MAPPED_FV_PATCH_BASE__NEIGHBOUR(Type, PatchType, from) \
95 IMPLEMENT_MAPPED_FV_PATCH_BASE__NEIGHBOUR(Type, PatchType, to)
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Base class for fv patches that provide mapping between two fv patches.
const fvPatch & patch() const
Reference to the fvPatch.
const transformer & transform() const
The transformation between the patches.
FOR_ALL_FIELD_TYPES(DEFINE_MAPPED_FV_PATCH_BASE_FROM_AND_TO_NEIGHBOUR,=0)
Map/interpolate.
mappedFvPatchBaseBase(const fvPatch &patch)
Construct from a patch.
TypeName("mappedFvPatchBaseBase")
Runtime type information.
const fvPatch & nbrFvPatch() const
Get the patch to map from.
static const mappedFvPatchBaseBase & getMap(const fvPatch &patch)
Cast the given fvPatch to a mappedFvPatchBaseBase. Handle errors.
const word & nbrPatchName() const
Name of the patch to map from.
const word & nbrRegionName() const
Name of the region to map from.
bool haveNbr() const
Is the neighbour available?
const fvMesh & nbrMesh() const
Get the mesh for the region to map from.
virtual ~mappedFvPatchBaseBase()
Destructor.
Base class for engines and poly patches which provide mapping between two poly patches.
A class for handling words, derived from string.
#define DEFINE_MAPPED_FV_PATCH_BASE_FROM_AND_TO_NEIGHBOUR(Type, Modifier)