81 #ifndef mappedPatchBase_H 82 #define mappedPatchBase_H 97 class distributionMap;
150 if (!x.
first().hit())
171 if (!x.
first().hit())
389 const bool forceUpdate =
false 428 template<
class Type,
class CombineOp>
436 template<
class Type,
class CombineOp>
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*)
vector offset_
Offset vector (uniform)
void operator()(nearInfo &x, const nearInfo &y) const
bool sameRegion() const
Cached sampleRegion != mesh.name()
word sampleRegion_
Region to sample.
A list of keyword definitions, which are a keyword followed by any number of values (e...
tmp< pointField > samplePoints() const
Get the sample points.
const polyPatch & patch_
Patch to sample.
A 2-tuple for storing two objects of different types.
const polyMesh & sampleMesh() const
Get the region mesh.
bool sameRegion_
Same region.
autoPtr< searchableSurface > surfPtr_
Pointer to projection surface employed by AMI interpolator.
const Type1 & first() const
Return first.
virtual void write(Ostream &) const
Write as a dictionary.
const coupleGroupIdentifier coupleGroup_
PatchGroup (if in sampleMode NEARESTPATCH*)
virtual ~mappedPatchBase()
Destructor.
scalar distance(const vector &p1, const vector &p2)
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
cellDecomposition
Enumeration defining the decomposition of the cell for.
autoPtr< AMIInterpolation > AMIPtr_
Pointer to AMI interpolator.
vectorField offsets_
Offset vector (nonuniform)
scalar distance_
Offset distance (normal)
void collectSamples(const pointField &facePoints, pointField &, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
Collect single list of samples and originating processor+face.
const AMIInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
const sampleMode & mode() const
What to sample.
A class for handling words, derived from string.
TypeName("mappedPatchBase")
Runtime type information.
const distributionMap & map() const
Return reference to the parallel distribution map.
static tmp< pointField > readListOrField(const word &keyword, const dictionary &dict, const label size)
Helper to read field or non-uniform list from dictionary.
void calcMapping() const
Calculate mapping.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
offsetMode offsetMode_
How to obtain samples.
Encapsulates using patchGroups to specify coupled patch.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
tmp< pointField > facePoints(const polyPatch &) const
Get the points from face-centre-decomposition face centres.
const autoPtr< Foam::searchableSurface > & surfPtr() const
Return a pointer to the AMI projection surface.
const vector & offset() const
Offset vector (from patch faces to destination mesh objects)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label sampleSize() const
Return size of mapped mesh/patch/boundary.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
offsetMode
How to project face centres.
static const NamedEnum< sampleMode, 6 > sampleModeNames_
void findSamples(const sampleMode mode, const pointField &, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
Find cells/faces containing samples.
dictionary surfDict_
Dictionary storing projection surface description.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
Class containing processor-to-processor mapping information.
void calcAMI() const
Calculate AMI interpolator.
Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
Helper class for finding nearest.
const word & coupleGroup() const
PatchGroup (only if NEARESTPATCHFACE)
sampleMode
Mesh items to sample.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const bool AMIReverse_
Flag to indicate that slave patch should be reversed for AMI.
const vectorField & offsets() const
Offset vector (from patch faces to destination mesh objects)
const Type2 & second() const
Return second.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
static const NamedEnum< offsetMode, 3 > offsetModeNames_
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.
const word & sampleRegion() const
Region to sample.
const polyPatch & samplePolyPatch() const
Get the patch on the region.
autoPtr< distributionMap > mapPtr_
Communication schedule:
mappedPatchBase(const polyPatch &)
Construct from patch.
const sampleMode mode_
What to sample.