tdisable debug output, add experimental underrelaxation - sphere - GPU-based 3D… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit e08f102fd3b8c54eb79e648b16dacc9a5d7e1207 | |
parent fe438fd43b79359a6b4f1877f366fb1b0e4f066d | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 9 Nov 2014 21:13:12 +0100 | |
disable debug output, add experimental underrelaxation | |
Diffstat: | |
M src/darcy.cuh | 7 +++++++ | |
M src/device.cu | 4 ++++ | |
2 files changed, 11 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/src/darcy.cuh b/src/darcy.cuh | |
t@@ -898,6 +898,10 @@ __global__ void updateDarcySolution( | |
(z == wall0_iz)) | |
p_new = p; | |
+ // add relaxation | |
+ const Float theta = 0.1; | |
+ p_new = p*(1.0-theta) + p_new*theta; | |
+ | |
// normalized residual, avoid division by zero | |
//const Float res_norm = (p_new - p)*(p_new - p)/(p_new*p_new + 1.0e-1… | |
const Float res_norm = (p_new - p)/(p + 1.0e-16); | |
t@@ -912,10 +916,13 @@ __global__ void updateDarcySolution( | |
"p_old = %e\n" | |
"dp_diff = %e\n" | |
"dp_forc = %e\n" | |
+ "dphi = %e\n" | |
+ "dphi/dt = %e\n" | |
"res_norm = %e\n", | |
x,y,z, | |
p_new, p, p_old, | |
dp_diff, dp_forc, | |
+ dphi, dphi/(ndem*devC_dt), | |
res_norm); | |
#endif | |
diff --git a/src/device.cu b/src/device.cu | |
t@@ -1916,6 +1916,10 @@ __host__ void DEM::startTime() | |
for (unsigned int nijac = 0; nijac<darcy.maxiter; ++nijac)… | |
+#if defined(REPORT_EPSILON) || defined(REPORT_FORCING_TERMS) | |
+ std::cout << "\n\n### Jacobi iteration " << nijac << std::endl; | |
+#endif | |
+ | |
if (nijac == 0) { | |
if (PROFILING == 1) | |
startTimer(&kernel_tic); |