Version: 9.14.0
INTERP_KERNEL::QuadraticPolygon Class Reference
Inheritance diagram for INTERP_KERNEL::QuadraticPolygon:
Collaboration diagram for INTERP_KERNEL::QuadraticPolygon:

Public Member Functions

INTERPKERNEL_EXPORT void appendCrudeData (const std::map< INTERP_KERNEL::Node *, mcIdType > &mapp, double xBary, double yBary, double fact, mcIdType offset, std::vector< double > &addCoordsQuadratic, std::vector< mcIdType > &conn, std::vector< mcIdType > &connI) const
 
INTERPKERNEL_EXPORT void appendEdgeFromCrudeDataArray (std::size_t edgeId, const std::map< mcIdType, INTERP_KERNEL::Node * > &mapp, bool isQuad, const mcIdType *nodalBg, const double *coords, const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector< mcIdType > > &intersectEdges)
 
INTERPKERNEL_EXPORT void appendSubEdgeFromCrudeDataArray (Edge *baseEdge, std::size_t j, bool direct, mcIdType edgeId, const std::vector< mcIdType > &subEdge, const std::map< mcIdType, INTERP_KERNEL::Node * > &mapp)
 
INTERPKERNEL_EXPORT void buildFromCrudeDataArray (const std::map< mcIdType, INTERP_KERNEL::Node * > &mapp, bool isQuad, const mcIdType *nodalBg, const double *coords, const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector< mcIdType > > &intersectEdges)
 
INTERPKERNEL_EXPORT void buildFromCrudeDataArray2 (const std::map< mcIdType, INTERP_KERNEL::Node * > &mapp, bool isQuad, const mcIdType *nodalBg, const double *coords, const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector< mcIdType > > &intersectEdges, const INTERP_KERNEL::QuadraticPolygon &pol1, const mcIdType *descBg1, const mcIdType *descEnd1, const std::vector< std::vector< mcIdType > > &intersectEdges1, const std::vector< std::vector< mcIdType > > &colinear1, std::map< mcIdType, std::vector< INTERP_KERNEL::ElementaryEdge * > > &alreadyExistingIn2)
 
INTERPKERNEL_EXPORT std::vector< QuadraticPolygon * > buildIntersectionPolygons (const QuadraticPolygon &pol1, const QuadraticPolygon &pol2) const
 
INTERPKERNEL_EXPORT void buildPartitionsAbs (QuadraticPolygon &other, std::set< INTERP_KERNEL::Edge * > &edgesThis, std::set< INTERP_KERNEL::Edge * > &edgesBoundaryOther, const std::map< INTERP_KERNEL::Node *, mcIdType > &mapp, mcIdType idThis, mcIdType idOther, mcIdType offset, std::vector< double > &addCoordsQuadratic, std::vector< mcIdType > &conn, std::vector< mcIdType > &connI, std::vector< mcIdType > &nb1, std::vector< mcIdType > &nb2)
 
INTERPKERNEL_EXPORT void circularPermute ()
 
INTERPKERNEL_EXPORT void cleanDegeneratedConsecutiveEdges ()
 
INTERPKERNEL_EXPORT void closeMe () const
 
INTERPKERNEL_EXPORT void dumpInXfigFile (const char *fileName) const
 
INTERPKERNEL_EXPORT void dumpInXfigFileWithOther (const ComposedEdge &other, const char *fileName) const
 
INTERPKERNEL_EXPORT bool haveIAChanceToBeCompletedBy (const QuadraticPolygon &pol1NotSplitted, const QuadraticPolygon &pol2Splitted, bool &direction, bool &needCleaning) const
 
INTERPKERNEL_EXPORT void intersectForPerimeter (const QuadraticPolygon &other, double &perimeterThisPart, double &perimeterOtherPart, double &perimeterCommonPart) const
 
INTERPKERNEL_EXPORT void intersectForPerimeterAdvanced (const QuadraticPolygon &other, std::vector< double > &polThis, std::vector< double > &polOther) const
 
INTERPKERNEL_EXPORT void intersectForPoint (const QuadraticPolygon &other, std::vector< int > &numberOfCreatedPointsPerEdge) const
 
INTERPKERNEL_EXPORT std::vector< QuadraticPolygon * > intersectMySelfWith (const QuadraticPolygon &other) const
 
INTERPKERNEL_EXPORT double intersectWith (const QuadraticPolygon &other) const
 
INTERPKERNEL_EXPORT double intersectWith (const QuadraticPolygon &other, double *barycenter) const
 
INTERPKERNEL_EXPORT double intersectWithAbs (QuadraticPolygon &other)
 
INTERPKERNEL_EXPORT double intersectWithAbs (QuadraticPolygon &other, double *barycenter)
 
INTERPKERNEL_EXPORT double intersectWithAbs1D (QuadraticPolygon &other, bool &isColinear)
 
INTERPKERNEL_EXPORT bool isButterfly () const
 
INTERPKERNEL_EXPORT bool isButterflyAbs ()
 
INTERPKERNEL_EXPORT void performLocatingOperation (QuadraticPolygon &pol2) const
 
INTERPKERNEL_EXPORT void performLocatingOperationSlow (QuadraticPolygon &pol2) const
 
 QuadraticPolygon ()
 
INTERPKERNEL_EXPORT QuadraticPolygon (const char *fileName)
 
 QuadraticPolygon (const QuadraticPolygon &other)
 
INTERPKERNEL_EXPORT void splitAbs (QuadraticPolygon &other, const std::map< INTERP_KERNEL::Node *, mcIdType > &mapThis, const std::map< INTERP_KERNEL::Node *, mcIdType > &mapOther, mcIdType offset1, mcIdType offset2, const std::vector< mcIdType > &otherEdgeIds, std::vector< mcIdType > &edgesThis, mcIdType cellIdThis, std::vector< std::vector< mcIdType > > &edgesInOtherColinearWithThis, std::vector< std::vector< mcIdType > > &subDivOther, std::vector< double > &addCoo, std::map< mcIdType, mcIdType > &mergedNodes)
 
INTERPKERNEL_EXPORT void updateLocOfEdgeFromCrudeDataArray2 (const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector< mcIdType > > &intersectEdges, const INTERP_KERNEL::QuadraticPolygon &pol1, const mcIdType *descBg1, const mcIdType *descEnd1, const std::vector< std::vector< mcIdType > > &intersectEdges1, const std::vector< std::vector< mcIdType > > &colinear1) const
 
INTERPKERNEL_EXPORT ~QuadraticPolygon ()
 
- Public Member Functions inherited from INTERP_KERNEL::ComposedEdge
INTERPKERNEL_EXPORT void applyGlobalSimilarity (double xBary, double yBary, double dimChar)
 
INTERPKERNEL_EXPORT void applyGlobalSimilarity2 (ComposedEdge *other, double xBary, double yBary, double dimChar)
 
INTERPKERNEL_EXPORT void applySimilarity (double xBary, double yBary, double dimChar)
 
