55 template<
class SourcePatch,
class TargetPatch>
150 const TargetPatch& patch,
171 const SourcePatch& srcPatch,
172 const TargetPatch& tgtPatch,
176 const bool reverseTarget,
177 const bool requireMatch
193 const SourcePatch& srcPatch,
194 const TargetPatch& tgtPatch,
198 const bool reverseTarget,
199 const bool requireMatch
205 const word& methodName,
206 const SourcePatch& srcPatch,
207 const TargetPatch& tgtPatch,
211 const bool reverseTarget,
212 const bool requireMatch
253 #define makeAMIMethod(AMIType) \ 255 typedef AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType> \ 256 AMIMethod##AMIType; \ 258 defineNamedTemplateTypeNameAndDebug(AMIMethod##AMIType, 0); \ 259 defineTemplateRunTimeSelectionTable(AMIMethod##AMIType, components); 262 #define makeAMIMethodType(AMIType, Method) \ 264 typedef Method<AMIType::sourcePatchType,AMIType::targetPatchType> \ 267 defineNamedTemplateTypeNameAndDebug(Method##AMIType, 0); \ 269 AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType>:: \ 270 addcomponentsConstructorToTable<Method##AMIType> \ 271 add##Method##AMIType##ConstructorToTable_; treeDataPrimitivePatch< TargetPatch > treeType
Local typedef to octree tree-type.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
const TargetPatch & tgtPatch_
Reference to target patch.
A face is a list of labels corresponding to mesh vertices.
virtual ~AMIMethod()
Destructor.
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.
const labelList & srcNonOverlap() const
Labels of faces that are not overlapped by any target faces.
virtual void calculate(labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label srcFacei=-1, label tgtFacei=-1)=0
Update addressing and weights.
label findTargetFace(const label srcFacei) const
Find face on target patch that overlaps source face.
const SourcePatch & srcPatch_
Reference to source patch.
const scalarField & tgtMagSf_
Target face areas.
labelList srcNonOverlap_
Labels of faces that are not overlapped by any target faces.
A class for handling words, derived from string.
Encapsulation of data needed to search on PrimitivePatches.
virtual bool conformal() const
Flag to indicate that interpolation patches are conformal.
void resetTree()
Reset the octree for the target patch face search.
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.
Base class for Arbitrary Mesh Interface (AMI) methods.
void checkPatches() const
Check AMI patch coupling.
autoPtr< indexedOctree< treeType > > treePtr_
Octree used to find face seeds.
const faceAreaIntersect::triangulationMode triMode_
Face triangulation mode.
const scalarField & srcMagSf_
Source face areas.
TypeName("AMIMethod")
Runtime type information.
bool initialise(labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label &srcFacei, label &tgtFacei)
Initialise and return true if all ok.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
virtual scalar maxWalkAngle() const
The maximum edge angle that the walk will cross.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Macros to ease declaration of run-time selection tables.
const bool reverseTarget_
Flag to indicate that the two patches are co-directional and.
void writeIntersectionOBJ(const scalar area, const face &f1, const face &f2, const pointField &f1Points, const pointField &f2Points) const
Write triangle intersection to OBJ file.