G+Smo
24.08.0
Geometry + Simulation Modules
|
The Hierarchical Box Container provides a container for gsHBox objects.
The gsHBoxContainer stores gsHBox objects in a smart way. The container allows to perform routines from the gsHBox (e.g. gsHBox::getParent) on a group of gsHBox. In addition, it can be used to pass multiple gsHBox objects efficiently.
The gsHBoxContainer provides a function to convert it to so-called RefBoxes. RefBoxes are boxes defined using a std::vector<index_t> to pass refinement boxes to gsHTensorBasis. Furthermore, UnitBoxes can also be produced, which basically means that every contained gsHBox is split such that it contains a single element.
d | { description } |
T | { description } |
Public Types | |
typedef memory::shared_ptr < gsHBoxContainer > | Ptr |
Shared pointer for gsHTensorBasis. | |
typedef memory::unique_ptr < gsHBoxContainer > | uPtr |
Unique pointer for gsHTensorBasis. | |
Public Member Functions | |
void | add (const gsHBox< d, T > &box) |
Adds a single box. | |
void | add (const Container &boxes) |
Adds boxes stored in a container. | |
void | add (const HContainer &boxes) |
Adds boxes stored in a hierarchical container. | |
void | add (const gsHBoxContainer< d, T > &boxes) |
Adds boxes stored in a gsHBoxContainer. | |
HContainer & | boxes () |
Returns a heirarchical container with the boxes stored in the container. | |
const HContainer & | boxes () const |
Returns a heirarchical container with the boxes stored in the container. | |
bool | check () |
Checks if the hierarchical container is correctly defined. | |
Container & | getActivesOnLevel (index_t lvl) |
Returns the actives on level. | |
const Container & | getActivesOnLevel (index_t lvl) const |
Returns the actives on level. | |
Container | getChildren () const |
Gives a hierarchical container with all the children of the boxes stored in this. | |
Container | getParents () const |
Gives a hierarchical container with all the parents of the boxes stored in this. | |
gsHBoxContainer (const Container &boxes) | |
Takes a Container (which can have boxes with different levels) More... | |
void | makeUnique () |
Removes duplicate boxes. | |
void | makeUnitBoxes () |
Transforms/splits the boxes inside the container to unit boxes. | |
void | markAdmissible (index_t m) |
Applies _markAdmissible on this. | |
void | markHadmissible (index_t m) |
Applies _markHadmissible on this. | |
void | markTadmissible (index_t m) |
Applies _markTadmissible on this. | |
index_t | maxLevel () |
Returns the maximum level in the container. | |
gsHNeighborhood | NHtype () const |
Returns the basis of the underlying basis. More... | |
size_t | nLevels () const |
Returns the number of levels stored in the container. | |
gsHBoxContainer< d, T > | patch (const index_t patchID) const |
Returns all the boxes of patchID. More... | |
std::ostream & | print (std::ostream &os) const |
Prints the container. | |
size_t | size (index_t level) const |
Returns the size of the container on level. | |
RefBox | toBoxes (const index_t patchID=-1) const |
Returns boxes representation of the object. More... | |
Container | toContainer () const |
Returns a container representation of the object. More... | |
gsMatrix< T > | toCoords (const index_t patchID=-1) const |
Returns box coordinate represenation of the object. More... | |
RefBox | toCrsBoxes (const index_t patchID=-1) const |
Returns coarsening box representation of the object. More... | |
RefBox | toRefBoxes (const index_t patchID=-1) const |
Returns refinement box representation of the object. More... | |
size_t | totalSize () const |
Returns the total number of boxes. | |
Container | toUnitBoxes () const |
Transforms the boxes in container as unit boxes. More... | |
HContainer | toUnitHBoxes () const |
Transforms the boxes in container as unit boxes. More... | |
Protected Member Functions | |
bool | _check (const HContainer &boxes) |
Checks the container. More... | |
void | _makeLevel (index_t lvl) |
Takes the union of two gsHBoxContainer. More... | |
void | _markAdmissible (HContainer &marked, index_t m) const |
Performs T/H-admissible refinement. More... | |
void | _markHadmissible (HContainer &marked, index_t m) const |
Performs H-admissible refinement. More... | |
HContainer | _markHrecursive (HContainer &marked, index_t lvl, index_t m) const |
Marks H-recursively. More... | |
void | _markHrecursive (index_t lvl, index_t m) |
Applies markHrecursive on this. | |
HContainer | _markRecursive (HContainer &marked, index_t lvl, index_t m) const |
Marks T-recursively. More... | |
void | _markRecursive (index_t lvl, index_t m) |
Applies markTrecursive on this. | |
void | _markTadmissible (HContainer &marked, index_t m) const |
Performs T-admissible refinement. More... | |
HContainer | _markTrecursive (HContainer &marked, index_t lvl, index_t m) const |
Marks T-recursively. More... | |
gsHBoxContainer | ( | const Container & | boxes | ) |
Takes a Container (which can have boxes with different levels)
[in] | box | The box |
d | { description } |
T | { description } |
|
protected |
Checks the container.
Checks if the level of the boxes in the container matches the container level.
d | { description } |
T | { description } |
|
protected |
Takes the union of two gsHBoxContainer.
[in] | container1 | The container 1 |
[in] | container2 | The container 2 |
[in] | container1 | The container 1 |
[in] | container2 | The container 2 |
|
protected |
Performs T/H-admissible refinement.
marked | The marked boxes | |
[in] | m | The jump parameter |
|
protected |
Performs H-admissible refinement.
marked | The marked boxes | |
[in] | m | The jump parameter |
Marks H-recursively.
marked | The marked boxes | |
[in] | lvl | The level |
[in] | m | The jump parameter |
Marks T-recursively.
marked | The marked boxes | |
[in] | lvl | The level |
[in] | m | The jump parameter |
|
protected |
Performs T-admissible refinement.
marked | The marked boxes | |
[in] | m | The jump parameter |
Marks T-recursively.
marked | The marked boxes | |
[in] | lvl | The level |
[in] | m | The jump parameter |
|
inline |
Returns the basis of the underlying basis.
NOTE: Assumes that the basis of all boxes is the same
gsHBoxContainer< d, T > patch | ( | const index_t | patchID | ) | const |
Returns all the boxes of patchID.
[in] | patchID | The patch id |
gsHBoxContainer< d, T >::RefBox toBoxes | ( | const index_t | patchID = -1 | ) | const |
Returns boxes representation of the object.
|
inline |
Returns a container representation of the object.
Returns box coordinate represenation of the object.
gsHBoxContainer< d, T >::RefBox toCrsBoxes | ( | const index_t | patchID = -1 | ) | const |
Returns coarsening box representation of the object.
gsHBoxContainer< d, T >::RefBox toRefBoxes | ( | const index_t | patchID = -1 | ) | const |
Returns refinement box representation of the object.
|
inline |
Transforms the boxes in container as unit boxes.
|
inline |
Transforms the boxes in container as unit boxes.