INTERPKERNEL_EXPORT void applySimilarityOnMyEdges (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void applySimilarityOnMyEdgesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void applySimilarityOnMyNodes (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void applySimilarityOnMyNodesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 
ElementaryEdgeback () const
 
INTERPKERNEL_EXPORT bool changeEndNodeWith (Node *node) const
 
INTERPKERNEL_EXPORT bool changeStartNodeWith (Node *node) const
 
INTERPKERNEL_EXPORT void clear ()
 
INTERPKERNEL_EXPORT ComposedEdgeclone () const
 
bool completed () const
 
 ComposedEdge ()
 
INTERPKERNEL_EXPORT ComposedEdge (const ComposedEdge &other)
 
 ComposedEdge (int sz)
 
INTERPKERNEL_EXPORT void dispatchPerimeter (double &partConsidered) const
 
INTERPKERNEL_EXPORT double dispatchPerimeterAdv (const ComposedEdge &father, std::vector< double > &result) const
 
INTERPKERNEL_EXPORT void dispatchPerimeterExcl (double &partConsidered, double &commonPart) const
 
INTERPKERNEL_EXPORT void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
 
INTERPKERNEL_EXPORT void dumpToCout (const std::map< INTERP_KERNEL::Node *, int > &mapp) const
 
bool empty () const
 
INTERPKERNEL_EXPORT void fillBounds (Bounds &output) const
 
ElementaryEdgefront () const
 
INTERPKERNEL_EXPORT void getAllNodes (std::set< Node * > &output) const
 
INTERPKERNEL_EXPORT double getArea () const
 
INTERPKERNEL_EXPORT void getBarycenter (double *bary) const
 
INTERPKERNEL_EXPORT void getBarycenter (double *bary, double &weigh) const
 
INTERPKERNEL_EXPORT void getBarycenterGeneral (double *bary) const
 
INTERPKERNEL_EXPORT double getCommonLengthWith (const ComposedEdge &other) const
 
INTERPKERNEL_EXPORT bool getDirection () const
 
INTERPKERNEL_EXPORT NodegetEndNode () const
 
INTERPKERNEL_EXPORT double getHydraulicDiameter () const
 
INTERPKERNEL_EXPORT double getPerimeter () const
 
INTERPKERNEL_EXPORT NodegetStartNode () const
 
INTERPKERNEL_EXPORT void initEdgeHitStatus () const
 
INTERPKERNEL_EXPORT void initLocations () const
 
INTERPKERNEL_EXPORT void initNodeHitStatus () const
 
INTERPKERNEL_EXPORT bool intresincEqCoarse (const Edge *other) const
 
INTERPKERNEL_EXPORT bool isInOrOut (Node *nodeToTest) const
 
INTERPKERNEL_EXPORT bool isInOrOut2 (Node *nodeToTest) const
 
INTERPKERNEL_EXPORT bool isNodeIn (Node *n) const
 
INTERPKERNEL_EXPORT double normalize (ComposedEdge *other, double &xBary, double &yBary)
 
INTERPKERNEL_EXPORT double normalizeExt (ComposedEdge *other, double &xBary, double &yBary)
 
INTERPKERNEL_EXPORT double normalizeMe (double &xBary, double &yBary)
 
INTERPKERNEL_EXPORT ElementaryEdgeoperator[] (int i) const
 
INTERPKERNEL_EXPORT bool presenceOfOn () const
 
INTERPKERNEL_EXPORT bool presenceOfQuadraticEdge () const
 
INTERPKERNEL_EXPORT void pushBack (ComposedEdge *elem)
 
INTERPKERNEL_EXPORT void pushBack (Edge *edge, bool direction=true)
 
INTERPKERNEL_EXPORT void pushBack (ElementaryEdge *elem)
 
int recursiveSize () const
 
void resize (int i)
 
INTERPKERNEL_EXPORT void reverse ()
 
INTERPKERNEL_EXPORT void setValueAt (int i, Edge *e, bool direction=true)
 
int size () const
 
INTERPKERNEL_EXPORT void unApplyGlobalSimilarityExt (ComposedEdge &other, double xBary, double yBary, double fact)
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdges (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdgesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodes (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 

Static Public Member Functions

static INTERPKERNEL_EXPORT EdgeBuildArcCircleEdge (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT QuadraticPolygonBuildArcCirclePolygon (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT void BuildDbgFile (const std::vector< Node * > &nodes, const char *fileName)
 
static INTERPKERNEL_EXPORT EdgeBuildLinearEdge (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT QuadraticPolygonBuildLinearPolygon (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT void ComputeResidual (const QuadraticPolygon &pol1, const std::set< Edge * > &notUsedInPol1, const std::set< Edge * > &edgesInPol2OnBoundary, const std::map< INTERP_KERNEL::Node *, mcIdType > &mapp, mcIdType offset, mcIdType idThis, std::vector< double > &addCoordsQuadratic, std::vector< mcIdType > &conn, std::vector< mcIdType > &connI, std::vector< mcIdType > &nb1, std::vector< mcIdType > &nb2)
 
static INTERPKERNEL_EXPORT void SplitPolygonsEachOther (QuadraticPolygon &pol1, QuadraticPolygon &pol2, int &nbOfSplits)
 
- Static Public Member Functions inherited from INTERP_KERNEL::ComposedEdge
static void Delete (ComposedEdge *pt)
 
static INTERPKERNEL_EXPORT void InitLocationsWithOther (const ComposedEdge &first, const ComposedEdge &other)
 
static void SoftDelete (ComposedEdge *pt)
 

Protected Member Functions

void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
 
std::list< QuadraticPolygon * >::iterator fillAsMuchAsPossibleWith (const QuadraticPolygon &pol2Splitted, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd, bool direction)
 
std::list< QuadraticPolygon * > zipConsecutiveInSegments () const
 
- Protected Member Functions inherited from INTERP_KERNEL::ComposedEdge
INTERPKERNEL_EXPORT ~ComposedEdge ()
 

Static Protected Member Functions

static std::list< QuadraticPolygon * >::iterator CheckInList (Node *n, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd)
 
static void ClosePolygons (std::list< QuadraticPolygon * > &pol1Zip, const QuadraticPolygon &pol1, const QuadraticPolygon &pol2, std::vector< QuadraticPolygon * > &results)
 
template<class EDGES >
static void UpdateNeighbours (const MergePoints &merger, IteratorOnComposedEdge it1, IteratorOnComposedEdge it2, const EDGES *e1, const EDGES *e2)
 

Additional Inherited Members

- Protected Attributes inherited from INTERP_KERNEL::ComposedEdge
std::list< ElementaryEdge * > _sub_edges
 

Detailed Description

A set of quadratic or linear edges, not necessarily connected to form a closed polygon. Some methods however requires a closed form. Class ComposedEdge focuses more on connectivity aspect.

Constructor & Destructor Documentation

◆ QuadraticPolygon() [1/3]

INTERP_KERNEL::QuadraticPolygon::QuadraticPolygon ( )

◆ QuadraticPolygon() [2/3]

INTERP_KERNEL::QuadraticPolygon::QuadraticPolygon ( const QuadraticPolygon other)

◆ QuadraticPolygon() [3/3]

◆ ~QuadraticPolygon()

QuadraticPolygon::~QuadraticPolygon ( )

Member Function Documentation

◆ BuildLinearPolygon()

◆ BuildArcCirclePolygon()

◆ BuildLinearEdge()

Edge * QuadraticPolygon::BuildLinearEdge ( std::vector< Node * > &  nodes)
static

◆ BuildArcCircleEdge()

Edge * QuadraticPolygon::BuildArcCircleEdge ( std::vector< Node * > &  nodes)
static

◆ BuildDbgFile()

void QuadraticPolygon::BuildDbgFile ( const std::vector< Node * > &  nodes,
const char *  fileName 
)
static

◆ closeMe()

◆ circularPermute()

void QuadraticPolygon::circularPermute ( )

◆ isButterflyAbs()

◆ isButterfly()

◆ dumpInXfigFile() [1/2]

void QuadraticPolygon::dumpInXfigFile ( const char *  fileName) const

◆ dumpInXfigFileWithOther()

void QuadraticPolygon::dumpInXfigFileWithOther ( const ComposedEdge other,
const char *  fileName 
) const

◆ intersectWithAbs() [1/2]

double QuadraticPolygon::intersectWithAbs ( QuadraticPolygon other)

Before intersecting as intersectWith a normalization is done.

Warning contrary to intersectWith method this method is NOT const. 'this' and 'other' are modified after call of this method.

References intersectMySelfWith(), and INTERP_KERNEL::ComposedEdge::normalize().

◆ intersectWithAbs1D()

double QuadraticPolygon::intersectWithAbs1D ( QuadraticPolygon other,
bool &  isColinear 
)

Warning This method is NOT const. 'this' and 'other' are modified after call of this method. 'other' is a QuadraticPolygon of non closed edges.

References INTERP_KERNEL::ComposedEdge::_sub_edges, INTERP_KERNEL::FULL_IN_1, INTERP_KERNEL::FULL_ON_1, INTERP_KERNEL::ComposedEdge::normalize(), performLocatingOperation(), and SplitPolygonsEachOther().

◆ intersectWithAbs() [2/2]

double QuadraticPolygon::intersectWithAbs ( QuadraticPolygon other,
double *  barycenter 
)

Before intersecting as intersectWith a normalization is done.

Warning contrary to intersectWith method this method is NOT const. 'this' and 'other' are modified after call of this method.

References intersectMySelfWith(), and INTERP_KERNEL::ComposedEdge::normalize().

◆ splitAbs()

void QuadraticPolygon::splitAbs ( QuadraticPolygon other,
const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapThis,
const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapOther,
mcIdType  offset1,
mcIdType  offset2,
const std::vector< mcIdType > &  otherEdgeIds,
std::vector< mcIdType > &  edgesThis,
mcIdType  cellIdThis,
std::vector< std::vector< mcIdType > > &  edgesInOtherColinearWithThis,
std::vector< std::vector< mcIdType > > &  subDivOther,
std::vector< double > &  addCoo,
std::map< mcIdType, mcIdType > &  mergedNodes 
)

This method splits 'this' with 'other' into smaller pieces localizable. 'mapThis' is a map that gives the correspondence between nodes contained in 'this' and node ids in a global mesh. In the same way, 'mapOther' gives the correspondence between nodes contained in 'other' and node ids in a global mesh from which 'other' is extracted. This method has 1 out parameter : 'edgesThis', After the call of this method, it contains the nodal connectivity (including type) of 'this' into globlal "this mesh". This method has 2 in/out parameters : 'subDivOther' and 'addCoo'.'otherEdgeIds' is useful to put values in 'edgesThis', 'subDivOther' and 'addCoo'. Size of 'otherEdgeIds' has to be equal to number of ElementaryEdges in 'other'. No check of that will be done. The term 'abs' in the name recalls that we normalize the mesh (spatially) so that node coordinates fit into [0;1].

Parameters
offset1is the number of nodes contained in global mesh from which 'this' is extracted.
offset2is the sum of nodes contained in global mesh from which 'this' is extracted and 'other' is extracted.
edgesInOtherColinearWithThiswill be appended at the end of the vector with colinear edge ids of other (if any)
otherEdgeIdsis a vector with the same size than other before calling this method. It gives in the same order the cell id in global other mesh.

References INTERP_KERNEL::ComposedEdge::_sub_edges, INTERP_KERNEL::MergePoints::clear(), INTERP_KERNEL::ComposedEdge::ComposedEdge(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::ComposedEdge::Delete(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::ElementaryEdge::getDirection(), INTERP_KERNEL::ElementaryEdge::getEndNode(), INTERP_KERNEL::ElementaryEdge::getIterator(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::ElementaryEdge::getStartNode(), INTERP_KERNEL::Edge::incrRef(), INTERP_KERNEL::IteratorOnComposedEdge::insertElemEdges(), INTERP_KERNEL::Edge::intersectWith(), INTERP_KERNEL::ElementaryEdge::isThereStartPoint(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::normalizeExt(), INTERP_KERNEL::ComposedEdge::presenceOfOn(), INTERP_KERNEL::ComposedEdge::pushBack(), INTERP_KERNEL::ComposedEdge::reverse(), INTERP_KERNEL::ComposedEdge::SoftDelete(), INTERP_KERNEL::MergePoints::updateMergedNodes(), and UpdateNeighbours().

◆ buildFromCrudeDataArray()

void QuadraticPolygon::buildFromCrudeDataArray ( const std::map< mcIdType, INTERP_KERNEL::Node * > &  mapp,
bool  isQuad,
const mcIdType *  nodalBg,
const double *  coords,
const mcIdType *  descBg,
const mcIdType *  descEnd,
const std::vector< std::vector< mcIdType > > &  intersectEdges 
)

This method builds 'this' from its descending conn stored in crude mode (MEDCoupling). Descending conn is in FORTRAN relative mode in order to give the orientation of edge (see buildDescendingConnectivity2() method). See appendEdgeFromCrudeDataArray() for params description.

References appendEdgeFromCrudeDataArray().

◆ buildFromCrudeDataArray2()

void QuadraticPolygon::buildFromCrudeDataArray2 ( const std::map< mcIdType, INTERP_KERNEL::Node * > &  mapp,
bool  isQuad,
const mcIdType *  nodalBg,
const double *  coords,
const mcIdType *  descBg,
const mcIdType *  descEnd,
const std::vector< std::vector< mcIdType > > &  intersectEdges2,
const INTERP_KERNEL::QuadraticPolygon pol1,
const mcIdType *  descBg1,
const mcIdType *  descEnd1,
const std::vector< std::vector< mcIdType > > &  intersectEdges1,
const std::vector< std::vector< mcIdType > > &  colinear1,
std::map< mcIdType, std::vector< INTERP_KERNEL::ElementaryEdge * > > &  alreadyExistingIn2 
)

This method builds from descending conn of a quadratic polygon stored in crude mode (MEDCoupling). Descending conn is in FORTRAN relative mode in order to give the orientation of edge.

References INTERP_KERNEL::ComposedEdge::_sub_edges, appendEdgeFromCrudeDataArray(), INTERP_KERNEL::ElementaryEdge::BuildEdgeFromStartEndDir(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::Edge::incrRef(), INTERP_KERNEL::ComposedEdge::pushBack(), and INTERP_KERNEL::ComposedEdge::size().

◆ updateLocOfEdgeFromCrudeDataArray2()

void QuadraticPolygon::updateLocOfEdgeFromCrudeDataArray2 ( const mcIdType *  descBg,
const mcIdType *  descEnd,
const std::vector< std::vector< mcIdType > > &  intersectEdges,
const INTERP_KERNEL::QuadraticPolygon pol1,
const mcIdType *  descBg1,
const mcIdType *  descEnd1,
const std::vector< std::vector< mcIdType > > &  intersectEdges1,
const std::vector< std::vector< mcIdType > > &  colinear1 
) const

Method expected to be called on pol2. Every params not suffixed by numbered are supposed to refer to pol2 (this). Method to find edges that are ON.

References INTERP_KERNEL::Edge::declareOn(), INTERP_KERNEL::ElementaryEdge::getPtr(), and INTERP_KERNEL::ComposedEdge::size().

◆ appendEdgeFromCrudeDataArray()

void QuadraticPolygon::appendEdgeFromCrudeDataArray ( std::size_t  edgeId,
const std::map< mcIdType, INTERP_KERNEL::Node * > &  mapp,
bool  isQuad,
const mcIdType *  nodalBg,
const double *  coords,
const mcIdType *  descBg,
const mcIdType *  descEnd,
const std::vector< std::vector< mcIdType > > &  intersectEdges 
)

◆ appendSubEdgeFromCrudeDataArray()

void QuadraticPolygon::appendSubEdgeFromCrudeDataArray ( Edge baseEdge,
std::size_t  j,
bool  direct,
mcIdType  edgeId,
const std::vector< mcIdType > &  subEdge,
const std::map< mcIdType, INTERP_KERNEL::Node * > &  mapp 
)

◆ appendCrudeData()

void QuadraticPolygon::appendCrudeData ( const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapp,
double  xBary,
double  yBary,
double  fact,
mcIdType  offset,
std::vector< double > &  addCoordsQuadratic,
std::vector< mcIdType > &  conn,
std::vector< mcIdType > &  connI 
) const

◆ buildPartitionsAbs()

void QuadraticPolygon::buildPartitionsAbs ( QuadraticPolygon other,
std::set< INTERP_KERNEL::Edge * > &  edgesThis,
std::set< INTERP_KERNEL::Edge * > &  edgesBoundaryOther,
const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapp,
mcIdType  idThis,
mcIdType  idOther,
mcIdType  offset,
std::vector< double > &  addCoordsQuadratic,
std::vector< mcIdType > &  conn,
std::vector< mcIdType > &  connI,
std::vector< mcIdType > &  nbThis,
std::vector< mcIdType > &  nbOther 
)

This method make the hypothesis that this and other are split at the minimum into edges that are fully IN, OUT or ON. This method returns newly created polygons in conn and connI and the corresponding ids ( idThis, idOther) are stored respectively into nbThis and nbOther.

Parameters
[in,out]edgesThisparameter that keep informed the caller about the edges in this not shared by the result of intersection of this with other
[in,out]edgesBoundaryOtherparameter that stores all edges in result of intersection that are not

References buildIntersectionPolygons(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::normalizeExt(), performLocatingOperationSlow(), and INTERP_KERNEL::ComposedEdge::unApplyGlobalSimilarityExt().

◆ intersectWith() [1/2]

double QuadraticPolygon::intersectWith ( const QuadraticPolygon other) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References intersectMySelfWith().

◆ intersectWith() [2/2]

double QuadraticPolygon::intersectWith ( const QuadraticPolygon other,
double *  barycenter 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References intersectMySelfWith().

◆ intersectMySelfWith()

std::vector< QuadraticPolygon * > QuadraticPolygon::intersectMySelfWith ( const QuadraticPolygon other) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them. This method is currently not used by any high level functionality.

References buildIntersectionPolygons(), performLocatingOperation(), and SplitPolygonsEachOther().

Referenced by intersectWith(), and intersectWithAbs().

◆ intersectForPerimeter()

void QuadraticPolygon::intersectForPerimeter ( const QuadraticPolygon other,
double &  perimeterThisPart,
double &  perimeterOtherPart,
double &  perimeterCommonPart 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References INTERP_KERNEL::ComposedEdge::dispatchPerimeterExcl(), performLocatingOperation(), and SplitPolygonsEachOther().

◆ intersectForPerimeterAdvanced()

void QuadraticPolygon::intersectForPerimeterAdvanced ( const QuadraticPolygon other,
std::vector< double > &  polThis,
std::vector< double > &  polOther 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

polThis.size()==this->size() and polOther.size()==other.size(). For each ElementaryEdge of 'this', the corresponding contribution in resulting polygon is in 'polThis'. For each ElementaryEdge of 'other', the corresponding contribution in resulting polygon is in 'polOther'. As consequence common part are counted twice (in polThis and in polOther).

References INTERP_KERNEL::ElementaryEdge::clone(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::ComposedEdge::dispatchPerimeter(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::IteratorOnComposedEdge::next(), performLocatingOperation(), INTERP_KERNEL::ComposedEdge::pushBack(), INTERP_KERNEL::ComposedEdge::size(), and SplitPolygonsEachOther().

◆ intersectForPoint()

void QuadraticPolygon::intersectForPoint ( const QuadraticPolygon other,
std::vector< int > &  numberOfCreatedPointsPerEdge 
) const

numberOfCreatedPointsPerEdge is resized to the number of edges of 'this'. This method returns in ordered maner the number of newly created points per edge. This method performs a split process between 'this' and 'other' that gives the result PThis. Then for each edges of 'this' this method counts how many edges in Pthis have the same id.

References INTERP_KERNEL::ElementaryEdge::clone(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::pushBack(), INTERP_KERNEL::ComposedEdge::recursiveSize(), INTERP_KERNEL::ComposedEdge::size(), and SplitPolygonsEachOther().

◆ performLocatingOperation()

◆ performLocatingOperationSlow()

◆ SplitPolygonsEachOther()

◆ buildIntersectionPolygons()

std::vector< QuadraticPolygon * > QuadraticPolygon::buildIntersectionPolygons ( const QuadraticPolygon pol1,
const QuadraticPolygon pol2 
) const

Given 2 polygons pol1 and pol2 (localized) the resulting polygons are returned.

this : pol1 simplified.

Parameters
[in]pol1pol1 split.
[in]pol2pol2 split.

References ClosePolygons(), INTERP_KERNEL::FULL_IN_1, INTERP_KERNEL::FULL_ON_1, INTERP_KERNEL::ElementaryEdge::locateFullyMySelf(), QuadraticPolygon(), and zipConsecutiveInSegments().

Referenced by buildPartitionsAbs(), and intersectMySelfWith().

◆ haveIAChanceToBeCompletedBy()

◆ ComputeResidual()

void QuadraticPolygon::ComputeResidual ( const QuadraticPolygon pol1,
const std::set< Edge * > &  notUsedInPol1,
const std::set< Edge * > &  edgesInPol2OnBoundary,
const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapp,
mcIdType  offset,
mcIdType  idThis,
std::vector< double > &  addCoordsQuadratic,
std::vector< mcIdType > &  conn,
std::vector< mcIdType > &  connI,
std::vector< mcIdType > &  nb1,
std::vector< mcIdType > &  nb2 
)
static

Compute the remaining parts of the intersection of mesh1 by mesh2. The general algorithm is to :

  • either return full cells from pol1 that were simply not touched by mesh2
  • or to:
    • concatenate pieces from pol1 into consecutive pieces (a bit like zipConsecutiveSegments())
    • complete those pieces by edges found in edgesInPol2OnBoundary, which are edges from pol2 located on the boundary of the previously built intersecting cells

References INTERP_KERNEL::ComposedEdge::_sub_edges, appendCrudeData(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::FULL_ON_1, INTERP_KERNEL::ComposedEdge::getDirection(), INTERP_KERNEL::ElementaryEdge::getDirection(), INTERP_KERNEL::Edge::getLoc(), INTERP_KERNEL::ElementaryEdge::getLoc(), INTERP_KERNEL::Node::getLoc(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::ComposedEdge::getStartNode(), INTERP_KERNEL::ElementaryEdge::getStartNode(), INTERP_KERNEL::IN_1, INTERP_KERNEL::Edge::incrRef(), INTERP_KERNEL::Node::incrRef(), INTERP_KERNEL::ComposedEdge::initLocations(), INTERP_KERNEL::IteratorOnComposedEdge::nextLoop(), INTERP_KERNEL::ComposedEdge::pushBack(), QuadraticPolygon(), and INTERP_KERNEL::ComposedEdge::size().

◆ cleanDegeneratedConsecutiveEdges()

◆ zipConsecutiveInSegments()

◆ dumpInXfigFile() [2/2]

void QuadraticPolygon::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds &  box 
) const
protected

◆ ClosePolygons()

void QuadraticPolygon::ClosePolygons ( std::list< QuadraticPolygon * > &  pol1Zip,
const QuadraticPolygon pol1,
const QuadraticPolygon pol2,
std::vector< QuadraticPolygon * > &  results 
)
staticprotected
Parameters
[in]pol1Zipis a list of set of edges (=an opened polygon) coming from split polygon 1.
[in]pol1should be considered as pol1Simplified.
[in]pol2is split pol2.
[out]resultsthe resulting CLOSED polygons.

References INTERP_KERNEL::ComposedEdge::SoftDelete().

Referenced by buildIntersectionPolygons().

◆ UpdateNeighbours()

◆ fillAsMuchAsPossibleWith()

◆ CheckInList()

std::list< QuadraticPolygon * >::iterator QuadraticPolygon::CheckInList ( Node n,
std::list< QuadraticPolygon * >::iterator  iStart,
std::list< QuadraticPolygon * >::iterator  iEnd 
)
staticprotected