G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
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 (const gsPlanarDomain &other)
 Copy constructor.
 
 gsPlanarDomain (gsCurve< T > *boundary)
 Construct planar domain by an outer boundary given by a curve.
 
 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.
 
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

onBoundary

given a matrix of points

Parameters
u,returnstrue if they lie on the boundary of the planar domain
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
 
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)
 

Member Function Documentation

◆ split()

template<class T >
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.

◆ splitCurve()

template<class T >
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

◆ updateBoundingBox()

template<class T >
void updateBoundingBox ( )
inline

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