From fde31a7088f9a30e74dfdad4ab91724c9f26321a Mon Sep 17 00:00:00 2001 From: Tomas Sobotik <sobotto4@fjfi.cvut.cz> Date: Mon, 21 Mar 2016 17:06:58 +0100 Subject: [PATCH] 3D parallel iterative solver almost fully fixed v2 --- .../tnlParallelEikonalSolver3D_impl.h | 2 +- .../godunov-eikonal/parallelGodunovEikonal3D_impl.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h b/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h index 70bef8e4e8..b3170882d8 100644 --- a/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h +++ b/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h @@ -1013,7 +1013,7 @@ void tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>:: if(abs(fu) > 0.0) sharedTau[l]=abs(cfl/fu); - if(u[l]*fu < 0.0 && abs(fu*sharedTau[l]) >abs(u[l])) sharedTau[l] = 0.5*abs(u[l]/fu) + this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >()*this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >(); + /* if(u[l]*fu < 0.0 && abs(fu*sharedTau[l]) >abs(u[l])) sharedTau[l] = 0.9*abs(u[l]/fu)/* + this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >()*this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >()*/; if(l == 0) { diff --git a/src/operators/godunov-eikonal/parallelGodunovEikonal3D_impl.h b/src/operators/godunov-eikonal/parallelGodunovEikonal3D_impl.h index 20063523af..7c4a754847 100644 --- a/src/operators/godunov-eikonal/parallelGodunovEikonal3D_impl.h +++ b/src/operators/godunov-eikonal/parallelGodunovEikonal3D_impl.h @@ -373,13 +373,13 @@ Real parallelGodunovEikonalScheme< tnlGrid< 3, MeshReal, Device, MeshIndex >, Re else c = zf; -// d =(1.0 - sqrt(a*a+b*b+c*c)*ihx ); +// d = ( 1.0 - sqrt(a*a + b*b + c*c)*ihx ); d = 1.0 - sqrt(xf*xf + xb*xb + yf*yf + yb*yb + zf*zf + zb*zb)*ihx; /*upwind*/ -// if(Sign(d) > 0.0 ) -// return Sign(u[cellIndex])*d; -// else + if(Sign(d) > 0.0 ) + return Sign(u[cellIndex])*d; + else return signui*d; } -- GitLab