G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsTensorDomainBoundaryIterator< T, D, uiter > Class Template Reference

Detailed Description

template<class T, int D, typename uiter>
class gismo::gsTensorDomainBoundaryIterator< T, D, uiter >

Re-implements gsDomainIterator for iteration over all elements of the boundary of a tensor product parameter domain.
See gsDomainIterator for more detailed documentation and an example of the typical use!!!

+ Inheritance diagram for gsTensorDomainBoundaryIterator< T, D, uiter >:
+ Collaboration diagram for gsTensorDomainBoundaryIterator< T, D, uiter >:

Public Types

typedef memory::shared_ptr< gsDomainIteratorPtr
 Shared pointer for gsDomainIterator.
 
typedef memory::unique_ptr< gsDomainIteratoruPtr
 Unique pointer for gsDomainIterator.
 

Public Member Functions

virtual void adjacent (const gsVector< bool > &, gsDomainIterator &)
 
const gsVector< T > & centerPoint () const
 Returns the center of the current element.
 
short_t dim () const
 Return dimension of the elements.
 
getCellSize () const
 Return the diagonal of the element.
 
getMaxCellLength () const
 Return the length of the largest edge of the element.
 
getMinCellLength () const
 Return the length of the smallest edge of the element.
 
const T getPerpendicularCellSize () const
 Returns the perpendicular cell size of boundary iterator.
 
bool good () const
 Is the iterator still pointing to a valid element?
 
 gsTensorDomainBoundaryIterator (const gsBasis< T > &b, const boxSide &s)
 Constructs a new instance.
 
 gsTensorDomainBoundaryIterator (const std::vector< std::vector< T > > &breaks_, const boxSide &s)
 Constructor using explicitly defined breaks.
 
size_t id () const
 Returns the element id.
 
gsVector< unsigned, D > index () const
 Return the tensor index of the current element.
 
const gsVector< T > & lowerCorner () const
 Returns the lower corner of the current element.
 
bool next ()
 Proceeds to the next element.
 
bool next (index_t increment)
 Proceeds to the next element (skipping increment elements).
 
size_t numElements () const
 Returns the number of elements.
 
void reset ()
 
void setBreaks (std::vector< T > newBreaks, index_t i)
 Function to set the breakpoints in direction i manually.
 
const gsVector< T > & upperCorner () const
 Returns the upper corner of the current element.
 
volume () const
 Return the volume of the element.
 

Public Attributes

gsVector< T > center
 Coordinates of a central point in the element (in the parameter domain).
 

Protected Attributes

const gsBasis< T > * m_basis
 The basis on which the domain iterator is defined.
 
bool m_isGood
 

Private Member Functions

void update ()
 

Constructor & Destructor Documentation

◆ gsTensorDomainBoundaryIterator() [1/2]

template<class T , int D, typename uiter >
gsTensorDomainBoundaryIterator ( const std::vector< std::vector< T > > &  breaks_,
const boxSide s 
)
inline

Constructor using explicitly defined breaks.

Parameters
[in]breaks_The breaks
[in]sThe side

◆ gsTensorDomainBoundaryIterator() [2/2]

template<class T , int D, typename uiter >
gsTensorDomainBoundaryIterator ( const gsBasis< T > &  b,
const boxSide s 
)
inline

Constructs a new instance.

Parameters
[in]bThe basis
[in]sThe side

Member Function Documentation

◆ adjacent()

template<class T >
virtual void adjacent ( const gsVector< bool > &  ,
gsDomainIterator< T > &   
)
inlinevirtualinherited

Updates other with and adjacent element

Todo:
upgrade to return adjacent range instead

◆ centerPoint()

template<class T >
const gsVector< T > & centerPoint ( ) const
inlineinherited

Returns the center of the current element.

The current element is a d-dimensional hypercube. The coordinates of its upper corner is returned as a gsVector of length d.

E.g., if the current two-dimensional element is defined by [a,b]x[c,d], then [b,d] is returned (see also lowerCorner()).

◆ getPerpendicularCellSize()

template<class T , int D, typename uiter >
const T getPerpendicularCellSize ( ) const
inlinevirtual

Returns the perpendicular cell size of boundary iterator.

Only works for boundary iterators. Returns the length from the boundary side to the parallel side not on the boundary.

Reimplemented from gsDomainIterator< T >.

◆ lowerCorner()

template<class T , int D, typename uiter >
const gsVector< T > & lowerCorner ( ) const
inlinevirtual

Returns the lower corner of the current element.

The current element is a d-dimensional hypercube. The coordinates of its lower corner is returned as a gsVector of length d.

E.g., if the current two-dimensional element is defined by [a,b]x[c,d], then [a,c] is returned (see also upperCorner()).

Reimplemented from gsDomainIterator< T >.

◆ next()

template<class T , int D, typename uiter >
bool next ( )
inlinevirtual

Proceeds to the next element.

The function returns true if there are still elements remaining that have not been treated.
For the typical usage of this function, see the example in the documentation of gsDomainIterator.

Implements gsDomainIterator< T >.

◆ reset()

template<class T , int D, typename uiter >
void reset ( )
inlinevirtual

Resets the iterator implementation copied from the constructor note that it fails for sides containing 1 element in any direction do not know the rationale for it

Reimplemented from gsDomainIterator< T >.

◆ update()

template<class T , int D, typename uiter >
void update ( )
inlineprivate

Computes lower, upper and center point of the current element, maps the reference quadrature nodes and weights to the current element, and computes the active functions. Plus some additional, boundary-iterator-specific things.

◆ upperCorner()

template<class T , int D, typename uiter >
const gsVector< T > & upperCorner ( ) const
inlinevirtual

Returns the upper corner of the current element.

The current element is a d-dimensional hypercube. The coordinates of its upper corner is returned as a gsVector of length d.

E.g., if the current two-dimensional element is defined by [a,b]x[c,d], then [b,d] is returned (see also lowerCorner()).

Reimplemented from gsDomainIterator< T >.

Member Data Documentation

◆ m_isGood

template<class T >
bool m_isGood
protectedinherited

Flag indicating whether the domain iterator is "good". If it is "good", the iterator can continue to the next element.