tlast changes to velocity prediction function before compile - sphere - GPU-bas… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit e99659070f77f8c89c67391a7e115f218fbe3b4e | |
parent bd373edea562b18de93fe231cc1583108a4d1b05 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 3 Jun 2014 10:59:38 +0200 | |
last changes to velocity prediction function before compile | |
Diffstat: | |
M src/navierstokes.cuh | 16 ++++++---------- | |
1 file changed, 6 insertions(+), 10 deletions(-) | |
--- | |
diff --git a/src/navierstokes.cuh b/src/navierstokes.cuh | |
t@@ -2130,11 +2130,11 @@ __global__ void findPredNSvelocities( | |
// Values that are needed for calculating the predicted velocity | |
__syncthreads(); | |
- const Float3 v_face = MAKE_FLOAT3( | |
+ const Float3 v = MAKE_FLOAT3( | |
dev_ns_v_x[vidx], | |
dev_ns_v_y[vidx], | |
dev_ns_v_z[vidx]); | |
- const Float3 div_tau_face = MAKE_FLOAT3( | |
+ const Float3 div_tau = MAKE_FLOAT3( | |
dev_ns_div_tau_x[vidx], | |
dev_ns_div_tau_y[vidx], | |
dev_ns_div_tau_z[vidx]); | |
t@@ -2214,14 +2214,10 @@ __global__ void findPredNSvelocities( | |
#endif | |
} | |
- // calculate the advection term using a first-order upwind scheme | |
- // div_phi_vf_vf | |
- | |
- | |
- const float3 div_phi_vf_vx = make_float3( | |
- div_phi_vx_vf, | |
- div_phi_vy_vf, | |
- div_phi_vz_vf)k | |
+ const Float3 div_phi_vi_v = MAKE_FLOAT3( | |
+ (div_phi_vi_v_xn.x + div_phi_vi_v_c.x)/2.0, | |
+ (div_phi_vi_v_yn.y + div_phi_vi_v_c.y)/2.0, | |
+ (div_phi_vi_v_zn.z + div_phi_vi_v_c.z)/2.0); | |
// Determine the predicted velocity | |
#ifdef SET_1 |