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

This class implements the hypercubic basis shape. More...

#include <shape_hypercubic.hpp>

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

Public Member Functions

 HyperCubicShape (const std::array< int, D > &limits)
 
 HyperCubicShape (int limit)
 Set limits to \( K_d := K \; \forall d \). More...
 
 HyperCubicShape (std::initializer_list< int > list)
 
 HyperCubicShape (const HyperCubicShape &that)
 
HyperCubicShapeoperator= (const HyperCubicShape &that)
 
virtual int limit (int const *base_node, dim_t axis) const override
 Evaluates one surface function on a base node. More...
 
virtual int bbox (dim_t axis) const override
 Retrieves the length of the minimum bounding box in one direction. 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

std::array< int, D > limits_
 

Detailed Description

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

This class implements the hypercubic basis shape.

A \( D \)-dimensional hypercubic shape with limits \( \mathbf{K}=\{K_1,\dots,K_D\} \) is defined as the set

\[ \mathfrak{K}(D,\mathbf{K}) := \left\{ (k_1, \dots, k_D) \in \mathbb{N}_0^D | k_d < K_d \forall d \right\} \]

Template Parameters
Dbasis shape dimensionality

Constructor & Destructor Documentation

template<dim_t D>
waveblocks::wavepackets::shapes::HyperCubicShape< D >::HyperCubicShape ( const std::array< int, D > &  limits)
inline
Parameters
[in]limitsArray of all limits \( \{K_d\} \).
template<dim_t D>
waveblocks::wavepackets::shapes::HyperCubicShape< D >::HyperCubicShape ( int  limit)
inline

Set limits to \( K_d := K \; \forall d \).

Parameters
limitLimit \( K \).
template<dim_t D>
waveblocks::wavepackets::shapes::HyperCubicShape< D >::HyperCubicShape ( std::initializer_list< int >  list)
inline
Parameters
listList of all limits \( \{K_d\} \).
template<dim_t D>
waveblocks::wavepackets::shapes::HyperCubicShape< D >::HyperCubicShape ( const HyperCubicShape< D > &  that)
inline

Member Function Documentation

template<dim_t D>
virtual int waveblocks::wavepackets::shapes::HyperCubicShape< 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::HyperCubicShape< 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>
HyperCubicShape& waveblocks::wavepackets::shapes::HyperCubicShape< D >::operator= ( const HyperCubicShape< D > &  that)
inline
template<dim_t D>
virtual void waveblocks::wavepackets::shapes::HyperCubicShape< 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::HyperCubicShape< D >::limits_
private

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