38template<
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();}
314template<
short_t d,
class T>
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
333EXTERN_CLASS_TEMPLATE gsHBoxContainer<1,real_t>;
334EXTERN_CLASS_TEMPLATE gsHBoxContainer<2,real_t>;
335EXTERN_CLASS_TEMPLATE gsHBoxContainer<3,real_t>;
336EXTERN_CLASS_TEMPLATE gsHBoxContainer<4,real_t>;
338EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<1,real_t> >;
339EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<2,real_t> >;
340EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<3,real_t> >;
341EXTERN_CLASS_TEMPLATE internal::gsXml< gsHBoxContainer<4,real_t> >;
The Hierarchical Box Container provides a container for gsHBox objects.
Definition gsHBoxContainer.h:40
void add(const gsHBox< d, T > &box)
Adds a single box.
Definition gsHBoxContainer.hpp:121
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
HContainer _markTrecursive(HContainer &marked, index_t lvl, index_t m) const
Marks T-recursively.
Container getParents() const
Gives a hierarchical container with all the parents of the boxes stored in this.
Definition gsHBoxContainer.hpp:284
size_t totalSize() const
Returns the total number of boxes.
Definition gsHBoxContainer.hpp:86
Container getChildren() const
Gives a hierarchical container with all the children of the boxes stored in this.
Definition gsHBoxContainer.hpp:300
void markTadmissible(index_t m)
Applies _markTadmissible on this.
Definition gsHBoxContainer.hpp:316
void markHadmissible(index_t m)
Applies _markHadmissible on this.
Definition gsHBoxContainer.hpp:322
HContainer toUnitHBoxes() const
Transforms the boxes in container as unit boxes.
Definition gsHBoxContainer.h:170
void makeUnique()
Removes duplicate boxes.
Container & getActivesOnLevel(index_t lvl)
Returns the actives on level.
Definition gsHBoxContainer.hpp:272
const HContainer & boxes() const
Returns a heirarchical container with the boxes stored in the container.
Definition gsHBoxContainer.h:125
Container toUnitBoxes() const
Transforms the boxes in container as unit boxes.
Definition gsHBoxContainer.h:163
void _markRecursive(index_t lvl, index_t m)
Applies markTrecursive on this.
void _markHadmissible(HContainer &marked, index_t m) const
Performs H-admissible refinement.
gsMatrix< T > toCoords(const index_t patchID=-1) const
Returns box coordinate represenation of the object.
Definition gsHBoxContainer.hpp:412
void makeUnitBoxes()
Transforms/splits the boxes inside the container to unit boxes.
Definition gsHBoxContainer.hpp:429
void _markTadmissible(HContainer &marked, index_t m) const
Performs T-admissible refinement.
void _markAdmissible(HContainer &marked, index_t m) const
Performs T/H-admissible refinement.
RefBox toRefBoxes(const index_t patchID=-1) const
Returns refinement box representation of the object.
Definition gsHBoxContainer.hpp:374
RefBox toBoxes(const index_t patchID=-1) const
Returns boxes representation of the object.
Definition gsHBoxContainer.hpp:355
HContainer _markRecursive(HContainer &marked, index_t lvl, index_t m) const
Marks T-recursively.
HContainer _markHrecursive(HContainer &marked, index_t lvl, index_t m) const
Marks H-recursively.
void _markHrecursive(index_t lvl, index_t m)
Applies markHrecursive on this.
Container toContainer() const
Returns a container representation of the object.
Definition gsHBoxContainer.h:177
void _makeLevel(index_t lvl)
Constructs a new level.
Definition gsHBoxContainer.hpp:339
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
std::ostream & print(std::ostream &os) const
Prints the container.
Definition gsHBoxContainer.hpp:346
void markAdmissible(index_t m)
Applies _markAdmissible on this.
Definition gsHBoxContainer.hpp:328
bool check()
Checks if the hierarchical container is correctly defined.
Definition gsHBoxContainer.h:75
size_t size(index_t level) const
Returns the size of the container on level.
Definition gsHBoxContainer.h:68
memory::shared_ptr< gsHBoxContainer > Ptr
Shared pointer for gsHTensorBasis.
Definition gsHBoxContainer.h:55
bool _check(const HContainer &boxes)
Checks the container.
Definition gsHBoxContainer.hpp:110
HContainer & boxes()
Returns a heirarchical container with the boxes stored in the container.
Definition gsHBoxContainer.h:123
This class provides a Hierarchical Box (gsHBox)
Definition gsHBox.h:55
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
#define index_t
Definition gsConfig.h:32
Provides gsHBox: smart boxes for HTensorBases.
Provides declaration of input/output XML utilities struct.
The G+Smo namespace, containing all definitions for the library.
gsHNeighborhood
The gsHNeighborhood is a struct that classifies the type of admissible refinement.
Definition gsHBoxUtils.h:26
static Container toContainer(const HContainer &container)
Returns a container representation of the object.
Definition gsHBoxUtils.hpp:352
static Container toUnitBoxes(const HContainer &container)
Transforms the boxes in container as unit boxes.
Definition gsHBoxUtils.hpp:366
static HContainer toUnitHBoxes(const HContainer &container)
Transforms the boxes in container as unit boxes.
Definition gsHBoxUtils.hpp:383