Go to the documentation of this file.
80 #ifndef mappedPatchBase_H
81 #define mappedPatchBase_H
149 if (!
x.first().hit())
153 else if (
y.second().first() <
x.second().first())
170 if (!
x.first().hit())
174 else if (
y.second().second() >
x.second().second())
387 const bool forceUpdate =
false
426 template<
class Type,
class CombineOp>
434 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 string.
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.
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 tmp< pointField > readListOrField(const word &keyword, const dictionary &dict, const label size)
Helper to read field or non-uniform list from dictionary.
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*)
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
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)
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.
static const NamedEnum< sampleMode, 6 > sampleModeNames_
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
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 any number of values (e....
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static const NamedEnum< offsetMode, 3 > offsetModeNames_
static pointIndexHit facePoint(const polyMesh &, const label faceI, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
offsetMode offsetMode_
How to obtain samples.
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 different types.
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.