diff --git a/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h b/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h index 7fb0a5d4096f05bcf95b0965cfae71e618c711a6..3accfad7b2bd5d5ee6ef9339bf790d40b608e592 100644 --- a/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h +++ b/examples/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h @@ -1017,10 +1017,12 @@ void tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>:: if(l == 0) { - if(sharedTau[0] > 1.0 * this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >()) sharedTau[0] = 1.0 * this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >(); + if(sharedTau[0] > 0.5 * this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >()) sharedTau[0] = 0.5 * this->subMesh.template getSpaceStepsProducts< 1, 0, 0 >(); } else if(l == blockDim.x*blockDim.y*blockDim.z - 1) + { if( time + sharedTau[l] > finalTime ) sharedTau[l] = finalTime - time; + } if(l < 256) sharedTau[l] = Min(sharedTau[l],sharedTau[l+256]); @@ -1030,6 +1032,7 @@ void tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>:: if(l < 64) sharedTau[l] = Min(sharedTau[l],sharedTau[l+64]); __syncthreads(); if(l < 32) sharedTau[l] = Min(sharedTau[l],sharedTau[l+32]); + __syncthreads(); if(l < 16) sharedTau[l] = Min(sharedTau[l],sharedTau[l+16]); if(l < 8) sharedTau[l] = Min(sharedTau[l],sharedTau[l+8]); if(l < 4) sharedTau[l] = Min(sharedTau[l],sharedTau[l+4]); diff --git a/src/operators/godunov-eikonal/parallelGodunovEikonal.h b/src/operators/godunov-eikonal/parallelGodunovEikonal.h index 73aa091c41728364ab2c41209d3a761f9d53d29d..6954c3008c8a43ff85efd6ef806b664b13ba735c 100644 --- a/src/operators/godunov-eikonal/parallelGodunovEikonal.h +++ b/src/operators/godunov-eikonal/parallelGodunovEikonal.h @@ -88,6 +88,7 @@ public: #endif bool init( const tnlParameterContainer& parameters ); + RealType epsilon; protected: @@ -97,7 +98,7 @@ protected: RealType h; - RealType epsilon; + }; @@ -166,6 +167,7 @@ public: #endif bool init( const tnlParameterContainer& parameters ); + RealType epsilon; protected: @@ -176,7 +178,7 @@ protected: RealType hx, ihx; RealType hy, ihy; - RealType epsilon; + }; @@ -243,6 +245,7 @@ public: #endif bool init( const tnlParameterContainer& parameters ); + RealType epsilon; protected: @@ -254,9 +257,6 @@ protected: RealType hy, ihy; RealType hz, ihz; - RealType epsilon; - - };