WaveBlocksND
Public Member Functions | Private Attributes | List of all members
waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D > Class Template Reference

This class implements the limited hyperbolic cut shape. More...

#include <shape_hyperbolic.hpp>

Inheritance diagram for waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >:
waveblocks::wavepackets::shapes::AbstractShape< D >

Public Member Functions

 LimitedHyperbolicCutShape (int S, const std::array< int, D > &limits)
 General constructor to define sparsity parameter and limits. More...
 
 LimitedHyperbolicCutShape (int S, int size)
 Specialized constructor to set all limits \( K_d \) to the same value \( K^\star \). More...
 
 LimitedHyperbolicCutShape (int S, std::initializer_list< int > list)
 General constructor to define sparsity parameter and limits. More...
 
virtual int bbox (dim_t axis) const override
 Retrieves the length of the minimum bounding box in one direction. More...
 
virtual int limit (int const *base_node, dim_t axis) const override
 Evaluates one surface function on a base node. More...
 
virtual void print (std::ostream &out) const override
 Prints a pretty description of the shape. More...
 
- Public Member Functions inherited from waveblocks::wavepackets::shapes::AbstractShape< D >
virtual ~AbstractShape ()
 

Private Attributes

int S_
 
std::array< int, D > limits_
 

Detailed Description

template<dim_t D>
class waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >

This class implements the limited hyperbolic cut shape.

This class implements the limited hyperbolic cut basis shape which is a special type of a sparse basis shape. The limited hyperbolic cut shape in \( D \) dimensions with sparsity \(S\) and limits \( \boldsymbol{K} = (K_1,\ldots,K_D) \) is defined as the set

\[ \mathfrak{K}(D,S,\boldsymbol{K}) := \left\{(k_1,\dots,k_D) \in \mathbb{N}_0^D \mid 0 \leq k_d < K_d \; \land \displaystyle\prod_{d=1}^{D} (1+k_d) \leq S \right\} \]

It is an intersection of the hyperbolic cut shape with a hypercubic shape.

Template Parameters
Dbasis shape dimensionality

Constructor & Destructor Documentation

template<dim_t D>
waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::LimitedHyperbolicCutShape ( int  S,
const std::array< int, D > &  limits 
)
inline

General constructor to define sparsity parameter and limits.

Parameters
SThe sparsity parameter \( S \).
limitsTuple of all limits \( \boldsymbol{K} \).
template<dim_t D>
waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::LimitedHyperbolicCutShape ( int  S,
int  size 
)
inline

Specialized constructor to set all limits \( K_d \) to the same value \( K^\star \).

Parameters
SThe sparsity parameter \( S \).
sizeThe limit \( K^\star \).
template<dim_t D>
waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::LimitedHyperbolicCutShape ( int  S,
std::initializer_list< int >  list 
)
inline

General constructor to define sparsity parameter and limits.

Parameters
SThe sparsity parameter \( S \).
listList of all limits \( \boldsymbol{K} \).

Member Function Documentation

template<dim_t D>
virtual int waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::bbox ( dim_t  axis) const
inlineoverridevirtual

Retrieves the length of the minimum bounding box in one direction.

The minimum bounding box is given by

\[ L_{\alpha}=\max_{k_{\alpha}}\left\{\underline{k} \in \mathfrak{K}\right\} \]

Parameters
axisThe direction \( \alpha \).
Returns
Length of the bbox.

Implements waveblocks::wavepackets::shapes::AbstractShape< D >.

template<dim_t D>
virtual int waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::limit ( int const *  base_node,
dim_t  axis 
) const
inlineoverridevirtual

Evaluates one surface function on a base node.

The surface function to direction \( \alpha \) is given by

\[ s_{\alpha}(\underline{n})=\max_{k_{\alpha}} \left\{\underline{k} \in \mathfrak{K} \;|\; k_d = n_d \; \forall d \neq \alpha \right\} \]

Notice that the \( \alpha \)-th entry of \( \underline{n} \) does not influence return value. It can be of any value since it is simply ignored.

Parameters
base_nodeThe basis node \( \underline{n} \). It contains D indices.
axisThe direction \( \alpha \).
Returns
Value of the surface function.

Implements waveblocks::wavepackets::shapes::AbstractShape< D >.

template<dim_t D>
virtual void waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::print ( std::ostream &  out) const
inlineoverridevirtual

Prints a pretty description of the shape.

Parameters
outThe output stream.

Implements waveblocks::wavepackets::shapes::AbstractShape< D >.

Member Data Documentation

template<dim_t D>
std::array<int,D> waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::limits_
private
template<dim_t D>
int waveblocks::wavepackets::shapes::LimitedHyperbolicCutShape< D >::S_
private

The documentation for this class was generated from the following file: