Commit e3a1a218 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Mods

parent 60dd93a8
...@@ -62,6 +62,7 @@ kshakeh_fix1( ...@@ -62,6 +62,7 @@ kshakeh_fix1(
out float3 cposq2<>, //ditto for h2 out float3 cposq2<>, //ditto for h2
out float3 cposq3<> //ditto for h3 out float3 cposq3<> //ditto for h3
) { ) {
float2 ai, aj1, aj2, aj3; //2d indices, can be precalc. float2 ai, aj1, aj2, aj3; //2d indices, can be precalc.
float i; //iteration count float i; //iteration count
float3 xi, xj1, xj2, xj3; //coordinates float3 xi, xj1, xj2, xj3; //coordinates
...@@ -209,7 +210,6 @@ kernel void kshakeh_update1_fix1( ...@@ -209,7 +210,6 @@ kernel void kshakeh_update1_fix1(
atom.y = round( (invmap.x - fmod( invmap.x, strwidth ))/strwidth ); atom.y = round( (invmap.x - fmod( invmap.x, strwidth ))/strwidth );
atom.x = invmap.x - atom.y * strwidth; atom.x = invmap.x - atom.y * strwidth;
// oposq = posq;
if( invmap.y < 0 ){ if( invmap.y < 0 ){
oposq = posqp; oposq = posqp;
} else if( invmap.y < 0.5f ){ } else if( invmap.y < 0.5f ){
......
...@@ -129,9 +129,9 @@ kernel void kupdate_sd1_fix1( ...@@ -129,9 +129,9 @@ kernel void kupdate_sd1_fix1(
igauss.x = linind_gauss - igauss.y * gstrwidth; igauss.x = linind_gauss - igauss.y * gstrwidth;
fg2 = fgauss[ igauss ]; fg2 = fgauss[ igauss ];
Vmh = sd2X * pc3 + sdpc.x * fg1; Vmh = (sd2X*pc3) + (sdpc.x*fg1);
sd1V = sdpc.y * fg2; sd1V = sdpc.y*fg2;
vnew = v * cem + invmass * f * pc1 + sd1V - Vmh * cem; vnew = (v*cem) + (invmass*f*pc1) + sd1V - (Vmh*cem);
posqp = vnew * pc2; posqp = vnew * pc2;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment