The Hamiltonian used in the project. More...
#include <hamiltonianideal.h>
Public Member Functions | |
HamiltonianIdeal (Config *config) | |
double | kineticEnergy (WaveFunction *wave, vec2 r[]) |
double | potentialEnergy (WaveFunction *wave, vec2 r[]) |
double | externalPotentialEnergy (WaveFunction *wave, vec2 r[]) |
double | interactionPotentialEnergy (WaveFunction *wave, vec2 r[]) |
double | totalExternalPotentialEnergy () |
double | totalInteractionPotentialEnergy () |
void | resetTotalEnergies () |
Hamiltonian::resetTotalEnergies clears the total potential and kinetic energy counters. | |
string | totalsString () |
Hamiltonian::totalsString creates a string with total potential and kinetic energy for file printing. | |
void | outputTotals () |
Hamiltonian::outputTotals prints out a string with the relative amounts of total and potential energy. |
The Hamiltonian used in the project.
HamiltonianIdeal::HamiltonianIdeal | ( | Config * | config | ) |
Constructs an Hamiltonian of the type used in the report
double HamiltonianIdeal::externalPotentialEnergy | ( | WaveFunction * | wave, |
vec2 | r[] | ||
) |
Returns the energy from the harmonic oscillator potential
double HamiltonianIdeal::interactionPotentialEnergy | ( | WaveFunction * | wave, |
vec2 | r[] | ||
) |
Returns the energy from the particle interaction.
double HamiltonianIdeal::kineticEnergy | ( | WaveFunction * | wave, |
vec2 | r[] | ||
) | [virtual] |
Calculates the kinetic energy as $-{1}{2} {1}{} ^2 $
Implements Hamiltonian.
double HamiltonianIdeal::potentialEnergy | ( | WaveFunction * | wave, |
vec2 | r[] | ||
) | [virtual] |
Returns the sum of external potential and interaction potential energy.
Implements Hamiltonian.