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

Detailed Description

template<typename T, unsigned d>
class gismo::gsHDomainIterator< T, d >

Re-implements gsDomainIterator for iteration over all boundary elements of a hierarchical parameter domain.

See gsDomainIterator for more detailed documentation and an example of the typical use!!!
Used, e.g., for basis of classes gsHTensorBasis or gsTHBSplineBasis.

+ Inheritance diagram for gsHDomainIterator< T, d >:
+ Collaboration diagram for gsHDomainIterator< T, d >:

Public Types

typedef memory::shared_ptr
< gsDomainIterator
Ptr
 Shared pointer for gsDomainIterator.
 
typedef memory::unique_ptr
< gsDomainIterator
uPtr
 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. More...
 
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.
 
virtual const T getPerpendicularCellSize () const
 Returns the perpendicular cell size of boundary iterator. More...
 
bool good () const
 Is the iterator still pointing to a valid element?
 
size_t id () const
 Returns the element id.
 
const gsVector< T > & lowerCorner () const
 Returns the lower corner of the current element. More...
 
bool next ()
 Proceeds to the next element. More...
 
bool next (index_t increment)
 Proceeds to the next element (skipping increment elements).
 
virtual size_t numElements () const
 Returns the number of elements.
 
void reset ()
 
const gsVector< T > & upperCorner () const
 Returns the upper corner of the current element. More...
 
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

bool nextLeaf ()
 returns true if there is a another leaf with a boundary element
 
void updateElement ()
 
void updateLeaf ()
 

Member Function Documentation

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

Updates other with and adjacent element

Todo:
upgrade to return adjacent range instead
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()).

virtual const T getPerpendicularCellSize ( ) const
inlinevirtualinherited

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 in gsTensorDomainBoundaryIterator< T, D, 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 >.

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 >.

void reset ( )
inlinevirtual

Resets the iterator so that it can be used for another iteration through all boundary elements.

Reimplemented from gsDomainIterator< T >.

void updateElement ( )
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.

void updateLeaf ( )
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.

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

bool m_isGood
protectedinherited

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