Commit 607a15ea authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'cuda-optimizations' of...

Merge branch 'cuda-optimizations' of geraldine.fjfi.cvut.cz:/local/projects/tnl/tnl into cuda-optimizations
parents bf6ef8c7 85c9272f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

#pragma once 

#include <mesh/grids/tnlNeighbourGridEntitiesStorage.h>
#include "TestNeighbourGridEntitiesStorage.h"

template< typename GridEntity,
          int NeighbourEntityDimensions,
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ class TestGridEntityCenterGetter< TestGridEntity< tnlGrid< 2, Real, Device, Inde
      __cuda_callable__ inline
      static VertexType getEntityCenter( const GridEntityType& entity )
      {
         const GridType& grid = entity.grid;
         const GridType& grid = entity.getMesh();
         return VertexType(
            grid.getOrigin().x() + ( entity.getCoordinates().x() + 0.5 ) * grid.getSpaceSteps().x(),
            grid.getOrigin().y() + ( entity.getCoordinates().y() + 0.5 ) * grid.getSpaceSteps().y() );
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ class TestNeighbourGridEntityLayer< GridEntity, 0 >
};

template< typename GridEntity >
class tnlNeighbourGridEntitiesStorage
class TestNeighbourGridEntitiesStorage
: public TestNeighbourGridEntityLayer< GridEntity, GridEntity::meshDimensions >
{
   typedef TestNeighbourGridEntityLayer< GridEntity, GridEntity::meshDimensions > BaseType;
+65 −0
Original line number Diff line number Diff line
/***************************************************************************
                          tnlNeighbourGridEntityGetter.h  -  description
                             -------------------
    begin                : Nov 23, 2015
    copyright            : (C) 2015 by Tomas Oberhuber
    email                : tomas.oberhuber@fjfi.cvut.cz
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef TNLNEIGHBOURGRIDENTITYGETTER_H
#define	TNLNEIGHBOURGRIDENTITYGETTER_H

#include <core/tnlAssert.h>

enum tnlGridEntityStencilStorage
{ 
   tnlGridEntityNoStencil = 0,
   tnlGridEntityCrossStencil,
   tnlGridEntityFullStencil
};

template< int storage >
class tnlGridEntityStencilStorageTag
{
   public:
      
      static const int stencilStorage = storage;
};

template< typename GridEntity,
          int NeighbourEntityDimensions,
          typename EntityStencilTag = 
            tnlGridEntityStencilStorageTag< GridEntity::ConfigType::template neighbourEntityStorage< GridEntity >( NeighbourEntityDimensions ) > >
class tnlNeighbourGridEntityGetter
{
   public:

      // TODO: not all specializations are implemented yet
      
      __cuda_callable__
      tnlNeighbourGridEntityGetter( const GridEntity& entity )
      {
         //tnlAssert( false, );
      };
      
      __cuda_callable__
      void refresh( const typename GridEntity::GridType& grid,
                    const typename GridEntity::IndexType& entityIndex )
      {
         //tnlAssert( false, );
      };

};


#endif	/* TNLNEIGHBOURGRIDENTITYGETTER_H */