Loading src/core/arrays/tnlArray_impl.h +6 −4 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ releaseData() const { tnlArrayOperations< Device >::freeMemory( this->allocationPointer ); delete this->referenceCounter; //std::cerr << "Deallocating reference counter " << this->referenceCounter << std::endl; } } else Loading Loading @@ -247,12 +248,13 @@ bind( const tnlArray< Element, Device, Index >& array, if( array.referenceCounter ) { this->referenceCounter = array.referenceCounter; *this->referenceCounter++; ( *this->referenceCounter )++; } else { this->referenceCounter = array.referenceCounter = new int; *this->referenceCounter = 2; //std::cerr << "Allocating reference counter " << this->referenceCounter << std::endl; } } } Loading src/functions/tnlMeshFunction_impl.h +1 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,7 @@ operator = ( const Function& f ) tnlMeshFunctionEvaluator< ThisType, Function >::assign( f, *this ); return *this; } return *this; } template< typename Mesh, Loading src/mesh/grids/tnlGridEntity.h +14 −1 Original line number Diff line number Diff line Loading @@ -226,9 +226,15 @@ class tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions, Con __cuda_callable__ inline const EntityOrientationType getOrientation() const; __cuda_callable__ inline void setOrientation( const EntityOrientationType& orientation ){}; __cuda_callable__ inline const EntityBasisType getBasis() const; __cuda_callable__ inline void setBasis( const EntityBasisType& basis ){}; template< int NeighbourEntityDimensions = Dimensions > __cuda_callable__ inline const NeighbourEntities< NeighbourEntityDimensions >& Loading Loading @@ -338,9 +344,16 @@ class tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0, Config > __cuda_callable__ inline const EntityOrientationType getOrientation() const; __cuda_callable__ inline void setOrientation( const EntityOrientationType& orientation ){}; __cuda_callable__ inline const EntityBasisType getBasis() const; __cuda_callable__ inline void setBasis( const EntityBasisType& basis ){}; template< int NeighbourEntityDimensions = entityDimensions > __cuda_callable__ inline const NeighbourEntities< NeighbourEntityDimensions >& Loading src/mesh/grids/tnlGridTraverser.h +127 −15 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class tnlGridTraverser< tnlGrid< 1, Real, tnlHost, Index > > { public: typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; typedef tnlGrid< 1, Real, tnlHost, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; Loading @@ -45,37 +45,90 @@ class tnlGridTraverser< tnlGrid< 1, Real, tnlHost, Index > > template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 1D grid, tnlCuda */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 1, Real, tnlCuda, Index > > { public: typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities > static void processBoundaryEntities( processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 2D grid, tnlHost */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 2, Real, tnlHost, Index > > { public: typedef tnlGrid< 2, Real, tnlHost, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1 > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 1D grid, tnlCuda * 2D grid, tnlCuda */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 1, Real, tnlCuda, Index > > class tnlGridTraverser< tnlGrid< 2, Real, tnlCuda, Index > > { public: typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; typedef tnlGrid< 2, Real, tnlCuda, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; Loading @@ -84,25 +137,84 @@ class tnlGridTraverser< tnlGrid< 1, Real, tnlCuda, Index > > template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1 > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 3D grid, tnlHost */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 3, Real, tnlHost, Index > > { public: typedef tnlGrid< 3, Real, tnlHost, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1, int ZOrthogonalBoundary = 1 > static void processBoundaryEntities( processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 3D grid, tnlCuda */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 3, Real, tnlCuda, Index > > { public: typedef tnlGrid< 3, Real, tnlCuda, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1, int ZOrthogonalBoundary = 1 > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; #include <mesh/grids/tnlGridTraverser_impl.h> Loading src/mesh/grids/tnlGridTraverser_impl.h 0 → 100644 +534 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
src/core/arrays/tnlArray_impl.h +6 −4 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ releaseData() const { tnlArrayOperations< Device >::freeMemory( this->allocationPointer ); delete this->referenceCounter; //std::cerr << "Deallocating reference counter " << this->referenceCounter << std::endl; } } else Loading Loading @@ -247,12 +248,13 @@ bind( const tnlArray< Element, Device, Index >& array, if( array.referenceCounter ) { this->referenceCounter = array.referenceCounter; *this->referenceCounter++; ( *this->referenceCounter )++; } else { this->referenceCounter = array.referenceCounter = new int; *this->referenceCounter = 2; //std::cerr << "Allocating reference counter " << this->referenceCounter << std::endl; } } } Loading
src/functions/tnlMeshFunction_impl.h +1 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,7 @@ operator = ( const Function& f ) tnlMeshFunctionEvaluator< ThisType, Function >::assign( f, *this ); return *this; } return *this; } template< typename Mesh, Loading
src/mesh/grids/tnlGridEntity.h +14 −1 Original line number Diff line number Diff line Loading @@ -226,9 +226,15 @@ class tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions, Con __cuda_callable__ inline const EntityOrientationType getOrientation() const; __cuda_callable__ inline void setOrientation( const EntityOrientationType& orientation ){}; __cuda_callable__ inline const EntityBasisType getBasis() const; __cuda_callable__ inline void setBasis( const EntityBasisType& basis ){}; template< int NeighbourEntityDimensions = Dimensions > __cuda_callable__ inline const NeighbourEntities< NeighbourEntityDimensions >& Loading Loading @@ -338,9 +344,16 @@ class tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0, Config > __cuda_callable__ inline const EntityOrientationType getOrientation() const; __cuda_callable__ inline void setOrientation( const EntityOrientationType& orientation ){}; __cuda_callable__ inline const EntityBasisType getBasis() const; __cuda_callable__ inline void setBasis( const EntityBasisType& basis ){}; template< int NeighbourEntityDimensions = entityDimensions > __cuda_callable__ inline const NeighbourEntities< NeighbourEntityDimensions >& Loading
src/mesh/grids/tnlGridTraverser.h +127 −15 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class tnlGridTraverser< tnlGrid< 1, Real, tnlHost, Index > > { public: typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; typedef tnlGrid< 1, Real, tnlHost, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; Loading @@ -45,37 +45,90 @@ class tnlGridTraverser< tnlGrid< 1, Real, tnlHost, Index > > template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 1D grid, tnlCuda */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 1, Real, tnlCuda, Index > > { public: typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities > static void processBoundaryEntities( processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 2D grid, tnlHost */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 2, Real, tnlHost, Index > > { public: typedef tnlGrid< 2, Real, tnlHost, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1 > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 1D grid, tnlCuda * 2D grid, tnlCuda */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 1, Real, tnlCuda, Index > > class tnlGridTraverser< tnlGrid< 2, Real, tnlCuda, Index > > { public: typedef tnlGrid< 1, Real, tnlCuda, Index > GridType; typedef tnlGrid< 2, Real, tnlCuda, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; Loading @@ -84,25 +137,84 @@ class tnlGridTraverser< tnlGrid< 1, Real, tnlCuda, Index > > template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1 > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 3D grid, tnlHost */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 3, Real, tnlHost, Index > > { public: typedef tnlGrid< 3, Real, tnlHost, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData > typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1, int ZOrthogonalBoundary = 1 > static void processBoundaryEntities( processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, GridEntity& entity, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; /**** * 3D grid, tnlCuda */ template< typename Real, typename Index > class tnlGridTraverser< tnlGrid< 3, Real, tnlCuda, Index > > { public: typedef tnlGrid< 3, Real, tnlCuda, Index > GridType; typedef Real RealType; typedef tnlHost DeviceType; typedef Index IndexType; typedef typename GridType::CoordinatesType CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData, bool processOnlyBoundaryEntities, int XOrthogonalBoundary = 1, int YOrthogonalBoundary = 1, int ZOrthogonalBoundary = 1 > static void processEntities( const GridType& grid, const CoordinatesType& begin, const CoordinatesType& end, const CoordinatesType& entityOrientation, const CoordinatesType& entityBasis, UserData& userData ); }; #include <mesh/grids/tnlGridTraverser_impl.h> Loading
src/mesh/grids/tnlGridTraverser_impl.h 0 → 100644 +534 −0 File added.Preview size limit exceeded, changes collapsed. Show changes