diff --git a/src/mesh/CMakeLists.txt b/src/mesh/CMakeLists.txt index f4a30c311cf5172aef474976762d798d5b8f1ba5..8574d3d0142ff29e162bf104461d618453ffcc4b 100755 --- a/src/mesh/CMakeLists.txt +++ b/src/mesh/CMakeLists.txt @@ -14,6 +14,7 @@ SET( headers tnlGrid.h tnlMeshWriterNetgen.h tnlMeshInitializer.h tnlMeshEntityInitializer.h - tnlMeshSuperentityInitializerLayer.h ) + tnlMeshSuperentityInitializerLayer.h + tnlTraversal.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/mesh ) \ No newline at end of file diff --git a/src/mesh/tnlGridTraversal.h b/src/mesh/tnlGridTraversal.h new file mode 100644 index 0000000000000000000000000000000000000000..e694ddb662b2f49420cba5272b55d5bdbc8f9918 --- /dev/null +++ b/src/mesh/tnlGridTraversal.h @@ -0,0 +1,91 @@ +/*************************************************************************** + tnlGridTraversal.h - description + ------------------- + begin : Jul 28, 2014 + copyright : (C) 2014 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 TNLGRIDTRAVERSAL_H_ +#define TNLGRIDTRAVERSAL_H_ + +#include <mesh/tnlTraversal.h> + +template< typename Real, + typename Index, + typename UserData > +class tnlTraversal< tnlGrid< 1, Real, tnlHost, Index >, UserData > +{ + public: + typedef tnlGrid< 1, Real, tnlHost, Index > GridType; + typedef Real RealType; + typedef tnlHost DeviceType; + typedef Index IndexType; + typedef UserData UserDataType; + + static void processBoundaryCells( const GridType& grid, + const UserDataType& userData ); + + static void processInteriorCells( const GridType& grid, + const UserDataType& userData ); + + static void processAllCells( const GridType& grid, + const UserDataType& userData ); + + static void processBoundaryVertices( const GridType& grid, + const UserDataType& userData ); + + static void processInteriorVertices( const GridType& grid, + const UserDataType& userData ); + + static void processAllVertices( const GridType& grid, + const UserDataType& userData ); + +}; + +template< typename Real, + typename Index, + typename UserData > +class tnlTraversal< tnlGrid< 1, Real, tnlCuda, Index >, UserData > +{ + public: + typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; + typedef Real RealType; + typedef tnlCuda DeviceType; + typedef Index IndexType; + typedef UserData UserDataType; + + static void processBoundaryCells( const GridType& grid, + const UserDataType& userData ); + + static void processInteriorCells( const GridType& grid, + const UserDataType& userData ); + + static void processAllCells( const GridType& grid, + const UserDataType& userData ); + + static void processBoundaryVertices( const GridType& grid, + const UserDataType& userData ); + + static void processInteriorVertices( const GridType& grid, + const UserDataType& userData ); + + static void processAllVertices( const GridType& grid, + const UserDataType& userData ); + +}; + + + + + +#endif /* TNLGRIDTRAVERSAL_H_ */ diff --git a/src/mesh/tnlTraversal.h b/src/mesh/tnlTraversal.h new file mode 100644 index 0000000000000000000000000000000000000000..2bd33dffcda4c13eda3bc2ac0b231d34f3b5e3e9 --- /dev/null +++ b/src/mesh/tnlTraversal.h @@ -0,0 +1,24 @@ +/*************************************************************************** + tnlTraversal.h - description + ------------------- + begin : Jul 28, 2014 + copyright : (C) 2014 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 TNLTRAVERSAL_H_ +#define TNLTRAVERSAL_H_ + + + + +#endif /* TNLTRAVERSAL_H_ */