Skip to content
Snippets Groups Projects
Commit 260550b3 authored by Armin Co's avatar Armin Co
Browse files

flattenMomentum params

Changed parameters for flatten momentum function.
parent c17ef6ae
Branches
No related tags found
No related merge requests found
...@@ -196,14 +196,14 @@ void Particle::manipulateParticleInPosition(int indexFrom, int indexTo) ...@@ -196,14 +196,14 @@ void Particle::manipulateParticleInPosition(int indexFrom, int indexTo)
double flattenMomentum(double x, double y) double flattenMomentum(double x, double y)
{ {
double distanceToCenter = sqr(x) + sqr(y); double distanceToCenter = sqr(x) + sqr(y);
constexpr double offset = 0.015; constexpr double offset = 0.012;
if (distanceToCenter < offset) if (distanceToCenter < offset)
{ {
return 1.0; return 1.0;
} }
else else
{ {
return 1.0 / (1.0 + (distanceToCenter * 2.0)); return 1.0 / (1.0 + (distanceToCenter * 2.5));
} }
} }
...@@ -218,6 +218,7 @@ void Particle::moveStep(int indexFrom, int indexTo) ...@@ -218,6 +218,7 @@ void Particle::moveStep(int indexFrom, int indexTo)
constexpr double N = 1.0 / QPong::arraySize; constexpr double N = 1.0 / QPong::arraySize;
double E = (sqr(px) + sqr(py)) / (2.0 * m); double E = (sqr(px) + sqr(py)) / (2.0 * m);
m_psi[i] *= exp(-Ci * dt / hbar * E) * N * flattenMomentum(px, py); m_psi[i] *= exp(-Ci * dt / hbar * E) * N * flattenMomentum(px, py);
// m_psi[i] = flattenMomentum(px, py) * 0.00001;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment