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

H2

parent c9f6e7e2
No related branches found
No related tags found
No related merge requests found
...@@ -118,15 +118,29 @@ void calculateGaussBox(float *potential, double *xAt, double *yAt, int arrayElem ...@@ -118,15 +118,29 @@ void calculateGaussBox(float *potential, double *xAt, double *yAt, int arrayElem
void calculateH2Box(float *potential, double *xAt, double *yAt, int arrayElements) void calculateH2Box(float *potential, double *xAt, double *yAt, int arrayElements)
{ {
constexpr double grow = 1.0; constexpr double grow = 0.001;
constexpr double scalePotential = 0.005;
for (int i{0}; i < arrayElements; ++i) for (int i{0}; i < arrayElements; ++i)
{ {
auto x = xAt[i] * grow; auto x = xAt[i] * grow;
auto y = yAt[i] * grow; auto y = yAt[i] * grow;
auto d = sqrt(pow2(x) + pow2(y)); auto d = sqrt(pow2(x) + pow2(y)) + 0.1;
auto V = d; auto V = 0.10035 / d;
V *= scalePotential; potential[i] = 1.0 - V;
potential[i] = V;
} }
} }
// void Kegel(float *potential, double *xAt, double *yAt, int arrayElements)
// {
// constexpr double grow = 1.0;
// constexpr double scalePotential = 0.005;
// for (int i{0}; i < arrayElements; ++i)
// {
// auto x = xAt[i] * grow;
// auto y = yAt[i] * grow;
// auto d = sqrt(pow2(x) + pow2(y));
// auto V = d;
// V *= scalePotential;
// potential[i] = V;
// }
// }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment