MADNESS 0.10.1
Classes | Typedefs | Functions | Variables
tdse_example.cc File Reference

Evolves the hydrogen atom in imaginary and also real time. More...

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

Classes

struct  unaryexp< T, NDIM >
 

Typedefs

typedef FunctionFactory< double_complex, 3 > complex_factoryT
 
typedef Function< double_complex, 3 > complex_functionT
 
typedef std::shared_ptr< FunctionFunctorInterface< double_complex, 3 > > complex_functorT
 
typedef SeparatedConvolution< double_complex, 3 > complex_operatorT
 
typedef Vector< double, 3 > coordT
 
typedef FunctionFactory< double, 3 > factoryT
 
typedef Function< double, 3 > functionT
 
typedef std::shared_ptr< FunctionFunctorInterface< double, 3 > > functorT
 
typedef SeparatedConvolution< double, 3 > operatorT
 

Functions

void converge (World &world, functionT &potn, functionT &psi, double &eps)
 Evolve the wave function in imaginary time to converge to ground state.
 
template<typename T >
double energy (World &world, const Function< T, 3 > &psi, const functionT &potn)
 Given psi and V evaluate the energy.
 
static double guess (const coordT &r)
 Initial guess wave function.
 
double laser (double t)
 Strength of the laser field at time t ... 1 full cycle.
 
template<typename T , int NDIM>
double lbcost (const Key< NDIM > &key, const FunctionNode< T, NDIM > &node)
 
template<typename T , std::size_t NDIM>
void load_balance (World &world, const madness::Function< T, NDIM > &psi)
 
int main (int argc, char **argv)
 
void propagate (World &world, functionT &potn, functionT &psi0, double &eps)
 Evolve the wave function in real time.
 
static double smoothed_potential (double r)
 Regularized 1/r potential.
 
static double V (const coordT &r)
 Smoothed 1/r nuclear potential.
 
double zdipole (const coordT &r)
 z-dipole
 

Variables

static const double cut = 0.2
 
static const double F = 1.0
 
static const long k = 8
 
static const double L = 23.0
 
static const double omega = 1.0
 
static const double thresh = 1e-6
 

Detailed Description

Evolves the hydrogen atom in imaginary and also real time.

Typedef Documentation

◆ complex_factoryT

◆ complex_functionT

◆ complex_functorT

◆ complex_operatorT

◆ coordT

typedef Vector<double,3> coordT

◆ factoryT

typedef FunctionFactory<double,3> factoryT

◆ functionT

typedef Function<double,3> functionT

◆ functorT

typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT

◆ operatorT

typedef SeparatedConvolution<double,3> operatorT

Function Documentation

◆ converge()

void converge ( World world,
functionT potn,
functionT psi,
double &  eps 
)

Evolve the wave function in imaginary time to converge to ground state.

References energy, expV(), load_balance(), norm(), op(), madness::constants::pi, potn(), pow(), madness::print(), psi(), madness::World::rank(), madness::Function< T, NDIM >::unaryop(), and V().

Referenced by main().

◆ energy()

template<typename T >
double energy ( World world,
const Function< T, 3 > &  psi,
const functionT potn 
)

Given psi and V evaluate the energy.

References std::abs(), axis, madness::inner(), potn(), madness::print(), psi(), madness::World::rank(), and T().

◆ guess()

static double guess ( const coordT r)
static

Initial guess wave function.

References cut.

Referenced by main().

◆ laser()

double laser ( double  t)

Strength of the laser field at time t ... 1 full cycle.

References omega, and madness::constants::pi.

Referenced by propagate().

◆ lbcost()

template<typename T , int NDIM>
double lbcost ( const Key< NDIM > &  key,
const FunctionNode< T, NDIM > &  node 
)

◆ load_balance()

template<typename T , std::size_t NDIM>
void load_balance ( World world,
const madness::Function< T, NDIM > &  psi 
)

◆ main()

int main ( int  argc,
char **  argv 
)

◆ propagate()

void propagate ( World world,
functionT potn,
functionT psi0,
double &  eps 
)

◆ smoothed_potential()

static double smoothed_potential ( double  r)
static

Regularized 1/r potential.

Invoke as u(r/c)/c where c is the radius of the smoothed volume.

References e(), PI, and madness::r2().

Referenced by V().

◆ V()

static double V ( const coordT r)
static

Smoothed 1/r nuclear potential.

References cut, and smoothed_potential().

Referenced by converge(), and main().

◆ zdipole()

double zdipole ( const coordT r)

z-dipole

Referenced by propagate().

Variable Documentation

◆ cut

const double cut = 0.2
static

Referenced by guess(), propagate(), V(), and Vn().

◆ F

const double F = 1.0
static

◆ k

const long k = 8
static

Referenced by main(), and propagate().

◆ L

const double L = 23.0
static

Referenced by main().

◆ omega

const double omega = 1.0
static

◆ thresh

const double thresh = 1e-6
static

Referenced by main().