ivutils
Loading...
Searching...
No Matches
wavepacket.h File Reference

Classes to handle Gaussian Wave Packets. More...

#include <cmath>
#include <complex>
#include "cvector_3.h"
Include dependency graph for wavepacket.h:

Classes

struct  eq_second< Type >
 Template for v=der operation in WavePacket::int2phys_der. More...
 
struct  eq_minus_second< Type >
 Template for v=-der operation in WavePacket::int2phys_der. More...
 
class  WavePacket
 wavepacket is w(x)=exp(-a*x^2+b*x+lz) More...
 

Functions

template<class CT >
int compare_compl (const CT &a, const CT &b, double tol=0.)
 Compares complex numbers on a per component basis.
 
int compare_vec (const Vector_3 &a, const Vector_3 &b, double tol=0.)
 Compares vectors on a per component basis.
 
WavePacket conj (const WavePacket &wp)
 constructs a conjugate packet
 

Detailed Description

Classes to handle Gaussian Wave Packets.

Function Documentation

◆ compare_compl()

template<class CT >
int compare_compl ( const CT &  a,
const CT &  b,
double  tol = 0. 
)

Compares complex numbers on a per component basis.

Returns
Return values
0if all component differences are 0 within tolerance tol (EQUAL),
-1for LESS
2for GREATER

◆ compare_vec()

int compare_vec ( const Vector_3 a,
const Vector_3 b,
double  tol = 0. 
)
inline

Compares vectors on a per component basis.

Returns
Return values
0if all component differences are 0 within tolerance tol (EQUAL),
-1for LESS
2for GREATER