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

Represents an inhomogeneous Hagedorn wavepacket \( \Psi \) with \( N \) components \( \Phi_n \). All components have a different set of Hagedorn parameters \( \Pi \), basis shapes \( \mathfrak{K} \) and coefficients \( c \). More...

#include <hawp_commons.hpp>

Classes

class  Component
 Represents a component \( \Phi_n \) of an inhomogeneous wavepacket \( \Psi \). More...
 

Public Member Functions

 InhomogeneousHaWp (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...
 
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...
 
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_
 
std::vector< Componentcomponents_
 

Detailed Description

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

Represents an inhomogeneous Hagedorn wavepacket \( \Psi \) with \( N \) components \( \Phi_n \). All components have a different set of Hagedorn parameters \( \Pi \), basis shapes \( \mathfrak{K} \) and coefficients \( c \).

The number of components is determined at runtime.

Template Parameters
Dwavepacket dimensionality
MultiIndex

Constructor & Destructor Documentation

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

Member Function Documentation

template<dim_t D, class MultiIndex >
Component& waveblocks::wavepackets::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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.

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::InhomogeneousHaWp< 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::InhomogeneousHaWp< D, MultiIndex >::n_components ( ) const
inline

Returns the number of components.

template<dim_t D, class MultiIndex >
Component& waveblocks::wavepackets::InhomogeneousHaWp< 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::InhomogeneousHaWp< 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.

Member Data Documentation

template<dim_t D, class MultiIndex >
std::vector<Component> waveblocks::wavepackets::InhomogeneousHaWp< D, MultiIndex >::components_
private
template<dim_t D, class MultiIndex >
real_t waveblocks::wavepackets::InhomogeneousHaWp< D, MultiIndex >::eps_
private

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