WaveBlocksND
Public Types | Static Public Member Functions | Static Private Member Functions | List of all members
waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR > Class Template Reference

Class providing inner product calculation of multi-component wavepackets. More...

#include <vector_inner_product.hpp>

Public Types

using CMatrixNN = CMatrix< Eigen::Dynamic, Eigen::Dynamic >
 
using CMatrix1N = CMatrix< 1, Eigen::Dynamic >
 
using CMatrixN1 = CMatrix< Eigen::Dynamic, 1 >
 
using CMatrixD1 = CMatrix< D, 1 >
 
using CMatrixDD = CMatrix< D, D >
 
using CMatrixDN = CMatrix< D, Eigen::Dynamic >
 
using RMatrixD1 = RMatrix< D, 1 >
 
using CDiagonalNN = Eigen::DiagonalMatrix< complex_t, Eigen::Dynamic >
 
using NodeMatrix = typename QR::NodeMatrix
 
using WeightVector = typename QR::WeightVector
 
using op_t = std::function< CMatrix1N(CMatrixDN, RMatrixD1, dim_t, dim_t)>
 

Static Public Member Functions

template<class Packet >
static CMatrixNN build_matrix (const Packet &packet, const op_t &op=default_op)
 Calculate the matrix of the inner product. More...
 
template<class Pacbra , class Packet >
static CMatrixNN build_matrix_inhomog (const Pacbra &pacbra, const Packet &packet, const op_t &op=default_op)
 Calculate the matrix of the inner product. More...
 
template<class Packet >
static CMatrixN1 quadrature (const Packet &packet, const op_t &op=default_op)
 Perform quadrature. More...
 
template<class Pacbra , class Packet >
static CMatrixN1 quadrature_inhomog (const Pacbra &pacbra, const Packet &packet, const op_t &op=default_op)
 Perform quadrature. More...
 

Static Private Member Functions

static CMatrix1N default_op (const CMatrixDN &nodes, const RMatrixD1 &pos, dim_t i, dim_t j)
 

Detailed Description

template<dim_t D, class MultiIndex, class QR>
class waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >

Class providing inner product calculation of multi-component wavepackets.

Template Parameters
Ddimensionality of processed wavepackets
MultiIndexmulti-index type of processed wavepackets
QRquadrature rule to use, with R nodes

Member Typedef Documentation

template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CDiagonalNN = Eigen::DiagonalMatrix<complex_t, Eigen::Dynamic>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CMatrix1N = CMatrix<1, Eigen::Dynamic>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CMatrixD1 = CMatrix<D, 1>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CMatrixDD = CMatrix<D, D>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CMatrixDN = CMatrix<D, Eigen::Dynamic>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CMatrixN1 = CMatrix<Eigen::Dynamic, 1>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::CMatrixNN = CMatrix<Eigen::Dynamic, Eigen::Dynamic>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::NodeMatrix = typename QR::NodeMatrix
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::op_t = std::function<CMatrix1N(CMatrixDN,RMatrixD1,dim_t,dim_t)>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::RMatrixD1 = RMatrix<D, 1>
template<dim_t D, class MultiIndex , class QR >
using waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::WeightVector = typename QR::WeightVector

Member Function Documentation

template<dim_t D, class MultiIndex , class QR >
template<class Packet >
static CMatrixNN waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::build_matrix ( const Packet &  packet,
const op_t op = default_op 
)
inlinestatic

Calculate the matrix of the inner product.

Returns the matrix elements \(\langle \Psi | f | \Psi \rangle\) with an operator \(f\). The matrix consists of \(N \times N\) blocks ( \(N\): number of components), each of size \(|\mathfrak{K}| \times |\mathfrak{K}|\). The coefficients of the wavepacket are ignored.

Parameters
[in]packetmulti-component wavepacket \(\Psi\)
[in]opoperator \(f(x, q, i, j) : \mathbb{C}^{D \times R} \times \mathbb{R}^D \times \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{C}^R\) which is evaluated at the nodal points \(x\) and position \(q\), between components \(\Phi_i\) and \(\Phi_j\); default returns a vector of ones if i==j, zeros otherwise
Template Parameters
Packetpacket type (e.g. HomogeneousHaWp)
template<dim_t D, class MultiIndex , class QR >
template<class Pacbra , class Packet >
static CMatrixNN waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::build_matrix_inhomog ( const Pacbra &  pacbra,
const Packet &  packet,
const op_t op = default_op 
)
inlinestatic

Calculate the matrix of the inner product.

Returns the matrix elements \(\langle \Psi | f | \Psi' \rangle\) with an operator \(f\). The matrix consists of \(N \times N'\) blocks ( \(N,N'\): number of components of \(\Psi,\Psi'\)), each of size \(|\mathfrak{K}_i| \times |\mathfrak{K}_j'|\). The coefficients of the wavepacket are ignored.

Parameters
[in]pacbramulti-component wavepacket \(\Psi\)
[in]packetmulti-component wavepacket \(\Psi'\)
[in]opoperator \(f(x, q, i, j) : \mathbb{C}^{D \times R} \times \mathbb{R}^D \times \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{C}^R\) which is evaluated at the nodal points \(x\) and position \(q\), between components \(\Phi_i\) and \(\Phi_j\); default returns a vector of ones if i==j, zeros otherwise
Template Parameters
Pacbrapacket type of \(\Psi\) (e.g. HomogeneousHaWp)
Packetpacket type of \(\Psi'\)
template<dim_t D, class MultiIndex , class QR >
static CMatrix1N waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::default_op ( const CMatrixDN nodes,
const RMatrixD1 pos,
dim_t  i,
dim_t  j 
)
inlinestaticprivate
template<dim_t D, class MultiIndex , class QR >
template<class Packet >
static CMatrixN1 waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::quadrature ( const Packet &  packet,
const op_t op = default_op 
)
inlinestatic

Perform quadrature.

Returns an \(N^2\)-sized vector of scalars \(\langle \Phi_i | f | \Phi_j \rangle\). See build_matrix() for the parameters.

template<dim_t D, class MultiIndex , class QR >
template<class Pacbra , class Packet >
static CMatrixN1 waveblocks::innerproducts::VectorInnerProduct< D, MultiIndex, QR >::quadrature_inhomog ( const Pacbra &  pacbra,
const Packet &  packet,
const op_t op = default_op 
)
inlinestatic

Perform quadrature.

Returns an \(N \cdot N'\)-sized vector of scalars \(\langle \Phi_i | f | \Phi'_j \rangle\). See build_matrix() for the parameters.


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