WaveBlocksND
Classes | Public Member Functions | Private Attributes | List of all members
waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex > Class Template Reference

Represents a homogeneous Hagedorn wavepacket \( \Psi \) with \( N \) components \( \Phi_n \). All components share the same Hagedorn parameterset \( \Pi \) and scaling parameter \( \varepsilon \). More...

#include <hawp_commons.hpp>

Classes

class  Component
 Represents a component of a homogeneous wavepacket. More...
 

Public Member Functions

 HomogeneousHaWp (std::size_t n)
 
real_teps ()
 Grants access to the semi-classical scaling parameter \( \varepsilon \) of the wavepacket. More...
 
real_t eps () const
 Retrieves the semi-classical scaling parameter \( \varepsilon \) of the wavepacket. More...
 
HaWpParamSet< D > & parameters ()
 Grants writeable access to the Hagedorn parameter set \( \Pi \) of the wavepacket. More...
 
HaWpParamSet< D > const & parameters () const
 Grants read-only access to the Hagedorn parameter set \( \Pi \) of the wavepacket. More...
 
std::vector< Component > & components ()
 Grants writeable access to all components \( \{\Phi_n\} \) of this wavepacket. More...
 
std::vector< Component > const & components () const
 Grants read-only access to all components \( \{\Phi_n\} \) of this wavepacket. More...
 
Componentcomponent (std::size_t n)
 Grants writeable access to the \( n \)-th component \( \Phi_n \). More...
 
Component const & component (std::size_t n) const
 Grants read-only access to the \( n \)-th component \( \Phi_n \). More...
 
Componentoperator[] (std::size_t n)
 Grants writeable access to the \( n \)-th component \( \Phi_n \). More...
 
Component const & operator[] (std::size_t n) const
 Grants read-only access to the \( n \)-th component \( \Phi_n \). More...
 
std::size_t n_components () const
 Returns the number of components. More...
 
shapes::ShapeEnumSharedPtr< D, MultiIndex > union_shape () const
 Computes the union of basis shapes of all components. More...
 
template<int N>
CArray< Eigen::Dynamic, N > evaluate (CMatrix< D, N > const &grid) const
 Evaluate the value of all components at once. More...
 
template<int N>
CArray< Eigen::Dynamic, N > evaluate (RMatrix< D, N > const &rgrid) const
 Evaluates the value of all components at once. More...
 

Private Attributes

real_t eps_
 
HaWpParamSet< D > parameters_
 
std::vector< Componentcomponents_
 
std::vector< ShapeEnum< D, MultiIndex > * > union_cache_snapshot_
 
shapes::ShapeEnumSharedPtr< D, MultiIndex > cached_shape_union_
 

Detailed Description

template<dim_t D, class MultiIndex>
class waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >

Represents a homogeneous Hagedorn wavepacket \( \Psi \) with \( N \) components \( \Phi_n \). All components share the same Hagedorn parameterset \( \Pi \) and scaling parameter \( \varepsilon \).

The number of components is determined at runtime.

Template Parameters
Dwavepacket dimensionality
MultiIndex

Constructor & Destructor Documentation

template<dim_t D, class MultiIndex >
waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::HomogeneousHaWp ( std::size_t  n)
inline

Member Function Documentation

template<dim_t D, class MultiIndex >
Component& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::component ( std::size_t  n)
inline

Grants writeable access to the \( n \)-th component \( \Phi_n \).

Parameters
nThe index \( n \) of the requested component.
Returns
Reference to the requested component.
template<dim_t D, class MultiIndex >
Component const& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::component ( std::size_t  n) const
inline

Grants read-only access to the \( n \)-th component \( \Phi_n \).

Parameters
nThe index \( n \) of the requested component.
Returns
Reference to the requested component.
template<dim_t D, class MultiIndex >
std::vector<Component>& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::components ( )
inline

Grants writeable access to all components \( \{\Phi_n\} \) of this wavepacket.

