Loading src/TNL/Meshes/Mesh.h +2 −2 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ template< typename MeshConfig, typename Device = Devices::Host > class Mesh : public Object, protected MeshStorageLayers< MeshConfig > protected MeshStorageLayers< MeshConfig, Device > { using StorageBaseType = MeshStorageLayers< MeshConfig >; using StorageBaseType = MeshStorageLayers< MeshConfig, Device >; public: using Config = MeshConfig; Loading src/TNL/Meshes/MeshDetails/MeshEntity_impl.h +8 −8 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ bool MeshEntity< MeshConfig, Device, EntityTopology >:: save( File& file ) const { if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::save( file ) ) if( ! MeshSubentityAccess< MeshConfig, Device, EntityTopology >::save( file ) ) return false; return true; } Loading @@ -62,7 +62,7 @@ bool MeshEntity< MeshConfig, Device, EntityTopology >:: load( File& file ) { if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::load( file ) ) if( ! MeshSubentityAccess< MeshConfig, Device, EntityTopology >::load( file ) ) return false; return true; } Loading @@ -75,8 +75,8 @@ MeshEntity< MeshConfig, Device, EntityTopology >:: print( std::ostream& str ) const { str << "\t Mesh entity dimension: " << EntityTopology::dimension << std::endl; MeshSubentityAccess< MeshConfig, EntityTopology >::print( str ); MeshSuperentityAccess< MeshConfig, EntityTopology >::print( str ); MeshSubentityAccess< MeshConfig, Device, EntityTopology >::print( str ); MeshSuperentityAccess< MeshConfig, Device, EntityTopology >::print( str ); } template< typename MeshConfig, Loading @@ -86,8 +86,8 @@ bool MeshEntity< MeshConfig, Device, EntityTopology >:: operator==( const MeshEntity& entity ) const { return ( MeshSubentityAccess< MeshConfig, EntityTopology >::operator==( entity ) && MeshSuperentityAccess< MeshConfig, EntityTopology >::operator==( entity ) && return ( MeshSubentityAccess< MeshConfig, Device, EntityTopology >::operator==( entity ) && MeshSuperentityAccess< MeshConfig, Device, EntityTopology >::operator==( entity ) && MeshEntityIndex< typename MeshConfig::IdType >::operator==( entity ) ); } Loading Loading @@ -183,7 +183,7 @@ print( std::ostream& str ) const { str << "\t Mesh entity dimension: " << MeshVertexTopology::dimension << std::endl; str << "\t Coordinates = " << point << std::endl; MeshSuperentityAccess< MeshConfig, MeshVertexTopology >::print( str ); MeshSuperentityAccess< MeshConfig, Device, MeshVertexTopology >::print( str ); } template< typename MeshConfig, typename Device > Loading @@ -191,7 +191,7 @@ bool MeshEntity< MeshConfig, Device, MeshVertexTopology >:: operator==( const MeshEntity& entity ) const { return ( MeshSuperentityAccess< MeshConfig, MeshVertexTopology >::operator==( entity ) && return ( MeshSuperentityAccess< MeshConfig, Device, MeshVertexTopology >::operator==( entity ) && MeshEntityIndex< typename MeshConfig::IdType >::operator==( entity ) && point == entity.point ); } Loading src/TNL/Meshes/MeshDetails/layers/MeshBoundaryTagsLayer.h +6 −4 Original line number Diff line number Diff line Loading @@ -19,11 +19,12 @@ namespace Meshes { // This is the implementation of the BoundaryTags layer for one specific dimension. // It is inherited by MeshStorageLayer. template< typename MeshConfig, typename Device, typename DimensionTag, bool TagStorage = MeshConfig::boundaryTagsStorage( typename MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::EntityTopology() ) > bool TagStorage = MeshConfig::boundaryTagsStorage( typename MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::EntityTopology() ) > class MeshBoundaryTagsLayer { using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionTag::value >; public: Loading Loading @@ -155,10 +156,11 @@ private: }; template< typename MeshConfig, typename Device, typename DimensionTag > class MeshBoundaryTagsLayer< MeshConfig, DimensionTag, false > class MeshBoundaryTagsLayer< MeshConfig, Device, DimensionTag, false > { using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionTag::value >; public: Loading src/TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h +37 −28 Original line number Diff line number Diff line Loading @@ -26,17 +26,18 @@ namespace TNL { namespace Meshes { template< typename MeshConfig, typename Device, typename DimensionTag, bool EntityStorage = MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::storageEnabled > bool EntityStorage = MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::storageEnabled > class MeshStorageLayer; template< typename MeshConfig > template< typename MeshConfig, typename Device > class MeshStorageLayers : public MeshStorageLayer< MeshConfig, typename MeshTraits< MeshConfig >::DimensionTag > : public MeshStorageLayer< MeshConfig, Device, typename MeshTraits< MeshConfig, Device >::DimensionTag > { using MeshTraitsType = MeshTraits< MeshConfig >; using BaseType = MeshStorageLayer< MeshConfig, typename MeshTraitsType::DimensionTag >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using BaseType = MeshStorageLayer< MeshConfig, Device, typename MeshTraitsType::DimensionTag >; template< int Dimension > using EntityTraits = typename MeshTraitsType::template EntityTraits< Dimension >; Loading @@ -55,7 +56,8 @@ protected: static_assert( EntityTraits< Dimension >::storageEnabled, "You try to get subentity storage of entities which are not configured for storage." ); static_assert( Dimension > Subdimension, "Invalid combination of Dimension and Subdimension." ); using BaseType = MeshSubentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< Dimension >::EntityTopology >; Device, typename EntityTraits< Dimension >::EntityTopology >; return BaseType::template getSubentityStorageNetwork< Subdimension >(); } Loading @@ -66,7 +68,8 @@ protected: static_assert( EntityTraits< Dimension >::storageEnabled, "You try to get superentity storage of entities which are not configured for storage." ); static_assert( Dimension < Superdimension, "Invalid combination of Dimension and Superdimension." ); using BaseType = MeshSuperentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< Dimension >::EntityTopology >; Device, typename EntityTraits< Dimension >::EntityTopology >; return BaseType::template getSuperentityStorageNetwork< Superdimension >(); } Loading Loading @@ -111,28 +114,32 @@ protected: template< typename MeshConfig, typename Device, typename DimensionTag > class MeshStorageLayer< MeshConfig, Device, DimensionTag, true > : public MeshStorageLayer< MeshConfig, typename DimensionTag::Decrement >, : public MeshStorageLayer< MeshConfig, Device, typename DimensionTag::Decrement >, public MeshSubentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::EntityTopology >, Device, typename MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::EntityTopology >, public MeshSuperentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::EntityTopology >, public MeshBoundaryTagsLayer< MeshConfig, DimensionTag > Device, typename MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::EntityTopology >, public MeshBoundaryTagsLayer< MeshConfig, Device, DimensionTag > { public: using BaseType = MeshStorageLayer< MeshConfig, typename DimensionTag::Decrement >; using MeshTraitsType = MeshTraits< MeshConfig >; using BaseType = MeshStorageLayer< MeshConfig, Device, typename DimensionTag::Decrement >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionTag::value >; using StorageArrayType = typename EntityTraitsType::StorageArrayType; using GlobalIndexType = typename EntityTraitsType::GlobalIndexType; using EntityType = typename EntityTraitsType::EntityType; using EntityTopology = typename EntityTraitsType::EntityTopology; using SubentityStorageBaseType = MeshSubentityStorageLayers< MeshConfig, EntityTopology >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, EntityTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, DimensionTag >; using SubentityStorageBaseType = MeshSubentityStorageLayers< MeshConfig, Device, EntityTopology >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, Device, EntityTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, Device, DimensionTag >; /**** * Make visible getters of the lower layer Loading Loading @@ -243,24 +250,25 @@ protected: }; template< typename MeshConfig, typename Device, typename DimensionTag > class MeshStorageLayer< MeshConfig, DimensionTag, false > : public MeshStorageLayer< MeshConfig, typename DimensionTag::Decrement > class MeshStorageLayer< MeshConfig, Device, DimensionTag, false > : public MeshStorageLayer< MeshConfig, Device, typename DimensionTag::Decrement > { }; template< typename MeshConfig > class MeshStorageLayer< MeshConfig, Meshes::DimensionTag< 0 >, true > : public MeshSuperentityStorageLayers< MeshConfig, MeshVertexTopology >, public MeshBoundaryTagsLayer< MeshConfig, Meshes::DimensionTag< 0 > > template< typename MeshConfig, typename Device > class MeshStorageLayer< MeshConfig, Device, Meshes::DimensionTag< 0 >, true > : public MeshSuperentityStorageLayers< MeshConfig, Device, MeshVertexTopology >, public MeshBoundaryTagsLayer< MeshConfig, Device, Meshes::DimensionTag< 0 > > { public: using DimensionTag = Meshes::DimensionTag< 0 >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, MeshVertexTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, Meshes::DimensionTag< 0 > >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, Device, MeshVertexTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, Device, Meshes::DimensionTag< 0 > >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< 0 >; using StorageArrayType = typename EntityTraitsType::StorageArrayType; using GlobalIndexType = typename EntityTraitsType::GlobalIndexType; Loading Loading @@ -385,8 +393,9 @@ protected: /**** * Forces termination of recursive inheritance (prevents compiler from generating huge error logs) */ template< typename MeshConfig > class MeshStorageLayer< MeshConfig, DimensionTag< 0 >, false > template< typename MeshConfig, typename Device > class MeshStorageLayer< MeshConfig, Device, DimensionTag< 0 >, false > { }; Loading src/TNL/Meshes/MeshDetails/layers/MeshSubentityAccess.h +23 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ namespace TNL { namespace Meshes { template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag, bool SubentityStorage = Loading @@ -30,17 +31,20 @@ class MeshSubentityAccessLayer; template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccess : public MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< 0 > > { using BaseType = MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< 0 > >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; template< int Subdimension > using SubentityTraits = typename MeshTraitsType::template SubentityTraits< EntityTopology, Subdimension >; Loading Loading @@ -106,22 +110,26 @@ public: template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, DimensionTag, true, true > : public MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment > { using BaseType = MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using SubentityTraitsType = typename MeshTraitsType::template SubentityTraits< EntityTopology, DimensionTag::value >; protected: Loading Loading @@ -236,23 +244,27 @@ private: }; template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, DimensionTag, true, false > : public MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment > { static_assert( DimensionTag::value < EntityTopology::dimension, "" ); using BaseType = MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using SubentityTraitsType = typename MeshTraitsType::template SubentityTraits< EntityTopology, DimensionTag::value >; protected: Loading Loading @@ -354,8 +366,10 @@ private: template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< EntityTopology::dimension >, true, Loading Loading @@ -403,8 +417,10 @@ protected: }; template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< EntityTopology::dimension >, true, Loading Loading @@ -452,8 +468,10 @@ protected: }; template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< EntityTopology::dimension >, false, Loading Loading @@ -501,9 +519,11 @@ protected: }; template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, DimensionTag, false, Loading Loading
src/TNL/Meshes/Mesh.h +2 −2 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ template< typename MeshConfig, typename Device = Devices::Host > class Mesh : public Object, protected MeshStorageLayers< MeshConfig > protected MeshStorageLayers< MeshConfig, Device > { using StorageBaseType = MeshStorageLayers< MeshConfig >; using StorageBaseType = MeshStorageLayers< MeshConfig, Device >; public: using Config = MeshConfig; Loading
src/TNL/Meshes/MeshDetails/MeshEntity_impl.h +8 −8 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ bool MeshEntity< MeshConfig, Device, EntityTopology >:: save( File& file ) const { if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::save( file ) ) if( ! MeshSubentityAccess< MeshConfig, Device, EntityTopology >::save( file ) ) return false; return true; } Loading @@ -62,7 +62,7 @@ bool MeshEntity< MeshConfig, Device, EntityTopology >:: load( File& file ) { if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::load( file ) ) if( ! MeshSubentityAccess< MeshConfig, Device, EntityTopology >::load( file ) ) return false; return true; } Loading @@ -75,8 +75,8 @@ MeshEntity< MeshConfig, Device, EntityTopology >:: print( std::ostream& str ) const { str << "\t Mesh entity dimension: " << EntityTopology::dimension << std::endl; MeshSubentityAccess< MeshConfig, EntityTopology >::print( str ); MeshSuperentityAccess< MeshConfig, EntityTopology >::print( str ); MeshSubentityAccess< MeshConfig, Device, EntityTopology >::print( str ); MeshSuperentityAccess< MeshConfig, Device, EntityTopology >::print( str ); } template< typename MeshConfig, Loading @@ -86,8 +86,8 @@ bool MeshEntity< MeshConfig, Device, EntityTopology >:: operator==( const MeshEntity& entity ) const { return ( MeshSubentityAccess< MeshConfig, EntityTopology >::operator==( entity ) && MeshSuperentityAccess< MeshConfig, EntityTopology >::operator==( entity ) && return ( MeshSubentityAccess< MeshConfig, Device, EntityTopology >::operator==( entity ) && MeshSuperentityAccess< MeshConfig, Device, EntityTopology >::operator==( entity ) && MeshEntityIndex< typename MeshConfig::IdType >::operator==( entity ) ); } Loading Loading @@ -183,7 +183,7 @@ print( std::ostream& str ) const { str << "\t Mesh entity dimension: " << MeshVertexTopology::dimension << std::endl; str << "\t Coordinates = " << point << std::endl; MeshSuperentityAccess< MeshConfig, MeshVertexTopology >::print( str ); MeshSuperentityAccess< MeshConfig, Device, MeshVertexTopology >::print( str ); } template< typename MeshConfig, typename Device > Loading @@ -191,7 +191,7 @@ bool MeshEntity< MeshConfig, Device, MeshVertexTopology >:: operator==( const MeshEntity& entity ) const { return ( MeshSuperentityAccess< MeshConfig, MeshVertexTopology >::operator==( entity ) && return ( MeshSuperentityAccess< MeshConfig, Device, MeshVertexTopology >::operator==( entity ) && MeshEntityIndex< typename MeshConfig::IdType >::operator==( entity ) && point == entity.point ); } Loading
src/TNL/Meshes/MeshDetails/layers/MeshBoundaryTagsLayer.h +6 −4 Original line number Diff line number Diff line Loading @@ -19,11 +19,12 @@ namespace Meshes { // This is the implementation of the BoundaryTags layer for one specific dimension. // It is inherited by MeshStorageLayer. template< typename MeshConfig, typename Device, typename DimensionTag, bool TagStorage = MeshConfig::boundaryTagsStorage( typename MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::EntityTopology() ) > bool TagStorage = MeshConfig::boundaryTagsStorage( typename MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::EntityTopology() ) > class MeshBoundaryTagsLayer { using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionTag::value >; public: Loading Loading @@ -155,10 +156,11 @@ private: }; template< typename MeshConfig, typename Device, typename DimensionTag > class MeshBoundaryTagsLayer< MeshConfig, DimensionTag, false > class MeshBoundaryTagsLayer< MeshConfig, Device, DimensionTag, false > { using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionTag::value >; public: Loading
src/TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h +37 −28 Original line number Diff line number Diff line Loading @@ -26,17 +26,18 @@ namespace TNL { namespace Meshes { template< typename MeshConfig, typename Device, typename DimensionTag, bool EntityStorage = MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::storageEnabled > bool EntityStorage = MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::storageEnabled > class MeshStorageLayer; template< typename MeshConfig > template< typename MeshConfig, typename Device > class MeshStorageLayers : public MeshStorageLayer< MeshConfig, typename MeshTraits< MeshConfig >::DimensionTag > : public MeshStorageLayer< MeshConfig, Device, typename MeshTraits< MeshConfig, Device >::DimensionTag > { using MeshTraitsType = MeshTraits< MeshConfig >; using BaseType = MeshStorageLayer< MeshConfig, typename MeshTraitsType::DimensionTag >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using BaseType = MeshStorageLayer< MeshConfig, Device, typename MeshTraitsType::DimensionTag >; template< int Dimension > using EntityTraits = typename MeshTraitsType::template EntityTraits< Dimension >; Loading @@ -55,7 +56,8 @@ protected: static_assert( EntityTraits< Dimension >::storageEnabled, "You try to get subentity storage of entities which are not configured for storage." ); static_assert( Dimension > Subdimension, "Invalid combination of Dimension and Subdimension." ); using BaseType = MeshSubentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< Dimension >::EntityTopology >; Device, typename EntityTraits< Dimension >::EntityTopology >; return BaseType::template getSubentityStorageNetwork< Subdimension >(); } Loading @@ -66,7 +68,8 @@ protected: static_assert( EntityTraits< Dimension >::storageEnabled, "You try to get superentity storage of entities which are not configured for storage." ); static_assert( Dimension < Superdimension, "Invalid combination of Dimension and Superdimension." ); using BaseType = MeshSuperentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< Dimension >::EntityTopology >; Device, typename EntityTraits< Dimension >::EntityTopology >; return BaseType::template getSuperentityStorageNetwork< Superdimension >(); } Loading Loading @@ -111,28 +114,32 @@ protected: template< typename MeshConfig, typename Device, typename DimensionTag > class MeshStorageLayer< MeshConfig, Device, DimensionTag, true > : public MeshStorageLayer< MeshConfig, typename DimensionTag::Decrement >, : public MeshStorageLayer< MeshConfig, Device, typename DimensionTag::Decrement >, public MeshSubentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::EntityTopology >, Device, typename MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::EntityTopology >, public MeshSuperentityStorageLayers< MeshConfig, typename MeshTraits< MeshConfig >::template EntityTraits< DimensionTag::value >::EntityTopology >, public MeshBoundaryTagsLayer< MeshConfig, DimensionTag > Device, typename MeshTraits< MeshConfig, Device >::template EntityTraits< DimensionTag::value >::EntityTopology >, public MeshBoundaryTagsLayer< MeshConfig, Device, DimensionTag > { public: using BaseType = MeshStorageLayer< MeshConfig, typename DimensionTag::Decrement >; using MeshTraitsType = MeshTraits< MeshConfig >; using BaseType = MeshStorageLayer< MeshConfig, Device, typename DimensionTag::Decrement >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionTag::value >; using StorageArrayType = typename EntityTraitsType::StorageArrayType; using GlobalIndexType = typename EntityTraitsType::GlobalIndexType; using EntityType = typename EntityTraitsType::EntityType; using EntityTopology = typename EntityTraitsType::EntityTopology; using SubentityStorageBaseType = MeshSubentityStorageLayers< MeshConfig, EntityTopology >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, EntityTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, DimensionTag >; using SubentityStorageBaseType = MeshSubentityStorageLayers< MeshConfig, Device, EntityTopology >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, Device, EntityTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, Device, DimensionTag >; /**** * Make visible getters of the lower layer Loading Loading @@ -243,24 +250,25 @@ protected: }; template< typename MeshConfig, typename Device, typename DimensionTag > class MeshStorageLayer< MeshConfig, DimensionTag, false > : public MeshStorageLayer< MeshConfig, typename DimensionTag::Decrement > class MeshStorageLayer< MeshConfig, Device, DimensionTag, false > : public MeshStorageLayer< MeshConfig, Device, typename DimensionTag::Decrement > { }; template< typename MeshConfig > class MeshStorageLayer< MeshConfig, Meshes::DimensionTag< 0 >, true > : public MeshSuperentityStorageLayers< MeshConfig, MeshVertexTopology >, public MeshBoundaryTagsLayer< MeshConfig, Meshes::DimensionTag< 0 > > template< typename MeshConfig, typename Device > class MeshStorageLayer< MeshConfig, Device, Meshes::DimensionTag< 0 >, true > : public MeshSuperentityStorageLayers< MeshConfig, Device, MeshVertexTopology >, public MeshBoundaryTagsLayer< MeshConfig, Device, Meshes::DimensionTag< 0 > > { public: using DimensionTag = Meshes::DimensionTag< 0 >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, MeshVertexTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, Meshes::DimensionTag< 0 > >; using SuperentityStorageBaseType = MeshSuperentityStorageLayers< MeshConfig, Device, MeshVertexTopology >; using BoundaryTagsBaseType = MeshBoundaryTagsLayer< MeshConfig, Device, Meshes::DimensionTag< 0 > >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< 0 >; using StorageArrayType = typename EntityTraitsType::StorageArrayType; using GlobalIndexType = typename EntityTraitsType::GlobalIndexType; Loading Loading @@ -385,8 +393,9 @@ protected: /**** * Forces termination of recursive inheritance (prevents compiler from generating huge error logs) */ template< typename MeshConfig > class MeshStorageLayer< MeshConfig, DimensionTag< 0 >, false > template< typename MeshConfig, typename Device > class MeshStorageLayer< MeshConfig, Device, DimensionTag< 0 >, false > { }; Loading
src/TNL/Meshes/MeshDetails/layers/MeshSubentityAccess.h +23 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ namespace TNL { namespace Meshes { template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag, bool SubentityStorage = Loading @@ -30,17 +31,20 @@ class MeshSubentityAccessLayer; template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccess : public MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< 0 > > { using BaseType = MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< 0 > >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; template< int Subdimension > using SubentityTraits = typename MeshTraitsType::template SubentityTraits< EntityTopology, Subdimension >; Loading Loading @@ -106,22 +110,26 @@ public: template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, DimensionTag, true, true > : public MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment > { using BaseType = MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using SubentityTraitsType = typename MeshTraitsType::template SubentityTraits< EntityTopology, DimensionTag::value >; protected: Loading Loading @@ -236,23 +244,27 @@ private: }; template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, DimensionTag, true, false > : public MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment > { static_assert( DimensionTag::value < EntityTopology::dimension, "" ); using BaseType = MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, typename DimensionTag::Increment >; using MeshTraitsType = MeshTraits< MeshConfig >; using MeshTraitsType = MeshTraits< MeshConfig, Device >; using SubentityTraitsType = typename MeshTraitsType::template SubentityTraits< EntityTopology, DimensionTag::value >; protected: Loading Loading @@ -354,8 +366,10 @@ private: template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< EntityTopology::dimension >, true, Loading Loading @@ -403,8 +417,10 @@ protected: }; template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< EntityTopology::dimension >, true, Loading Loading @@ -452,8 +468,10 @@ protected: }; template< typename MeshConfig, typename Device, typename EntityTopology > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, Meshes::DimensionTag< EntityTopology::dimension >, false, Loading Loading @@ -501,9 +519,11 @@ protected: }; template< typename MeshConfig, typename Device, typename EntityTopology, typename DimensionTag > class MeshSubentityAccessLayer< MeshConfig, Device, EntityTopology, DimensionTag, false, Loading