24 #ifndef _GEMA_POLYLINE_DISCONTINUITY_H_ 25 #define _GEMA_POLYLINE_DISCONTINUITY_H_ 84 virtual void setGeometry(
double* dvec,
int nd,
int* ivec,
int ni)
86 Q_UNUSED(ni); Q_UNUSED(ivec);
87 assert(dvec && !ivec);
94 bool* intersects,
double inout[2],
bool snap[2],
int* outgoingBorder,
98 double snapTol,
bool* intersects,
double inout[2],
bool snap[2],
int* outgoingBorder,
109 double* firstPos,
double* secondPos,
GmVector& cartPos);
139 #endif // _GEMA_POLYLINE_DISCONTINUITY_H_ const GmCell * findAdjacentCell(const GmCellMesh *mesh, const GmCell *cell, int edgeIndex, int *adjCellEdge) const
Brute force method for finding cell adjacency when lacking a topological mesh. Updates edgeIndex to t...
Definition: _repell_gmPolylineDiscontinuity.cpp:1028
virtual void printGeometry(const GmLogCategory &logger, GmLogLevel level) const
Prints the discontinuity geometry information.
Definition: _repell_gmPolylineDiscontinuity.cpp:85
GmSegmentCellIntersection findSegmentEntryPoint(const GmPolylineSegment &segment, int segmentId, const GmValueAccessor *coordAc, double snapTol, bool *intersects, double inout[2], bool snap[2], int *outgoingBorder, GmCell const **cell, const GmLogCategory &logger) const
Traverses the mesh seeking for the segment-element intersection closest to the segment start.
Definition: _repell_gmPolylineDiscontinuity.cpp:750
int _numPoints
The number of points in the polyline. Number of segments is (_numPoints - 1)
Definition: gmPolylineDiscontinuity.h:115
Representation for the intersection between a polyline segment and a mesh cell. Can be used both in 2...
Definition: gmSegmentCellIntersection.h:58
int index() const
Returns this discontinuity index in the father set.
Definition: gmDiscontinuity.h:42
void removeInternalNodes(const GmValueAccessor *coordAc, double snapTol, const GmLogCategory &logger)
Remove internal node so that every intersection segment traverses the element from one edge to anothe...
Definition: _repell_gmPolylineDiscontinuity.cpp:810
GmPolylineDiscontinuity(const GmDiscontinuitySet *ds, int index, QString id, int groupIndex, const QVector< int > &psIndex)
Constructor.
Definition: gmPolylineDiscontinuity.h:80
virtual void setGeometry(double *dvec, int nd, int *ivec, int ni)
Sets the geometry. dvec should be a vector with coordinates (size nd * 2), nd the number of coordinat...
Definition: gmPolylineDiscontinuity.h:84
virtual int numSegments() const
A generic interface to return the number of discontinuity "segments", where a segment depends on the ...
Definition: gmPolylineDiscontinuity.h:48
Polyline 2D representation for a discontinuity.
Definition: gmPolylineDiscontinuity.h:42
Base interface for mesh cells.
Definition: gmCell.h:81
void intersectionSegmentBreakingEnded()
Helper function for the process of finding intersections among different intersection segments inside...
Definition: _repell_gmPolylineDiscontinuity.cpp:1214
int numPoints() const
Returns the number of polyline points.
Definition: gmPolylineDiscontinuity.h:54
virtual void printIntersections(const GmLogCategory &logger, GmLogLevel level) const
Prints the discontinuity-mesh intersection information.
Definition: _repell_gmPolylineDiscontinuity.cpp:99
Interface class for accessing and setting values from an "indexable" collection of values.
Definition: gmValueAccessor.h:59
Declaration of the GmSegmentCellIntersection class & friends.
virtual ~GmPolylineDiscontinuity()
Destructor.
Definition: _repell_gmPolylineDiscontinuity.cpp:68
Definition: _repell_gmPolylineDiscontinuity.cpp:49
QVector< QPair< int, QVector< GmCompact2DSegmentCellIntersection * > > > _brokenList
A temporary list built incrementally by calls to breakIntersectionSegment() with the new broken segme...
Definition: gmPolylineDiscontinuity.h:135
The geometric representation for a single discontinuity from the Discontinuity set....
Definition: gmDiscontinuity.h:35
Base interface class for CellMesh type plugins.
Definition: gmCellMesh.h:39
GmSegmentCellIntersection segmentConvexLinearElementIntersection(const GmPolylineSegment &segment, int segmentId, const GmCell *cell, const GmValueAccessor *coordAc, int incomingBorder, double snapTol, bool *intersects, double inout[2], bool snap[2], int *outgoingBorder, const GmLogCategory &logger) const
Given a discontinuity segment and a CONVEX, LINEAR, non interface cell, calculates their intersection...
Definition: _repell_gmPolylineDiscontinuity.cpp:406
bool breakIntersectionSegment(GmCompact2DSegmentCellIntersection *segment, double natPos, const GmVector &cartPos, GmValueAccessor *coordAc, GmCompact2DSegmentCellIntersection **newSegment, const GmLogCategory &logger)
Helper function for the process of finding intersections among different intersection segments inside...
Definition: _repell_gmPolylineDiscontinuity.cpp:1126
int capacity() const const
static bool segmentIntersection(const GmCompact2DSegmentCellIntersection *firstSegment, const GmCompact2DSegmentCellIntersection *secondSegment, double *firstPos, double *secondPos, GmVector &cartPos)
Helper function for the process of finding intersections among different intersection segments inside...
Definition: _repell_gmPolylineDiscontinuity.cpp:1082
A (much more) compact version of GmSegmentCellIntersection for 2d intersections only....
Definition: gmSegmentCellIntersection.h:105
bool checkMeshPreconditions(const GmCellMesh *mesh, const GmLogCategory &logger) const
Check mesh preconditions, using looger to emmit warnings / error messages.
Definition: _repell_gmPolylineDiscontinuity.cpp:970
GmLogLevel
Available log levels list.
Definition: gmLog.h:36
Class representing a category with multiple logging levels.
Definition: gmLog.h:58
virtual size_t usedGeometryMemory() const
Returns an estimative of the memory used by the discontinuity geometry in bytes.
Definition: gmPolylineDiscontinuity.h:67
Base interface for providing discontinuity geometry information for spatial indices.
Definition: gmDiscontinuitySet.h:48
virtual size_t usedIntersectionMemory() const
Returns an estimative of the memory used by the intersection data in bytes.
Definition: gmPolylineDiscontinuity.h:73
QVector< GmCompact2DSegmentCellIntersection * > _intList
The intersection list, filled by a call to findIntersections(). We store pointers to the data to: 1) ...
Definition: gmPolylineDiscontinuity.h:127
double * _pointCoord
The coordinate vector. Size == _numPoints * 2.
Definition: gmPolylineDiscontinuity.h:116
const QVector< GmCompact2DSegmentCellIntersection * > & intersectionList() const
Returns the intersection list (filled by a call to findIntersections())
Definition: gmPolylineDiscontinuity.h:60
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
GmCellMesh * mesh() const
Returns the mesh that this discontinuity set is tied to.
Definition: gmDiscontinuitySet.h:81
const double * pointCoordinates() const
Returns the polyline coordinates vector, organized as x1, y1, x2, y2, .... Size equal to numPoints() ...
Definition: gmPolylineDiscontinuity.h:57
QString id() const
Returns the discontinuity id (name)
Definition: gmDiscontinuity.h:45
virtual void clearGeometry()
Clears the original discontinuity geometry information, releasing memory.
Definition: _repell_gmPolylineDiscontinuity.cpp:77
virtual bool findIntersections(const GmLogCategory &logger)
Finds the intersections between this discontinuity and the associated mesh, using parameters stored i...
Definition: _repell_gmPolylineDiscontinuity.cpp:113
Declaration of the GmDiscontinuity class.
QVector< GmCell * > findNodeCellsBall(const GmCellMesh *mesh, int nodeIndex) const
Brute force method for finding the cells containing a node as a vertex when lacking a topological mes...
Definition: _repell_gmPolylineDiscontinuity.cpp:1058
virtual int numIntersections() const
A generic interface to return the number of intersections between the mesh and the user given geometr...
Definition: gmPolylineDiscontinuity.h:51