MADNESS
0.10.1
|
to be put in a separate file More...
#include <diamagneticpotentialfactor.h>
Public Member Functions | |
Diamagnetic_potential_factor (World &world, const Nemo_complex_Parameters ¶m, const std::vector< coord_3d > &coords) | |
constructor takes a world and the parameters for the calculation More... | |
std::vector< complex_function_3d > | apply_potential (const std::vector< complex_function_3d > &rhs) const |
apply the diamagnetic potential on rhs More... | |
real_function_3d | bare_diamagnetic_potential () const |
compute the bare potential without confinement or factors More... | |
complex_function_3d | compute_lz_commutator () const |
compute the commutator of the orbital-zeeman term with the diamagnetic factor More... | |
std::vector< real_function_3d > | compute_nabla_R_div_R () const |
returns More... | |
real_function_3d | compute_R_times_T_commutator_scalar_term_numerically () const |
real_function_3d | compute_U2 () const |
real_function_3d | custom_factor (const coord_3d &B, const std::vector< coord_3d > &vv, const double extra_exponent=1.0) const |
return a custom factor for a given magnetic field More... | |
double | estimate_wavefunction_radius (const double eps=1.e-8) const |
real_function_3d | factor () const |
return the diamagnetic factor More... | |
real_function_3d | factor_square () const |
return the square of the diamagnetic factor More... | |
complex_function_3d | factor_with_phase (const coord_3d &B, const std::vector< coord_3d > &vv) const |
return a custom factor for a given magnetic field More... | |
std::vector< coord_3d > | get_coords () const |
coord_3d | get_explicit_B () const |
coord_3d | get_physical_B () const |
double | get_potential_radius () const |
compute the radius for the diamagnetic potential More... | |
std::vector< coord_3d > | get_v () const |
std::vector< complex_function_3d > | make_fake_orbitals (const int n, const coord_3d &offset={0.0, 0.0, 0.0}) const |
make a set orbitals for testing (not orthonormalized!) More... | |
void | print_info () const |
void | recompute_factors_and_potentials () |
recompute the factor and the potentials for given physical and explicit magnetic fields More... | |
void | reset_explicit_B_and_v (const coord_3d &eB) |
bool | test_me (const int level) const |
run the tests More... | |
Static Public Member Functions | |
static bool | B_along_z (const coord_3d &B) |
make sure the magnetic field is oriented along the z axis More... | |
static std::vector< coord_3d > | compute_v_vector (const coord_3d &B, const std::vector< coord_3d > &coords, bool use_v_vector) |
Private Member Functions | |
bool | test_factor () const |
compute a factor for comparison in coordinate space More... | |
bool | test_harmonic_potential () const |
test the harmonic potential More... | |
bool | test_lz_commutator () const |
bool | test_scalar_potentials () const |
test analytical vs numerical computation of the potentials More... | |
bool | test_vector_potentials () const |
test analytical vs numerical computation of the potentials More... | |
Private Attributes | |
std::vector< coord_3d > | coords |
the position of the nuclei in the coordinate space: More... | |
real_function_3d | diamagnetic_factor_ |
the diamagnetic factor to cancel the diamagnetic potential More... | |
real_function_3d | diamagnetic_factor_square |
std::vector< real_function_3d > | diamagnetic_U1 |
real_function_3d | diamagnetic_U2 |
the boxed diamagnetic potential (for a given B) More... | |
coord_3d | explicit_B ={0,0,0} |
the magnetic field strength encoded in the diamagnetic factor More... | |
coord_3d | physical_B ={0,0,0} |
the actual magnetic field strength More... | |
double | potential_radius |
radius where the diamagnetic potential flattens out More... | |
bool | use_v_vector =true |
std::vector< coord_3d > | v |
the position of the nuclei in the "A" space: v = 1/2 B cross R More... | |
World & | world |
the world More... | |
to be put in a separate file
|
inline |
constructor takes a world and the parameters for the calculation
References compute_v_vector(), coords, diamagnetic_factor_, diamagnetic_factor_square, diamagnetic_U1, diamagnetic_U2, explicit_B, madness::Vector< T, N >::normf(), param, physical_B, potential_radius, print_info(), recompute_factors_and_potentials(), use_v_vector, v, and world.
std::vector< complex_function_3d > madness::Diamagnetic_potential_factor::apply_potential | ( | const std::vector< complex_function_3d > & | rhs | ) | const |
apply the diamagnetic potential on rhs
compute the diamagnetic local potential (B is in z direction -> dia = x^2 + y^2
References madness::apply(), diamagnetic_U1, diamagnetic_U2, explicit_B, madness::Vector< T, N >::normf(), physical_B, madness::World::size(), madness::truncate(), and world.
|
inlinestatic |
make sure the magnetic field is oriented along the z axis
Referenced by bare_diamagnetic_potential(), compute_nabla_R_div_R(), compute_R_times_T_commutator_scalar_term_numerically(), and compute_U2().
|
inline |
compute the bare potential without confinement or factors
References B_along_z(), madness::inner(), MADNESS_ASSERT, physical_B, and world.
complex_function_3d madness::Diamagnetic_potential_factor::compute_lz_commutator | ( | ) | const |
compute the commutator of the orbital-zeeman term with the diamagnetic factor
References A(), diamagnetic_U1, madness::dot(), explicit_B, madness::scale(), and world.
Referenced by test_lz_commutator().
std::vector< real_function_3d > madness::Diamagnetic_potential_factor::compute_nabla_R_div_R | ( | ) | const |
returns
References B, B_along_z(), madness::cross(), explicit_B, function(), madness::FunctionDefaults< NDIM >::get_cell(), madness::inner(), MADNESS_ASSERT, madness::Tensor< T >::normf(), madness::Vector< T, N >::normf(), physical_B, madness::truncate(), v, and world.
Referenced by recompute_factors_and_potentials(), and test_vector_potentials().
real_function_3d madness::Diamagnetic_potential_factor::compute_R_times_T_commutator_scalar_term_numerically | ( | ) | const |
real_function_3d madness::Diamagnetic_potential_factor::compute_U2 | ( | ) | const |
References B, B_along_z(), madness::cross(), explicit_B, function(), get_potential_radius(), madness::inner(), MADNESS_ASSERT, madness::Vector< T, N >::normf(), physical_B, madness::Function< T, NDIM >::truncate(), v, and world.
Referenced by recompute_factors_and_potentials(), and test_scalar_potentials().
|
inlinestatic |
References c, coords, madness::cross(), use_v_vector, and v.
Referenced by Diamagnetic_potential_factor(), and reset_explicit_B_and_v().
|
inline |
return a custom factor for a given magnetic field
References madness::arg(), B, madness::cross(), madness::inner(), pow(), v, and world.
Referenced by recompute_factors_and_potentials(), and test_factor().
|
inline |
given the explicit and the physical B, estimate the radius of the wave function
References get_explicit_B(), and get_physical_B().
|
inline |
return the diamagnetic factor
References diamagnetic_factor_.
Referenced by compute_R_times_T_commutator_scalar_term_numerically(), test_factor(), test_lz_commutator(), test_scalar_potentials(), and test_vector_potentials().
|
inline |
return the square of the diamagnetic factor
References diamagnetic_factor_square.
Referenced by test_factor(), and test_scalar_potentials().
|
inline |
return a custom factor for a given magnetic field
References madness::arg(), B, madness::cross(), madness::inner(), madness::Vector< T, N >::normf(), madness::phase(), v, and world.
|
inline |
References coords.
|
inline |
References explicit_B.
Referenced by estimate_wavefunction_radius().
|
inline |
References physical_B.
Referenced by estimate_wavefunction_radius().
|
inline |
compute the radius for the diamagnetic potential
References potential_radius.
Referenced by compute_R_times_T_commutator_scalar_term_numerically(), and compute_U2().
std::vector< complex_function_3d > madness::Diamagnetic_potential_factor::make_fake_orbitals | ( | const int | n, |
const coord_3d & | offset = {0.0,0.0,0.0} |
||
) | const |
make a set orbitals for testing (not orthonormalized!)
References madness::arg(), offset, madness::phase(), and world.
Referenced by test_scalar_potentials().
void madness::Diamagnetic_potential_factor::print_info | ( | ) | const |
References coords, explicit_B, physical_B, madness::print(), and v.
Referenced by Diamagnetic_potential_factor().
void madness::Diamagnetic_potential_factor::recompute_factors_and_potentials | ( | ) |
recompute the factor and the potentials for given physical and explicit magnetic fields
References compute_nabla_R_div_R(), compute_U2(), custom_factor(), diamagnetic_factor_, diamagnetic_factor_square, diamagnetic_U1, diamagnetic_U2, explicit_B, and v.
Referenced by Diamagnetic_potential_factor().
|
inline |
References compute_v_vector(), coords, explicit_B, use_v_vector, and v.
|
private |
compute a factor for comparison in coordinate space
References B, c, cc, coords, custom_factor(), madness::test_output::end(), explicit_B, factor(), factor_square(), madness::inner(), madness::test_output::logger, madness::norm2(), v, and world.
Referenced by test_me().
|
private |
test the harmonic potential
References std::abs(), madness::test_output::end(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::test_output::logger, thresh, and world.
Referenced by test_me().
|
private |
|
inline |
run the tests
[in] | level | 1: basic tests, .. , 3: all the tests |
References madness::print(), test_factor(), test_harmonic_potential(), test_lz_commutator(), test_scalar_potentials(), and test_vector_potentials().
|
private |
test analytical vs numerical computation of the potentials
References std::abs(), compute_R_times_T_commutator_scalar_term_numerically(), compute_U2(), madness::test_output::end(), factor(), factor_square(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::inner(), madness::test_output::logger, and make_fake_orbitals().
Referenced by test_me().
|
private |
test analytical vs numerical computation of the potentials
References compute_nabla_R_div_R(), madness::test_output::end(), madness::error(), factor(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::grad(), madness::test_output::logger, madness::detail::norm(), madness::norm2(), and thresh.
Referenced by test_me().
|
private |
the position of the nuclei in the coordinate space:
Referenced by Diamagnetic_potential_factor(), compute_v_vector(), get_coords(), print_info(), reset_explicit_B_and_v(), and test_factor().
|
private |
the diamagnetic factor to cancel the diamagnetic potential
Referenced by Diamagnetic_potential_factor(), factor(), and recompute_factors_and_potentials().
|
private |
Referenced by Diamagnetic_potential_factor(), factor_square(), and recompute_factors_and_potentials().
|
private |
|
private |
the boxed diamagnetic potential (for a given B)
Referenced by Diamagnetic_potential_factor(), apply_potential(), and recompute_factors_and_potentials().
|
private |
the magnetic field strength encoded in the diamagnetic factor
Referenced by Diamagnetic_potential_factor(), apply_potential(), compute_lz_commutator(), compute_nabla_R_div_R(), compute_U2(), get_explicit_B(), print_info(), recompute_factors_and_potentials(), reset_explicit_B_and_v(), test_factor(), and test_lz_commutator().
|
private |
the actual magnetic field strength
Referenced by Diamagnetic_potential_factor(), apply_potential(), bare_diamagnetic_potential(), compute_nabla_R_div_R(), compute_R_times_T_commutator_scalar_term_numerically(), compute_U2(), get_physical_B(), and print_info().
|
private |
radius where the diamagnetic potential flattens out
Referenced by Diamagnetic_potential_factor(), and get_potential_radius().
|
private |
Referenced by Diamagnetic_potential_factor(), compute_v_vector(), and reset_explicit_B_and_v().
|
private |
the position of the nuclei in the "A" space: v = 1/2 B cross R
Referenced by Diamagnetic_potential_factor(), compute_nabla_R_div_R(), compute_U2(), compute_v_vector(), custom_factor(), factor_with_phase(), get_v(), print_info(), recompute_factors_and_potentials(), reset_explicit_B_and_v(), and test_factor().
|
private |
the world
Referenced by Diamagnetic_potential_factor(), apply_potential(), bare_diamagnetic_potential(), compute_lz_commutator(), compute_nabla_R_div_R(), compute_R_times_T_commutator_scalar_term_numerically(), compute_U2(), custom_factor(), factor_with_phase(), make_fake_orbitals(), test_factor(), test_harmonic_potential(), and test_lz_commutator().