-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multidimensional basis and other improvements #43
Conversation
… to the evaluation of the potential
…mplementation for dimensions > 1). Created main that print base's values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor tweaks that in my opinion should be at least noted, if not discussed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comments
|
||
|
||
std::vector<double> Numerov::findProbability() { | ||
std::vector<double> probability = this->tempWavefunction; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method should take wave function as input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wavefunction is an object property, so the method take it using this->
return probability; | ||
} | ||
|
||
void Numerov::normalize(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The probability is an object property, so the method take it using this->
if (solver.getWavefunction().size() > 0) { | ||
stream << "Wavefunction: " << std::endl; | ||
for (double x : solver.getWavefunction()) | ||
stream << "\t" << x << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer spaces to tabs for ASCII compatibility.
Way better to print all together
x (from the basis) waveFunction Probability
0.000000 1.234e-10 2.012e-20
0.100000 ...
...
Could be made into a easy issue for @Bhez
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::cout << solver
(where solver is a Numerov object). It can handle separable potentials, so you can use it with multidimensional basis. (need tests!)