MADNESS 0.10.1
tdse1d.cc File Reference

Example propagation of TDSE (translating atom) using various propagators. More...

#include <madness/mra/mra.h>
#include <madness/mra/qmprop.h>
#include <madness/mra/operator.h>
#include <madness/constants.h>
#include <string>
Include dependency graph for tdse1d.cc:

Classes

struct  refop
struct  unaryexp< T, NDIM >

Macros

#define MAKE_PROPAGATOR(world, t)
#define NO_GENTENSOR

Typedefs

typedef Convolution1D< double_complex > complex_operatorT
typedef std::shared_ptr< complex_operatorT > pcomplex_operatorT

Functions

complex_function_1d APPLY (complex_operatorT *q1d, const complex_function_1d &psi)
double atom_position ()
double dVsq (const coord_1d &r)
complex_function_1d expV (World &world, double vcoeff, double dcoeff)
double icoeff (const int np, const int j, const double t)
int main (int argc, char **argv)
template<typename T>
T myp (const std::vector< T > &ps, const double t)
void print_info (World &world, const complex_function_1d &psi, int step)
double_complex psi_exact (const coord_1d &r)
complex_function_1d q_c (World &world, const int np, const complex_function_1d psi0, const double tstep)
static void readin (int np)
complex_function_1d sympgrad4 (World &world, const complex_function_1d &psi0, const double tstep, const double xi, const double chi)
complex_function_1d sympgrad6 (World &world, const complex_function_1d &psi0, const double tstep)
complex_function_1d trotter (World &world, const complex_function_1d &psi0, const double tstep, complex_operatorT *G0=0)
double V (const coord_1d &r)

Variables

Tensor< double > B
static double c = 1.86*ctarget
static double ctarget = 20.0
static double current_time = 0.0
static const double energy_exact = -6.188788775728796797594788
static const double eshift = 0.0
double fix_iter_tol = thresh*10.0
pcomplex_operatorT G
std::vector< pcomplex_operatorT > Gs
std::vector< pcomplex_operatorT > Gss
std::vector< pcomplex_operatorT > Gtrs
static const double_complex I = double_complex(0,1)
static const long k = 20
static const double L = 100.0
const int maxiter = 20
int np
Tensor< double > tc
static double tcrit = 2*constants::pi/(c*c)
static const double thresh = 1e-12
static const double velocity = 3.0
static const double x0 = -L + 10.0

Detailed Description

Example propagation of TDSE (translating atom) using various propagators.

Macro Definition Documentation

◆ MAKE_PROPAGATOR

#define MAKE_PROPAGATOR ( world,
t )
Value:
Convolution1D< double_complex > * qm_1d_free_particle_propagator(int k, double bandlimit, double timestep, double width)
Definition qmprop.cc:165
static const double c
Definition relops.cc:10
static const double L
Definition rk.cc:46
static const long k
Definition rk.cc:44

Referenced by main(), sympgrad4(), sympgrad6(), and trotter().

◆ NO_GENTENSOR

#define NO_GENTENSOR

Typedef Documentation

◆ complex_operatorT

◆ pcomplex_operatorT

typedef std::shared_ptr<complex_operatorT> pcomplex_operatorT

Function Documentation

◆ APPLY()

◆ atom_position()

double atom_position ( )

References current_time, velocity, and x0.

Referenced by dVsq(), print_info(), print_info(), psi_exact(), and V().

◆ dVsq()

double dVsq ( const coord_1d & r)

References atom_position().

Referenced by expV(), and test_chin_chen().

◆ expV()

◆ icoeff()

double icoeff ( const int np,
const int j,
const double t )

References np, and tc.

Referenced by myp().

◆ main()

◆ myp()

template<typename T>
T myp ( const std::vector< T > & ps,
const double t )

References icoeff(), np, and p().

Referenced by q_c().

◆ print_info()

◆ psi_exact()

double_complex psi_exact ( const coord_1d & r)

◆ q_c()

◆ readin()

void readin ( int np)
static

◆ sympgrad4()

complex_function_1d sympgrad4 ( World & world,
const complex_function_1d & psi0,
const double tstep,
const double xi,
const double chi )

References APPLY(), current_time, expV(), lambda, MAKE_PROPAGATOR, psi(), psi0(), tstep, and xi.

Referenced by main().

◆ sympgrad6()

complex_function_1d sympgrad6 ( World & world,
const complex_function_1d & psi0,
const double tstep )

References APPLY(), current_time, expV(), lambda, MAKE_PROPAGATOR, mu, psi(), psi0(), and tstep.

Referenced by main().

◆ trotter()

complex_function_1d trotter ( World & world,
const complex_function_1d & psi0,
const double tstep,
complex_operatorT * G0 = 0 )

References APPLY(), current_time, expV(), G0, MAKE_PROPAGATOR, psi(), psi0(), and tstep.

Referenced by main(), and q_c().

◆ V()

double V ( const coord_1d & r)

References atom_position(), and eshift.

Variable Documentation

◆ B

Tensor<double> B

Referenced by madness::apply().

◆ c

double c = 1.86*ctarget
static

◆ ctarget

double ctarget = 20.0
static

◆ current_time

◆ energy_exact

const double energy_exact = -6.188788775728796797594788
static

Referenced by main(), psi_exact(), and test2().

◆ eshift

◆ fix_iter_tol

double fix_iter_tol = thresh*10.0

Referenced by q_c().

◆ G

◆ Gs

std::vector<pcomplex_operatorT> Gs

Referenced by main(), and q_c().

◆ Gss

std::vector<pcomplex_operatorT> Gss

Referenced by main(), and q_c().

◆ Gtrs

std::vector<pcomplex_operatorT> Gtrs

Referenced by main(), and q_c().

◆ I

◆ k

const long k = 20
static

◆ L

const double L = 100.0
static

◆ maxiter

const int maxiter = 20

◆ np

◆ tc

◆ tcrit

◆ thresh

const double thresh = 1e-12
static

◆ velocity

const double velocity = 3.0
static

◆ x0