Loading src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi/tnlDirectEikonalMethodsBase.h +9 −8 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include <TNL/Meshes/Grid.h> #include <TNL/Functions/MeshFunction.h> #include <TNL/Devices/Cuda.h> using namespace TNL; Loading Loading @@ -36,7 +37,7 @@ class tnlDirectEikonalMethodsBase< Meshes::Grid< 1, Real, Device, Index > > InterfaceMapType& interfaceMap ); template< typename MeshEntity > void updateCell( MeshFunctionType& u, __cuda_callable__ void updateCell( MeshFunctionType& u, const MeshEntity& cell ); }; Loading @@ -61,7 +62,7 @@ class tnlDirectEikonalMethodsBase< Meshes::Grid< 2, Real, Device, Index > > InterfaceMapType& interfaceMap ); template< typename MeshEntity > void updateCell( MeshFunctionType& u, __cuda_callable__ void updateCell( MeshFunctionType& u, const MeshEntity& cell, const RealType velocity = 1.0 ); }; Loading @@ -85,7 +86,7 @@ class tnlDirectEikonalMethodsBase< Meshes::Grid< 3, Real, Device, Index > > InterfaceMapType& interfaceMap ); template< typename MeshEntity > void updateCell( MeshFunctionType& u, __cuda_callable__ void updateCell( MeshFunctionType& u, const MeshEntity& cell, const RealType velocity = 1.0); Loading src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi/tnlFastSweepingMethod2D_impl.h +120 −114 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ solve( const MeshPointer& mesh, IndexType iteration( 0 ); while( iteration < this->maxIterations ) { if( std::is_same< DeviceType, Devices::Host >::value ) { for( cell.getCoordinates().y() = 0; cell.getCoordinates().y() < mesh->getDimensions().y(); cell.getCoordinates().y()++ ) Loading Loading @@ -202,6 +203,11 @@ solve( const MeshPointer& mesh, this->updateCell( aux, cell ); } }*/ } if( std::is_same< DeviceType, Devices::Cuda >::value ) { // TODO: CUDA code } iteration++; } Loading Loading
src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi/tnlDirectEikonalMethodsBase.h +9 −8 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include <TNL/Meshes/Grid.h> #include <TNL/Functions/MeshFunction.h> #include <TNL/Devices/Cuda.h> using namespace TNL; Loading Loading @@ -36,7 +37,7 @@ class tnlDirectEikonalMethodsBase< Meshes::Grid< 1, Real, Device, Index > > InterfaceMapType& interfaceMap ); template< typename MeshEntity > void updateCell( MeshFunctionType& u, __cuda_callable__ void updateCell( MeshFunctionType& u, const MeshEntity& cell ); }; Loading @@ -61,7 +62,7 @@ class tnlDirectEikonalMethodsBase< Meshes::Grid< 2, Real, Device, Index > > InterfaceMapType& interfaceMap ); template< typename MeshEntity > void updateCell( MeshFunctionType& u, __cuda_callable__ void updateCell( MeshFunctionType& u, const MeshEntity& cell, const RealType velocity = 1.0 ); }; Loading @@ -85,7 +86,7 @@ class tnlDirectEikonalMethodsBase< Meshes::Grid< 3, Real, Device, Index > > InterfaceMapType& interfaceMap ); template< typename MeshEntity > void updateCell( MeshFunctionType& u, __cuda_callable__ void updateCell( MeshFunctionType& u, const MeshEntity& cell, const RealType velocity = 1.0); Loading
src/TNL/Experimental/Hamilton-Jacobi/Solvers/hamilton-jacobi/tnlFastSweepingMethod2D_impl.h +120 −114 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ solve( const MeshPointer& mesh, IndexType iteration( 0 ); while( iteration < this->maxIterations ) { if( std::is_same< DeviceType, Devices::Host >::value ) { for( cell.getCoordinates().y() = 0; cell.getCoordinates().y() < mesh->getDimensions().y(); cell.getCoordinates().y()++ ) Loading Loading @@ -202,6 +203,11 @@ solve( const MeshPointer& mesh, this->updateCell( aux, cell ); } }*/ } if( std::is_same< DeviceType, Devices::Cuda >::value ) { // TODO: CUDA code } iteration++; } Loading