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_; 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.
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.