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