Loading examples/advection/advectionProblem_impl.h +12 −21 Original line number Diff line number Diff line Loading @@ -106,26 +106,17 @@ setInitialCondition( const Config::ParameterContainer& parameters, const String& beginChoice = parameters.getParameter< String >( "begin" ); std::cout << beginChoice << " " << dimensions << " " << size << " " << count << " "<< 1/dimensions << std::endl; //getchar(); if (beginChoice == "sin_square") /*if (beginChoice == "step") { double constantFunction; if (dimensions == 1) { std::cout << "adding DOFS" << std::endl; ( *dofs )[0] = 0; double expValue; for (IndexType i = 1; i < count-2; i++) for( IndexType i = 0; i < count; i++) { expValue = std::exp(-std::pow(size*i-2,2)); if( (i>0.4*count) && (i<0.5*count)) constantFunction=1; if( i > 0.45*count && i<0.55*count ) dofs->setElement( i, 1.0 ); else constantFunction=0; if(expValue>constantFunction) ( *dofs )[i] = expValue; else ( *dofs )[i] = constantFunction; }; ( *dofs )[count-1] = 0; dofs->setElement( i, 0.0 ); } } else if (dimensions == 2) { Loading Loading @@ -164,7 +155,7 @@ setInitialCondition( const Config::ParameterContainer& parameters, ( *dofs )[i * count + j] = std::exp(-std::pow(size*i-2,2)-std::pow(size*j-2,2)); }; }; }; };*/ //setting velocity field //std::cout << *dofs << std::endl; //getchar(); Loading src/TNL/Config/ConfigEntryBase.h +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ struct ConfigEntryBase virtual void printEnumValues() const {}; // TODO: Fix this -- uncommenting leads to SIGSEGV (for example in tnl-init) //virtual ~ConfigEntryBase() {}; virtual ~ConfigEntryBase() {}; }; } // namespace Config Loading src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi-parallel-map/tnlParallelMapSolver2D_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -687,8 +687,8 @@ tnlParallelMapSolver<2,SchemeHost, SchemeDevice, Device, double, int>::runSubgri { if(u[0]*u[i] <= 0.0) tmp=true; int centreGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centreGID] == 0 || boundaryCondition == 0) int centerGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centerGID] == 0 || boundaryCondition == 0) tmp = true; } Loading Loading @@ -876,8 +876,8 @@ void tnlParallelMapSolver<2,SchemeHost, SchemeDevice, Device, double, int>::runS if(l == 0) { tmp = 0; int centreGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centreGID] == 0 || boundaryCondition == 0) int centerGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centerGID] == 0 || boundaryCondition == 0) tmp = 1; } __syncthreads(); Loading src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi-parallel/tnlParallelEikonalSolver2D_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -884,8 +884,8 @@ tnlParallelEikonalSolver<2,SchemeHost, SchemeDevice, Device, double, int>::runSu { if(u[0]*u[i] <= 0.0) tmp=true; int centreGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centreGID] == 0 || boundaryCondition == 0) int centerGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centerGID] == 0 || boundaryCondition == 0) tmp = true; } //if(this->currentStep + 3 < getSubgridValue(subGridID)) Loading Loading @@ -1129,8 +1129,8 @@ void tnlParallelEikonalSolver<2,SchemeHost, SchemeDevice, Device, double, int>:: if(l == 0) { tmp = 0; int centreGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centreGID] == 0 || boundaryCondition == 0) int centerGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centerGID] == 0 || boundaryCondition == 0) tmp = 1; } __syncthreads(); Loading src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -860,9 +860,9 @@ tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>::runSu idz = subGridID / (this->gridRows*this->gridCols); idy = (subGridID % (this->gridRows*this->gridCols)) / this->gridCols; idx = subGridID % (this->gridCols); int centreGID = (this->n*idy + (this->n>>1) )*(this->n*this->gridCols) + this->n*idx + (this->n>>1) int centerGID = (this->n*idy + (this->n>>1) )*(this->n*this->gridCols) + this->n*idx + (this->n>>1) + ((this->n>>1)+this->n*idz)*this->n*this->n*this->gridRows*this->gridCols; if(this->unusedCell[centreGID] == 0 || boundaryCondition == 0) if(this->unusedCell[centerGID] == 0 || boundaryCondition == 0) tmp = true; //if(this->currentStep + 3 < getSubgridValue(subGridID)) //tmp = true; Loading Loading @@ -1115,9 +1115,9 @@ void tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>:: if(l == 0) { tmp = 0; int centreGID = (blockDim.y*blockIdx.y + (blockDim.y>>1) )*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1) int centerGID = (blockDim.y*blockIdx.y + (blockDim.y>>1) )*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1) + ((blockDim.z>>1)+blockDim.z*blockIdx.z)*blockDim.x*blockDim.y*gridDim.x*gridDim.y; if(this->unusedCell_cuda[centreGID] == 0 || boundaryCondition == 0) if(this->unusedCell_cuda[centerGID] == 0 || boundaryCondition == 0) tmp = 1; } __syncthreads(); Loading Loading
examples/advection/advectionProblem_impl.h +12 −21 Original line number Diff line number Diff line Loading @@ -106,26 +106,17 @@ setInitialCondition( const Config::ParameterContainer& parameters, const String& beginChoice = parameters.getParameter< String >( "begin" ); std::cout << beginChoice << " " << dimensions << " " << size << " " << count << " "<< 1/dimensions << std::endl; //getchar(); if (beginChoice == "sin_square") /*if (beginChoice == "step") { double constantFunction; if (dimensions == 1) { std::cout << "adding DOFS" << std::endl; ( *dofs )[0] = 0; double expValue; for (IndexType i = 1; i < count-2; i++) for( IndexType i = 0; i < count; i++) { expValue = std::exp(-std::pow(size*i-2,2)); if( (i>0.4*count) && (i<0.5*count)) constantFunction=1; if( i > 0.45*count && i<0.55*count ) dofs->setElement( i, 1.0 ); else constantFunction=0; if(expValue>constantFunction) ( *dofs )[i] = expValue; else ( *dofs )[i] = constantFunction; }; ( *dofs )[count-1] = 0; dofs->setElement( i, 0.0 ); } } else if (dimensions == 2) { Loading Loading @@ -164,7 +155,7 @@ setInitialCondition( const Config::ParameterContainer& parameters, ( *dofs )[i * count + j] = std::exp(-std::pow(size*i-2,2)-std::pow(size*j-2,2)); }; }; }; };*/ //setting velocity field //std::cout << *dofs << std::endl; //getchar(); Loading
src/TNL/Config/ConfigEntryBase.h +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ struct ConfigEntryBase virtual void printEnumValues() const {}; // TODO: Fix this -- uncommenting leads to SIGSEGV (for example in tnl-init) //virtual ~ConfigEntryBase() {}; virtual ~ConfigEntryBase() {}; }; } // namespace Config Loading
src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi-parallel-map/tnlParallelMapSolver2D_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -687,8 +687,8 @@ tnlParallelMapSolver<2,SchemeHost, SchemeDevice, Device, double, int>::runSubgri { if(u[0]*u[i] <= 0.0) tmp=true; int centreGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centreGID] == 0 || boundaryCondition == 0) int centerGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centerGID] == 0 || boundaryCondition == 0) tmp = true; } Loading Loading @@ -876,8 +876,8 @@ void tnlParallelMapSolver<2,SchemeHost, SchemeDevice, Device, double, int>::runS if(l == 0) { tmp = 0; int centreGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centreGID] == 0 || boundaryCondition == 0) int centerGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centerGID] == 0 || boundaryCondition == 0) tmp = 1; } __syncthreads(); Loading
src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi-parallel/tnlParallelEikonalSolver2D_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -884,8 +884,8 @@ tnlParallelEikonalSolver<2,SchemeHost, SchemeDevice, Device, double, int>::runSu { if(u[0]*u[i] <= 0.0) tmp=true; int centreGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centreGID] == 0 || boundaryCondition == 0) int centerGID = (this->n*(subGridID / this->gridRows)+ (this->n >> 1))*(this->n*this->gridCols) + this->n*(subGridID % this->gridRows) + (this->n >> 1); if(this->unusedCell[centerGID] == 0 || boundaryCondition == 0) tmp = true; } //if(this->currentStep + 3 < getSubgridValue(subGridID)) Loading Loading @@ -1129,8 +1129,8 @@ void tnlParallelEikonalSolver<2,SchemeHost, SchemeDevice, Device, double, int>:: if(l == 0) { tmp = 0; int centreGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centreGID] == 0 || boundaryCondition == 0) int centerGID = (blockDim.y*blockIdx.y + (blockDim.y>>1))*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1); if(this->unusedCell_cuda[centerGID] == 0 || boundaryCondition == 0) tmp = 1; } __syncthreads(); Loading
src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi-parallel/tnlParallelEikonalSolver3D_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -860,9 +860,9 @@ tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>::runSu idz = subGridID / (this->gridRows*this->gridCols); idy = (subGridID % (this->gridRows*this->gridCols)) / this->gridCols; idx = subGridID % (this->gridCols); int centreGID = (this->n*idy + (this->n>>1) )*(this->n*this->gridCols) + this->n*idx + (this->n>>1) int centerGID = (this->n*idy + (this->n>>1) )*(this->n*this->gridCols) + this->n*idx + (this->n>>1) + ((this->n>>1)+this->n*idz)*this->n*this->n*this->gridRows*this->gridCols; if(this->unusedCell[centreGID] == 0 || boundaryCondition == 0) if(this->unusedCell[centerGID] == 0 || boundaryCondition == 0) tmp = true; //if(this->currentStep + 3 < getSubgridValue(subGridID)) //tmp = true; Loading Loading @@ -1115,9 +1115,9 @@ void tnlParallelEikonalSolver<3,SchemeHost, SchemeDevice, Device, double, int>:: if(l == 0) { tmp = 0; int centreGID = (blockDim.y*blockIdx.y + (blockDim.y>>1) )*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1) int centerGID = (blockDim.y*blockIdx.y + (blockDim.y>>1) )*(blockDim.x*gridDim.x) + blockDim.x*blockIdx.x + (blockDim.x>>1) + ((blockDim.z>>1)+blockDim.z*blockIdx.z)*blockDim.x*blockDim.y*gridDim.x*gridDim.y; if(this->unusedCell_cuda[centreGID] == 0 || boundaryCondition == 0) if(this->unusedCell_cuda[centerGID] == 0 || boundaryCondition == 0) tmp = 1; } __syncthreads(); Loading