38 template<
short_t d,
class T>
43 typedef typename gsHBox<d,T>::RefBox RefBox;
44 typedef typename gsHBox<d,T>::Container Container;
45 typedef typename gsHBox<d,T>::SortedContainer SortedContainer;
46 typedef typename gsHBox<d,T>::HContainer HContainer;
47 typedef typename gsHBox<d,T>::Iterator Iterator;
48 typedef typename gsHBox<d,T>::cIterator cIterator;
49 typedef typename gsHBox<d,T>::rIterator rIterator;
50 typedef typename gsHBox<d,T>::HIterator HIterator;
51 typedef typename gsHBox<d,T>::cHIterator cHIterator;
52 typedef typename gsHBox<d,T>::rHIterator rHIterator;
55 typedef memory::shared_ptr< gsHBoxContainer >
Ptr;
58 typedef memory::unique_ptr< gsHBoxContainer >
uPtr;
68 size_t size(
index_t level)
const {
return m_boxes[level].size(); }
70 size_t nLevels()
const {
return m_boxes.size(); }
89 std::ostream&
print( std::ostream& os )
const;
123 HContainer &
boxes() {
return m_boxes; }
125 const HContainer &
boxes()
const {
return m_boxes; }
187 HIterator begin() {
return m_boxes.begin();}
188 HIterator end() {
return m_boxes.end();}
190 cHIterator cbegin()
const {
return m_boxes.begin();}
191 cHIterator cend()
const {
return m_boxes.end();}
193 rHIterator rbegin() {
return m_boxes.rbegin();}
194 rHIterator rend() {
return m_boxes.rend();}
314 template<
short_t d,
class T>
315 std::ostream& operator<<( std::ostream& os, const gsHBoxContainer<d,T>& b )
317 return b.print( os );
323 #ifndef GISMO_BUILD_LIB
324 #include GISMO_HPP_HEADER(gsHBoxContainer.hpp)
326 #ifdef gsHBoxContainer_EXPORT
327 #include GISMO_HPP_HEADER(gsHBoxContainer.hpp)
328 #undef EXTERN_CLASS_TEMPLATE
329 #define EXTERN_CLASS_TEMPLATE CLASS_TEMPLATE_INST
333 EXTERN_CLASS_TEMPLATE gsHBoxContainer<1,real_t>;
334 EXTERN_CLASS_TEMPLATE gsHBoxContainer<2,real_t>;
335 EXTERN_CLASS_TEMPLATE gsHBoxContainer<3,real_t>;
336 EXTERN_CLASS_TEMPLATE gsHBoxContainer<4,real_t>;
338 EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<1,real_t> >;
339 EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<2,real_t> >;
340 EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<3,real_t> >;
341 EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<4,real_t> >;
void markAdmissible(index_t m)
Applies _markAdmissible on this.
Definition: gsHBoxContainer.hpp:328
gsHBoxContainer< d, T > patch(const index_t patchID) const
Returns all the boxes of patchID.
Definition: gsHBoxContainer.hpp:151
Container getParents() const
Gives a hierarchical container with all the parents of the boxes stored in this.
Definition: gsHBoxContainer.hpp:284
bool check()
Checks if the hierarchical container is correctly defined.
Definition: gsHBoxContainer.h:75
const HContainer & boxes() const
Returns a heirarchical container with the boxes stored in the container.
Definition: gsHBoxContainer.h:125
void markHadmissible(index_t m)
Applies _markHadmissible on this.
Definition: gsHBoxContainer.hpp:322
size_t size(index_t level) const
Returns the size of the container on level.
Definition: gsHBoxContainer.h:68
static Container toUnitBoxes(const HContainer &container)
Transforms the boxes in container as unit boxes.
Definition: gsHBoxUtils.hpp:366
static Container toContainer(const HContainer &container)
Returns a container representation of the object.
Definition: gsHBoxUtils.hpp:352
This class provides a Hierarchical Box (gsHBox)
Definition: gsHBox.h:54
void makeUnique()
Removes duplicate boxes.
void markTadmissible(index_t m)
Applies _markTadmissible on this.
Definition: gsHBoxContainer.hpp:316
Container & getActivesOnLevel(index_t lvl)
Returns the actives on level.
Definition: gsHBoxContainer.hpp:272
#define index_t
Definition: gsConfig.h:32
void makeUnitBoxes()
Transforms/splits the boxes inside the container to unit boxes.
Definition: gsHBoxContainer.hpp:429
gsMatrix< T > toCoords(const index_t patchID=-1) const
Returns box coordinate represenation of the object.
Definition: gsHBoxContainer.hpp:412
void _markHadmissible(HContainer &marked, index_t m) const
Performs H-admissible refinement.
HContainer & boxes()
Returns a heirarchical container with the boxes stored in the container.
Definition: gsHBoxContainer.h:123
void _markTadmissible(HContainer &marked, index_t m) const
Performs T-admissible refinement.
The Hierarchical Box Container provides a container for gsHBox objects.
Definition: gsHBoxContainer.h:39
size_t totalSize() const
Returns the total number of boxes.
Definition: gsHBoxContainer.hpp:86
size_t nLevels() const
Returns the number of levels stored in the container.
Definition: gsHBoxContainer.h:70
memory::unique_ptr< gsHBoxContainer > uPtr
Unique pointer for gsHTensorBasis.
Definition: gsHBoxContainer.h:58
bool _check(const HContainer &boxes)
Checks the container.
Definition: gsHBoxContainer.hpp:110
memory::shared_ptr< gsHBoxContainer > Ptr
Shared pointer for gsHTensorBasis.
Definition: gsHBoxContainer.h:55
RefBox toCrsBoxes(const index_t patchID=-1) const
Returns coarsening box representation of the object.
Definition: gsHBoxContainer.hpp:393
index_t maxLevel()
Returns the maximum level in the container.
Definition: gsHBoxContainer.h:128
HContainer toUnitHBoxes() const
Transforms the boxes in container as unit boxes.
Definition: gsHBoxContainer.h:170
HContainer _markHrecursive(HContainer &marked, index_t lvl, index_t m) const
Marks H-recursively.
std::ostream & print(std::ostream &os) const
Prints the container.
Definition: gsHBoxContainer.hpp:346
RefBox toRefBoxes(const index_t patchID=-1) const
Returns refinement box representation of the object.
Definition: gsHBoxContainer.hpp:374
void _makeLevel(index_t lvl)
Takes the union of two gsHBoxContainer.
Definition: gsHBoxContainer.hpp:339
void add(const gsHBox< d, T > &box)
Adds a single box.
Definition: gsHBoxContainer.hpp:121
HContainer _markTrecursive(HContainer &marked, index_t lvl, index_t m) const
Marks T-recursively.
HContainer _markRecursive(HContainer &marked, index_t lvl, index_t m) const
Marks T-recursively.
gsHNeighborhood
The gsHNeighborhood is a struct that classifies the type of admissible refinement.
Definition: gsHBoxUtils.h:25
Container getChildren() const
Gives a hierarchical container with all the children of the boxes stored in this. ...
Definition: gsHBoxContainer.hpp:300
gsHNeighborhood NHtype() const
Returns the basis of the underlying basis.
Definition: gsHBoxContainer.h:206
static HContainer toUnitHBoxes(const HContainer &container)
Transforms the boxes in container as unit boxes.
Definition: gsHBoxUtils.hpp:383
RefBox toBoxes(const index_t patchID=-1) const
Returns boxes representation of the object.
Definition: gsHBoxContainer.hpp:355
Provides declaration of input/output XML utilities struct.
void _markAdmissible(HContainer &marked, index_t m) const
Performs T/H-admissible refinement.
Provides gsHBox: smart boxes for HTensorBases.
Container toUnitBoxes() const
Transforms the boxes in container as unit boxes.
Definition: gsHBoxContainer.h:163
Container toContainer() const
Returns a container representation of the object.
Definition: gsHBoxContainer.h:177