G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsPlanarDomain< T > Class Template Reference

Detailed Description

template<class T>
class gismo::gsPlanarDomain< T >

Class representing a Planar domain with an outer boundary and a number of holes.

The outer boundary is oriented CCW and the holes are CW.

+ Collaboration diagram for gsPlanarDomain< T >:

Public Member Functions

uPtr clone () const
 Clone function. Used to make a copy of the (derived) geometry.
 
 gsPlanarDomain ()
 Default empty constructor.
 
 gsPlanarDomain (gsCurveLoop< T > *boundary)
 Construct planar domain by giving the outer boundary.
 
 gsPlanarDomain (std::vector< gsCurveLoop< T > * > const &loops)
 Construct planar domain by a list of loops.
 
 gsPlanarDomain (gsCurve< T > *boundary)
 Construct planar domain by an outer boundary given by a curve.
 
 gsPlanarDomain (const gsPlanarDomain &other)
 Copy constructor.
 
gsPlanarDomainoperator= (const gsPlanarDomain &other)
 Assignment operator.
 
inDomain

given a matrix of points

Parameters
u,returnstrue if they are inside the planar domain
directionsets to 0 states we are performing our checking running parallel to the x-axis
bool inDomain (gsMatrix< T > const &u, int direction=0)
 

onBoundary

given a matrix of points

Parameters
u,returnstrue if they lie on the boundary of the planar domain
std::vector< gsCurveLoop< T > * > m_loops
 
gsMatrix< T, 2, 2 > m_bbox
 
bool onBoundary (gsMatrix< T > const &u)
 
std::ostream & print (std::ostream &os) const
 Prints the object as a string.
 
void sampleLoop_into (int loopID, int npoints, int numEndPoints, gsMatrix< T > &u)
 linearly discriti
 
gsMatrix< T > sampleLoop (int loopID, int npoints=50, int numEndPoints=2)
 
void sampleCurve_into (int loopID, int curveID, int npoints, gsMatrix< T > &u)
 
gsMatrix< T > sampleCurve (int loopID, int curveID, int npoints=50)
 
memory::unique_ptr< gsMesh< T > > toMesh (int npoints=50) const
 Return a triangulation of the planar domain.
 
uPtr split (int startIndex, int endIndex, gsCurve< T > *newCurveThisFace, gsCurve< T > *newCurveNewFace)
 
void updateBoundingBox ()
 
gsMatrix< T > splitCurve (size_t loopId, size_t curveId, T lengthRatio=.5)
 
std::ostream & operator<< (std::ostream &os, const gsPlanarDomain &pd)
 

Member Function Documentation

uPtr split ( int  startIndex,
int  endIndex,
gsCurve< T > *  newCurveThisFace,
gsCurve< T > *  newCurveNewFace 
)
inline

split this planar domain in two, returning the new planar domain created as a result.

gsMatrix<T> splitCurve ( size_t  loopId,
size_t  curveId,
lengthRatio = .5 
)
inline

split the curveId^th curve in the loopId^th loop of the planar domain into two curves

Parameters
loopIdspecifies the loop
curveIdspecifies the curve in the loop
lengthRatioratio of the lengths of the first new curve and of the original curve
void updateBoundingBox ( )
inline

Update the bounding box. Needs to be called after any operation that modifies the outer loop.