Introduction
Introduction Statistics Contact Development Disclaimer Help
tset v_p components to sensible values in ghost nodes - sphere - GPU-based 3D d…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit b5c9bbf0de831d1dd2237fdc47ab53f5c9319018
parent 3ff1e9afe86667d4638dfd5b9776bb7d821c1b72
Author: Anders Damsgaard <[email protected]>
Date: Thu, 5 Jun 2014 09:32:54 +0200
set v_p components to sensible values in ghost nodes
Diffstat:
M src/debug.h | 6 +++---
M src/navierstokes.cuh | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/src/debug.h b/src/debug.h
t@@ -39,12 +39,12 @@ const int conv_log_interval = 4;
// Check for nan/inf values in fluid solver kernels
#define CHECK_NS_FINITE
-// Enable reporting of forcing function terms to stdout
-//#define REPORT_FORCING_TERMS
-
// Enable reporting of velocity prediction components to stdout
//#define REPORT_V_P_COMPONENTS
+// Enable reporting of forcing function terms to stdout
+//#define REPORT_FORCING_TERMS
+
// Choose solver model (see Zhou et al. 2010 "Discrete particle simulation of
// particle-fluid flow: model formulations and their applicability", table. 1.
// SET_1 corresponds exactly to Model B in Zhu et al. 2007 "Discrete particle
diff --git a/src/navierstokes.cuh b/src/navierstokes.cuh
t@@ -1816,6 +1816,9 @@ __global__ void findNSdivphiviv(
__syncthreads();
dev_ns_div_phi_vi_v[cellidx] = div_phi_vi_v;
+ //printf("div(phi*v*v) [%d,%d,%d] = %f, %f, %f\n", x,y,z,
+ //div_phi_vi_v.x, div_phi_vi_v.y, div_phi_vi_v.z);
+
#ifdef CHECK_NS_FINITE
(void)checkFiniteFloat3("div_phi_vi_v", x, y, z, div_phi_vi_v);
#endif
t@@ -2092,6 +2095,7 @@ __global__ void findPredNSvelocities(
// Check that we are not outside the fluid grid
if (x <= nx && y <= ny && z <= nz) {
+ //if (x < nx && y < ny && z < nz) {
// Values that are needed for calculating the predicted velocity
__syncthreads();
t@@ -2230,6 +2234,20 @@ __global__ void findPredNSvelocities(
v_p.z = v.z;
//v_p.z = 0.0;
+ // Do not set components placed in ghost node cells
+ if (x == nx) {
+ v_p.y = 0.0;
+ v_p.z = 0.0;
+ }
+ if (y == ny) {
+ v_p.x = 0.0;
+ v_p.z = 0.0;
+ }
+ if (z == nz) {
+ v_p.x = 0.0;
+ v_p.y = 0.0;
+ }
+
// Save the predicted velocity
__syncthreads();
dev_ns_v_p_x[fidx] = v_p.x;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.