Go to the documentation of this file.
55 template<
class SourcePatch,
class TargetPatch>
150 const TargetPatch& patch,
168 const SourcePatch& srcPatch,
169 const TargetPatch& tgtPatch,
173 const bool reverseTarget,
174 const bool requireMatch
190 const SourcePatch& srcPatch,
191 const TargetPatch& tgtPatch,
195 const bool reverseTarget,
196 const bool requireMatch
202 const word& methodName,
203 const SourcePatch& srcPatch,
204 const TargetPatch& tgtPatch,
208 const bool reverseTarget,
209 const bool requireMatch
250 #define makeAMIMethod(AMIType) \
252 typedef AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType> \
253 AMIMethod##AMIType; \
255 defineNamedTemplateTypeNameAndDebug(AMIMethod##AMIType, 0); \
256 defineTemplateRunTimeSelectionTable(AMIMethod##AMIType, components);
259 #define makeAMIMethodType(AMIType, Method) \
261 typedef Method<AMIType::sourcePatchType,AMIType::targetPatchType> \
264 defineNamedTemplateTypeNameAndDebug(Method##AMIType, 0); \
266 AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType>:: \
267 addcomponentsConstructorToTable<Method##AMIType> \
268 add##Method##AMIType##ConstructorToTable_;
TypeName("AMIMethod")
Runtime type information.
const bool reverseTarget_
Flag to indicate that the two patches are co-directional and.
A class for handling words, derived from string.
const labelList & srcNonOverlap() const
Labels of faces that are not overlapped by any target faces.
const SourcePatch & srcPatch_
Reference to source patch.
void writeIntersectionOBJ(const scalar area, const face &f1, const face &f2, const pointField &f1Points, const pointField &f2Points) const
Write triangle intersection to OBJ file.
const TargetPatch & tgtPatch_
Reference to target patch.
virtual bool conformal() const
Flag to indicate that interpolation patches are conformal.
Base class for Arbitrary Mesh Interface (AMI) methods.
AMIMethod(const AMIMethod &)
Disallow default bitwise copy construct.
void checkPatches() const
Check AMI patch coupling.
const bool requireMatch_
Flag to indicate that the two patches must be matched/an overlap.
void appendNbrFaces(const label faceI, const TargetPatch &patch, const DynamicList< label > &visitedFaces, DynamicList< label > &faceIDs) const
Add faces neighbouring faceI to the ID list.
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.
bool initialise(labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label &srcFaceI, label &tgtFaceI)
Initialise and return true if all ok.
autoPtr< indexedOctree< treeType > > treePtr_
Octree used to find face seeds.
const faceAreaIntersect::triangulationMode triMode_
Face triangulation mode.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
void operator=(const AMIMethod &)
Disallow default bitwise assignment.
const scalarField & tgtMagSf_
Target face areas.
labelList srcNonOverlap_
Labels of faces that are not overlapped by any target faces.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual void calculate(labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label srcFaceI=-1, label tgtFaceI=-1)=0
Update addressing and weights.
treeDataPrimitivePatch< TargetPatch > treeType
Local typedef to octree tree-type.
Macros to ease declaration of run-time selection tables.
label findTargetFace(const label srcFaceI) const
Find face on target patch that overlaps source face.
Encapsulation of data needed to search on PrimitivePatches.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resetTree()
Reset the octree for the target patch face search.
declareRunTimeSelectionTable(autoPtr, AMIMethod, components,(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget, const bool requireMatch),(srcPatch, tgtPatch, srcMagSf, tgtMagSf, triMode, reverseTarget, requireMatch))
Declare runtime constructor selection table.
static autoPtr< AMIMethod > New(const word &methodName, const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget, const bool requireMatch)
Selector.
A face is a list of labels corresponding to mesh vertices.
virtual ~AMIMethod()
Destructor.
const scalarField & srcMagSf_
Source face areas.