Go to the documentation of this file.
84 #ifndef mappedPatchBase_H
85 #define mappedPatchBase_H
153 if (!
x.first().hit())
157 else if (
y.second().first() <
x.second().first())
174 if (!
x.first().hit())
178 else if (
y.second().second() >
x.second().second())
384 const bool forceUpdate =
false
423 template<
class Type,
class CombineOp>
431 template<
class Type,
class CombineOp>
Encapsulates using "patchGroups" to specify coupled patch.
virtual void write(Ostream &) const
Write as a dictionary.
cellDecomposition
Enumeration defining the decomposition of the cell for.
const bool AMIReverse_
Flag to indicate that slave patch should be reversed for AMI.
A class for handling words, derived from Foam::string.
nearest patch face + AMI interpolation
A class for managing temporary objects.
const mapDistribute & map() const
Return reference to the parallel distribution map.
const polyPatch & samplePolyPatch() const
Get the patch on the region.
nearest point on selected patch
mappedPatchBase(const polyPatch &)
Construct from patch.
void collectSamples(const pointField &facePoints, pointField &, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
Collect single list of samples and originating processor+face.
vector offset_
Offset vector (uniform)
const sampleMode mode_
What to sample.
static const Enum< offsetMode > offsetModeNames_
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*)
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
nearest cell (even if not containing cell)
Mesh consisting of general polyhedral cells.
const coupleGroupIdentifier coupleGroup_
PatchGroup (if in sampleMode NEARESTPATCH*)
virtual ~mappedPatchBase()
Destructor.
const vector & offset() const
Offset vector (from patch faces to destination mesh objects)
static const Enum< sampleMode > sampleModeNames_
const autoPtr< Foam::searchableSurface > & surfPtr() const
Return a pointer to the AMI projection surface.
autoPtr< mapDistribute > mapPtr_
Communication schedule:
word sampleRegion_
Region to sample.
tmp< pointField > samplePoints() const
Get the sample points.
void operator()(nearInfo &x, const nearInfo &y) const
label sampleSize() const
Return size of mapped mesh/patch/boundary.
const polyMesh & sampleMesh() const
Get the region mesh.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
autoPtr< searchableSurface > surfPtr_
Pointer to projection surface employed by AMI interpolator.
A patch is a list of labels that address the faces in the global face list.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
Class containing processor-to-processor mapping information.
Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
Helper class for finding nearest.
const sampleMode & mode() const
What to sample.
vectorField offsets_
Offset vector (nonuniform)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalar distance_
Offset distance (normal)
void calcAMI() const
Calculate AMI interpolator.
const word & coupleGroup() const
PatchGroup (only if NEARESTPATCHFACE)
const word & sampleRegion() const
Region to sample.
void operator()(nearInfo &x, const nearInfo &y) const
scalar distance(const vector &p1, const vector &p2)
TypeName("mappedPatchBase")
Runtime type information.
void calcMapping() const
Calculate mapping.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
nearest face on selected patch
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
offsetMode offsetMode_
How to obtain samples.
nearest cell containing sample
offsetMode
How to project face centres.
bool sameRegion() const
Cached sampleRegion != mesh.name()
void findSamples(const sampleMode mode, const pointField &, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
Find cells/faces containing samples.
tmp< pointField > facePoints(const polyPatch &) const
Get the points from face-centre-decomposition face centres.
dictionary surfDict_
Dictionary storing projection surface description.
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
Pointer to AMI interpolator.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const polyPatch & patch_
Patch to sample.
bool sameRegion_
Same region.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
use face normal + distance
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
sampleMode
Mesh items to sample.
const vectorField & offsets() const
Offset vector (from patch faces to destination mesh objects)
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.