ivutils
Loading...
Searching...
No Matches
WavePacket Class Reference

wavepacket is w(x)=exp(-a*x^2+b*x+lz) More...

#include <wavepacket.h>

Collaboration diagram for WavePacket:

Public Member Functions

cdouble integral () const
 Returns the integral of w(x) over 3D space.
 
cdouble partial_integrate (const Vector_3 &x, const iVector_3 &integ_flag) const
 Returns integral of w(x) over 3D space along selected axes.
 
void init (const double width=1., const Vector_3 &r=0., const Vector_3 &p=0., const double pw=0.)
 Initialize normalized packet with physical parameters: r0, p0, width, pw w(x)=(3/2pi width^(3/4)exp[-(3/(4 width^2)-i pw/(2*width) )(x-r)^2+i p (x-r)].
 
void init (const cdouble &a_, const cVector_3 &b_)
 Initialize normalized packet with complex parameters a and b w(x)=(3/2pi width^(3/4)exp[-(3/(4 width^2)-i pw/(2*width) )(x-r)^2+i p (x-r)].
 
WavePacketnormalize ()
 Adjusts lz so that Integral[w*(std::conj(w))] is 1 after this operation.
 
cdouble overlap (const WavePacket &other) const
 computes 3D overlap of wavepackets Inegral[w*other]
 
WavePacket translate (const Vector_3 &dr) const
 returns translated packet to the position of r'=r+dr
 
double get_width () const
 width
 
double get_pwidth () const
 width momentum
 
pair< double, double > get_width_pars () const
 both width and width momentum
 
Vector_3 get_r () const
 position
 
Vector_3 get_p () const
 momentum
 
template<template< class A > class operation, class d_it , class dfdx_it , class dfdp_it , class dfdw_it , class dfdpw_it >
void int2phys_der (d_it dfdi_, dfdx_it dfdx, dfdp_it dfdp, dfdw_it dfdw, dfdpw_it dfdpw, double h_p) const
 Transforms derivatives of a function whith respect to WP parameters from internal into physical representation, i.
 
int compare (const WavePacket &other, double tol=0.) const
 Compares the wave packet to another on a per component basis.
 

Detailed Description

wavepacket is w(x)=exp(-a*x^2+b*x+lz)

Member Function Documentation

◆ compare()

int WavePacket::compare ( const WavePacket other,
double  tol = 0. 
) const
inline

Compares the wave packet to another on a per component basis.

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

◆ int2phys_der()

template<template< class A > class operation, class d_it , class dfdx_it , class dfdp_it , class dfdw_it , class dfdpw_it >
void WavePacket::int2phys_der ( d_it  dfdi_,
dfdx_it  dfdx,
dfdp_it  dfdp,
dfdw_it  dfdw,
dfdpw_it  dfdpw,
double  h_p 
) const
inline

Transforms derivatives of a function whith respect to WP parameters from internal into physical representation, i.

e.:
from df/d{are,aim,b0re,b0im,b1re,b1im,b2re,b2im} (8 values accessed by input iterator d_it in the given order)
to df/d{x0,x1,x2}, df/d{p0,p1,p2}, df/dw, df/dpw The supplied inputs (val) are modified by op: val=op(val,phys_der). Use operation=eq_second for the supplied inputs to be replaced by new physical derivative values. The inpput and output locations may coinside, an internal buffer is used for transformation.

◆ partial_integrate()

cdouble WavePacket::partial_integrate ( const Vector_3 x,
const iVector_3 integ_flag 
) const
inline

Returns integral of w(x) over 3D space along selected axes.

Flags integ_flag are used to indicate along which axes the integration should be performed. For example the call with integ_flag = iVector_3(0,1,1) will return integral over y and z at x[0].


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