Commit 8b8a172f authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'develop' into hamilton-jacobi

parents 35f782b3 dc183e8a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ MeshFunction< Mesh, MeshEntityDimension, Real >::
getValue( const EntityType& meshEntity ) const
{
   static_assert( EntityType::getEntityDimension() == MeshEntityDimension, "Calling with wrong EntityType -- entity dimensions do not match." );
   return this->data.getValue( meshEntity.getIndex() );
   return this->data.getElement( meshEntity.getIndex() );
}

template< typename Mesh,
@@ -325,7 +325,7 @@ setValue( const EntityType& meshEntity,
          const RealType& value )
{
   static_assert( EntityType::getEntityDimension() == MeshEntityDimension, "Calling with wrong EntityType -- entity dimensions do not match." );
   this->data.setValue( meshEntity.getIndex(), value );
   this->data.setElement( meshEntity.getIndex(), value );
}

template< typename Mesh,
+2 −19
Original line number Diff line number Diff line
@@ -381,23 +381,6 @@ GridTraverser2D(
   coordinates.x() = begin.x() + Devices::Cuda::getGlobalThreadIdx_x( gridIdx );
   coordinates.y() = begin.y() + Devices::Cuda::getGlobalThreadIdx_y( gridIdx );
   
   /*if( processOnlyBoundaryEntities && 
      ( GridEntity::getMeshDimension() == 2 || GridEntity::getMeshDimension() == 0 ) )
   {
      if( coordinates.x() == begin.x() || coordinates.x() == end.x() ||
          coordinates.y() == begin.y() || coordinates.y() == end.y() )
      {
         GridEntity entity( *grid, coordinates, gridEntityParameters... );
         entity.refresh();
         EntitiesProcessor::processEntity
         ( *grid,
           *userData,
           entity );
      }
      return;
   }*/
   
   
   if( coordinates <= end )
   {
      GridEntity entity( *grid, coordinates, gridEntityParameters... );
@@ -504,7 +487,7 @@ processEntities(
{
#ifdef HAVE_CUDA
   if( processOnlyBoundaryEntities && 
      ( GridEntity::getMeshDimension() == 2 || GridEntity::getMeshDimension() == 0 ) )
       ( GridEntity::getEntityDimension() == 2 || GridEntity::getEntityDimension() == 0 ) )
   {
      dim3 cudaBlockSize( 256 );
      dim3 cudaBlocksCountAlongX, cudaGridsCountAlongX,
@@ -998,7 +981,7 @@ processEntities(
{
#ifdef HAVE_CUDA   
   if( processOnlyBoundaryEntities && 
      ( GridEntity::getMeshDimension() == 3 || GridEntity::getMeshDimension() == 0 ) )
       ( GridEntity::getEntityDimension() == 3 || GridEntity::getEntityDimension() == 0 ) )
   {
      dim3 cudaBlockSize( 16, 16 );
      const IndexType entitiesAlongX = end.x() - begin.x() + 1;
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ struct ParallelFor< Devices::Cuda >

         Devices::Cuda::synchronizeDevice();
         ParallelForKernel<<< gridSize, blockSize >>>( start, end, f, args... );
         cudaDeviceSynchronize();
         TNL_CHECK_CUDA_DEVICE;
      }
#endif
   }