template<dim_t D, class MultiIndex >
std::vector<Component> const& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::components ( ) const
inline

Grants read-only access to all components \( \{\Phi_n\} \) of this wavepacket.

template<dim_t D, class MultiIndex >
real_t& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::eps ( )
inline

Grants access to the semi-classical scaling parameter \( \varepsilon \) of the wavepacket.

template<dim_t D, class MultiIndex >
real_t waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::eps ( ) const
inline

Retrieves the semi-classical scaling parameter \( \varepsilon \) of the wavepacket.

template<dim_t D, class MultiIndex >
template<int N>
CArray<Eigen::Dynamic,N> waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::evaluate ( CMatrix< D, N > const &  grid) const
inline

Evaluate the value of all components at once.

Evaluates \( \Psi(x) = \{\Phi_i(x)\} \), where \( x \) is is a complex quadrature point.

Thread Safety: Some intermediate results are cached. The cache is not protected by a mutex. Thus concurrent access may introduce race conditions.

Parameters
gridComplex quadrature points. Complex matrix of shape (dimensionality, number of quadrature points)
Returns
Complex matrix of shape (number of components, number of quadrature points)
Template Parameters
NNumber of quadrature points. Don't use Eigen::Dynamic. It works, but performance is bad.
template<dim_t D, class MultiIndex >
template<int N>
CArray<Eigen::Dynamic,N> waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::evaluate ( RMatrix< D, N > const &  rgrid) const
inline

Evaluates the value of all components at once.

Evaluates \( \Psi(x) = \{\Phi_i(x)\} \), where \( x \) is is a real quadrature point.

Parameters
rgridReal quadrature points. Real matrix of shape (dimensionality, number of quadrature points)
Returns
Complex matrix of shape (number of components, number of quadrature points)
Template Parameters
NNumber of quadrature points. Don't use Eigen::Dynamic. It works, but performance is bad.
template<dim_t D, class MultiIndex >
std::size_t waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::n_components ( ) const
inline

Returns the number of components.

template<dim_t D, class MultiIndex >
Component& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::operator[] ( std::size_t  n)
inline

Grants writeable access to the \( n \)-th component \( \Phi_n \).

Parameters
nThe index \( n \) of the requested component.
Returns
Reference to the requested component.
template<dim_t D, class MultiIndex >
Component const& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::operator[] ( std::size_t  n) const
inline

Grants read-only access to the \( n \)-th component \( \Phi_n \).

Parameters
nThe index \( n \) of the requested component.
Returns
Reference to the requested component.
template<dim_t D, class MultiIndex >
HaWpParamSet<D>& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::parameters ( )
inline

Grants writeable access to the Hagedorn parameter set \( \Pi \) of the wavepacket.

template<dim_t D, class MultiIndex >
HaWpParamSet<D> const& waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::parameters ( ) const
inline

Grants read-only access to the Hagedorn parameter set \( \Pi \) of the wavepacket.

template<dim_t D, class MultiIndex >
shapes::ShapeEnumSharedPtr<D,MultiIndex> waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::union_shape ( ) const
inline

Computes the union of basis shapes of all components.

Thread Safety: This function caches the basis shape union. The cache is not protected by a mutex. This concurrent access may introduce race conditions.

Member Data Documentation

template<dim_t D, class MultiIndex >
shapes::ShapeEnumSharedPtr<D,MultiIndex> waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::cached_shape_union_
mutableprivate
template<dim_t D, class MultiIndex >
std::vector<Component> waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::components_
private
template<dim_t D, class MultiIndex >
real_t waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::eps_
private
template<dim_t D, class MultiIndex >
HaWpParamSet<D> waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::parameters_
private
template<dim_t D, class MultiIndex >
std::vector< ShapeEnum<D,MultiIndex>* > waveblocks::wavepackets::HomogeneousHaWp< D, MultiIndex >::union_cache_snapshot_
mutableprivate

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