MADNESS
0.10.1
|
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>
Classes | |
struct | refop |
struct | unaryexp< T, NDIM > |
Macros | |
#define | MAKE_PROPAGATOR(world, t) qm_1d_free_particle_propagator(k, c, t, 2.0*L) |
#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 |
Example propagation of TDSE (translating atom) using various propagators.
#define NO_GENTENSOR |
typedef Convolution1D<double_complex> complex_operatorT |
typedef std::shared_ptr<complex_operatorT> pcomplex_operatorT |
complex_function_1d APPLY | ( | complex_operatorT * | q1d, |
const complex_function_1d & | psi | ||
) |
References madness::apply_1d_realspace_push(), psi(), and madness::Function< T, NDIM >::sum_down().
double atom_position | ( | ) |
References current_time, velocity, and x0.
Referenced by dVsq(), print_info(), psi_exact(), and V().
double dVsq | ( | const coord_1d & | r | ) |
References atom_position().
Referenced by expV().
complex_function_1d expV | ( | World & | world, |
double | vcoeff, | ||
double | dcoeff | ||
) |
References d(), dVsq(), potn(), madness::Function< T, NDIM >::truncate(), madness::Function< T, NDIM >::unaryop(), and V().
Referenced by chin_chen(), converge(), make_exp(), propagate(), sympgrad4(), sympgrad6(), test_chin_chen(), test_trotter(), and trotter().
double icoeff | ( | const int | np, |
const int | j, | ||
const double | t | ||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
References madness::WorldGopInterface::broadcast(), SafeMPI::COMM_WORLD, current_time, exact, madness::finalize(), madness::World::gop, Gs, Gss, Gtrs, madness::initialize(), k, L, lo, MAKE_PROPAGATOR, np, madness::plot_line(), madness::print(), print_info(), psi(), psi_exact(), q_c(), madness::World::rank(), readin(), madness::FunctionDefaults< NDIM >::set_autorefine(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_initial_level(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::FunctionDefaults< NDIM >::set_truncate_mode(), madness::startup(), sympgrad4(), sympgrad6(), tc, tcrit, thresh, trotter(), tstep, velocity, and x0.
void print_info | ( | World & | world, |
const complex_function_1d & | psi, | ||
int | step | ||
) |
References atom_position(), current_time, madness::inner(), madness::detail::norm(), madness::norm2(), potn(), psi(), psi_exact(), madness::World::rank(), and V().
Referenced by Calculation::Calculation(), main(), and CalculationParameters::read_file().
double_complex psi_exact | ( | const coord_1d & | r | ) |
References madness::arg(), atom_position(), current_time, energy_exact, eshift, psi(), and velocity.
Referenced by main(), and print_info().
complex_function_1d q_c | ( | World & | world, |
const int | np, | ||
const complex_function_1d | psi0, | ||
const double | tstep | ||
) |
References madness::APPLY(), madness::Function< T, NDIM >::compress(), madness::compress(), current_time, fix_iter_tol, madness::gaxpy(), madness::Function< T, NDIM >::gaxpy(), Gs, Gss, Gtrs, I, k, maxiter, myp(), madness::response_space::norm2(), madness::norm2(), np, psi0(), madness::World::rank(), madness::scale(), madness::sub(), tc, thresh, trotter(), madness::Function< T, NDIM >::truncate(), tstep, and V().
Referenced by main().
|
static |
References madness::gauss_legendre(), np, madness::Tensor< T >::ptr(), and tc.
Referenced by main().
complex_function_1d sympgrad4 | ( | World & | world, |
const complex_function_1d & | psi0, | ||
const double | tstep, | ||
const double | xi, | ||
const double | chi | ||
) |
References madness::APPLY(), current_time, expV(), lambda, MAKE_PROPAGATOR, psi(), psi0(), tstep, and xi.
Referenced by main().
complex_function_1d sympgrad6 | ( | World & | world, |
const complex_function_1d & | psi0, | ||
const double | tstep | ||
) |
References madness::APPLY(), current_time, expV(), lambda, MAKE_PROPAGATOR, mu, psi(), psi0(), and tstep.
Referenced by main().
complex_function_1d trotter | ( | World & | world, |
const complex_function_1d & | psi0, | ||
const double | tstep, | ||
complex_operatorT * | G0 = 0 |
||
) |
References madness::APPLY(), current_time, expV(), G0, MAKE_PROPAGATOR, psi(), psi0(), and tstep.
double V | ( | const coord_1d & | r | ) |
References atom_position(), and eshift.
Referenced by expV(), print_info(), and q_c().
Referenced by madness::apply(), madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), madness::Diamagnetic_potential_factor::compute_U2(), madness::Diamagnetic_potential_factor::custom_factor(), madness::Diamagnetic_potential_factor::factor_with_phase(), madness::Solver< T, NDIM >::matrix_exponential(), madness::Localizer::matrix_exponential(), matrix_exponential(), and madness::Diamagnetic_potential_factor::test_factor().
|
static |
|
static |
Referenced by propagate(), and test_qm().
|
static |
Referenced by atom_position(), madness::ThreadPool::await(), main(), PsiExact::operator()(), print_info(), psi_exact(), q_c(), sympgrad4(), sympgrad6(), and trotter().
|
static |
Referenced by main(), and psi_exact().
|
static |
Referenced by madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), psi_exact(), and V().
std::vector<pcomplex_operatorT> Gs |
std::vector<pcomplex_operatorT> Gss |
std::vector<pcomplex_operatorT> Gtrs |
|
static |
Referenced by apply_potential(), madness::MP3::compute_mp3_ghij(), madness::get_index_of_first_vector_argument(), kinetic_energy_matrix(), kinetic_energy_matrix2(), kinetic_energy_matrix_slow(), madness::Zcis::make_CIS_matrix(), madness::TDHF::make_cis_matrix(), madness::Zcis::make_guess(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::Solver< T, NDIM >::make_kinetic_matrix(), madness::Localizer::matrix_exponential(), madness::Molecule::moment_of_inertia(), madness::WSTAtomicBasisFunctor::operator()(), madness::Molecule::orient(), projector_external_dof(), madness::MolecularOptimizer::projector_external_dof(), and q_c().
|
static |
Referenced by main().
const int maxiter = 20 |
Referenced by q_c().
int np |
Tensor<double> tc |
Referenced by icoeff(), madness::CC2::iterate_lrcc2_pairs(), main(), q_c(), and readin().
|
static |
Referenced by main(), madness::BandlimitedPropagator::plot(), propagate(), test_chin_chen(), test_qm(), and test_trotter().
|
static |
Referenced by atom_position(), main(), and psi_exact().
|
static |
Referenced by atom_position(), beta_func(), distancesq(), and main().