Loading src/mesh/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ SET( headers tnlGrid.h tnlMeshInitializer.h tnlMeshIntegrityChecker.h tnlMeshEntityInitializer.h tnlMeshSuperentityInitializerLayer.h tnlMeshSuperentityStorageInitializer.h tnlTraverser.h tnlTraverser_Grid1D.h tnlTraverser_Grid1D_impl.h Loading src/mesh/layers/tnlMeshSubentityStorageLayer.h +9 −2 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ class tnlMeshSubentityStorageLayer< ConfigTag, typedef typename SubentityTraits::SharedContainerType SharedContainerType; typedef typename ContainerType::ElementType GlobalIndexType; typedef int LocalIndexType; typedef typename SubentityTraits::IdArrayType IdArrayType; tnlMeshSubentityStorageLayer() { Loading Loading @@ -160,8 +161,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag, return this->sharedSubentitiesIndices; } using BaseType::subentityIdsArray; IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; } private: ContainerType subentitiesIndices; IdArrayType subentitiesIndices; SharedContainerType sharedSubentitiesIndices; Loading Loading @@ -201,6 +205,7 @@ class tnlMeshSubentityStorageLayer< ConfigTag, typedef typename SubentityTraits::SharedContainerType SharedContainerType; typedef typename ContainerType::ElementType GlobalIndexType; typedef int LocalIndexType; typedef typename SubentityTraits::IdArrayType IdArrayType; tnlMeshSubentityStorageLayer() { Loading Loading @@ -275,9 +280,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag, return this->sharedVerticesIndices; } IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; } private: ContainerType verticesIndices; IdArrayType verticesIndices; SharedContainerType sharedVerticesIndices; }; Loading src/mesh/tnlMeshEntity.h +89 −71 Original line number Diff line number Diff line Loading @@ -39,8 +39,23 @@ class tnlMeshEntity { public: // TODO: This is only because of STD lib bug in tnlIndexedSet tnlMeshEntity( const tnlMeshEntity& entyti ) {} /**** * Entity typedefs */ typedef ConfigTag MeshConfigTag; typedef EntityTag Tag; typedef tnlMeshEntitySeed< ConfigTag, EntityTag > SeedType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; tnlMeshEntity( const SeedType& entitySeed ) { typedef typename SeedType::LocalIndexType LocalIndexType; for( LocalIndexType i = 0; i < entitySeed.getCornerIds().getSize(); i++ ) this->template setSubentityIndex< 0 >( i, entitySeed.getCornerIds()[ i ] ); } tnlMeshEntity() {} static tnlString getType() Loading Loading @@ -92,16 +107,6 @@ class tnlMeshEntity typename ConfigTag::GlobalIndexType >::operator==( entity ) ); } /**** * Entity typedefs */ typedef ConfigTag MeshConfigTag; typedef EntityTag Tag; typedef tnlMeshEntitySeed< ConfigTag, EntityTag > SeedType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; /**** * Subentities */ Loading Loading @@ -309,12 +314,20 @@ class tnlMeshEntity // TODO: This is only for the mesh initializer, fix this typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityAccessBase; typedef typename tnlMeshConfigTraits< ConfigTag>::IdArrayAccessorType IdArrayAccessorType; typedef tnlMeshSubentityStorageLayers< ConfigTag, EntityTag > SubentityStorageLayers; template< typename DimensionsTag > typename tnlMeshConfigTraits< ConfigTag >::template SubentityTraits< EntityTag, DimensionsTag >::IdArrayType& subentityIdsArray() { return SubentityStorageLayers::subentityIdsArray( DimensionsTag() ); } template<typename DimensionsTag > IdArrayAccessorType& superentityIdsArray() { return SuperentityAccessBase::superentityIdsArray( DimensionsTag()); } }; template< typename ConfigTag > Loading @@ -325,9 +338,23 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > { public: // TODO: This is only because of STD lib bug in tnlIndexedSet tnlMeshEntity( const tnlMeshEntity& entyti ) {} tnlMeshEntity() {} /**** * The entity typedefs */ typedef ConfigTag MeshConfigTag; typedef tnlMeshVertexTag Tag; typedef tnlMeshEntitySeed< ConfigTag, tnlMeshVertexTag > SeedType; typedef typename tnlMeshTraits< ConfigTag >::PointType PointType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; /*tnlMeshEntity( const SeedType & entytiSeed ) { typedef typename SeedType::LocalIndexType LocalIndexType; for( LocalIndexType i = 0; i < entytiSeed.getCornerIds().getSize(); i++ ) this->template setSubentityIndex< 0 >( i, entitySeed.getCornerIds()[ i ] ); }*/ static tnlString getType() Loading @@ -343,15 +370,6 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > return this->getType(); } /**** * The entity typedefs */ typedef ConfigTag MeshConfigTag; typedef tnlMeshVertexTag Tag; typedef tnlMeshEntitySeed< ConfigTag, tnlMeshVertexTag > SeedType; typedef typename tnlMeshTraits< ConfigTag >::PointType PointType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; /*~tnlMeshEntity() { Loading src/mesh/tnlMeshEntityInitializer.h +97 −256 File changed.Preview size limit exceeded, changes collapsed. Show changes src/mesh/tnlMeshEntitySeed.h +7 −0 Original line number Diff line number Diff line Loading @@ -71,5 +71,12 @@ class tnlMeshEntitySeed IdArrayType cornerIds; }; template< typename MeshConfig, typename EntityTopology > ostream& operator << ( ostream& str, const tnlMeshEntitySeed< MeshConfig, EntityTopology >& e ) { str << e.getCornerIds(); return str; }; #endif /* TNLMESHENTITYSEED_H */ Loading
src/mesh/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ SET( headers tnlGrid.h tnlMeshInitializer.h tnlMeshIntegrityChecker.h tnlMeshEntityInitializer.h tnlMeshSuperentityInitializerLayer.h tnlMeshSuperentityStorageInitializer.h tnlTraverser.h tnlTraverser_Grid1D.h tnlTraverser_Grid1D_impl.h Loading
src/mesh/layers/tnlMeshSubentityStorageLayer.h +9 −2 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ class tnlMeshSubentityStorageLayer< ConfigTag, typedef typename SubentityTraits::SharedContainerType SharedContainerType; typedef typename ContainerType::ElementType GlobalIndexType; typedef int LocalIndexType; typedef typename SubentityTraits::IdArrayType IdArrayType; tnlMeshSubentityStorageLayer() { Loading Loading @@ -160,8 +161,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag, return this->sharedSubentitiesIndices; } using BaseType::subentityIdsArray; IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; } private: ContainerType subentitiesIndices; IdArrayType subentitiesIndices; SharedContainerType sharedSubentitiesIndices; Loading Loading @@ -201,6 +205,7 @@ class tnlMeshSubentityStorageLayer< ConfigTag, typedef typename SubentityTraits::SharedContainerType SharedContainerType; typedef typename ContainerType::ElementType GlobalIndexType; typedef int LocalIndexType; typedef typename SubentityTraits::IdArrayType IdArrayType; tnlMeshSubentityStorageLayer() { Loading Loading @@ -275,9 +280,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag, return this->sharedVerticesIndices; } IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; } private: ContainerType verticesIndices; IdArrayType verticesIndices; SharedContainerType sharedVerticesIndices; }; Loading
src/mesh/tnlMeshEntity.h +89 −71 Original line number Diff line number Diff line Loading @@ -39,8 +39,23 @@ class tnlMeshEntity { public: // TODO: This is only because of STD lib bug in tnlIndexedSet tnlMeshEntity( const tnlMeshEntity& entyti ) {} /**** * Entity typedefs */ typedef ConfigTag MeshConfigTag; typedef EntityTag Tag; typedef tnlMeshEntitySeed< ConfigTag, EntityTag > SeedType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; tnlMeshEntity( const SeedType& entitySeed ) { typedef typename SeedType::LocalIndexType LocalIndexType; for( LocalIndexType i = 0; i < entitySeed.getCornerIds().getSize(); i++ ) this->template setSubentityIndex< 0 >( i, entitySeed.getCornerIds()[ i ] ); } tnlMeshEntity() {} static tnlString getType() Loading Loading @@ -92,16 +107,6 @@ class tnlMeshEntity typename ConfigTag::GlobalIndexType >::operator==( entity ) ); } /**** * Entity typedefs */ typedef ConfigTag MeshConfigTag; typedef EntityTag Tag; typedef tnlMeshEntitySeed< ConfigTag, EntityTag > SeedType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; /**** * Subentities */ Loading Loading @@ -309,12 +314,20 @@ class tnlMeshEntity // TODO: This is only for the mesh initializer, fix this typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityAccessBase; typedef typename tnlMeshConfigTraits< ConfigTag>::IdArrayAccessorType IdArrayAccessorType; typedef tnlMeshSubentityStorageLayers< ConfigTag, EntityTag > SubentityStorageLayers; template< typename DimensionsTag > typename tnlMeshConfigTraits< ConfigTag >::template SubentityTraits< EntityTag, DimensionsTag >::IdArrayType& subentityIdsArray() { return SubentityStorageLayers::subentityIdsArray( DimensionsTag() ); } template<typename DimensionsTag > IdArrayAccessorType& superentityIdsArray() { return SuperentityAccessBase::superentityIdsArray( DimensionsTag()); } }; template< typename ConfigTag > Loading @@ -325,9 +338,23 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > { public: // TODO: This is only because of STD lib bug in tnlIndexedSet tnlMeshEntity( const tnlMeshEntity& entyti ) {} tnlMeshEntity() {} /**** * The entity typedefs */ typedef ConfigTag MeshConfigTag; typedef tnlMeshVertexTag Tag; typedef tnlMeshEntitySeed< ConfigTag, tnlMeshVertexTag > SeedType; typedef typename tnlMeshTraits< ConfigTag >::PointType PointType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; /*tnlMeshEntity( const SeedType & entytiSeed ) { typedef typename SeedType::LocalIndexType LocalIndexType; for( LocalIndexType i = 0; i < entytiSeed.getCornerIds().getSize(); i++ ) this->template setSubentityIndex< 0 >( i, entitySeed.getCornerIds()[ i ] ); }*/ static tnlString getType() Loading @@ -343,15 +370,6 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > return this->getType(); } /**** * The entity typedefs */ typedef ConfigTag MeshConfigTag; typedef tnlMeshVertexTag Tag; typedef tnlMeshEntitySeed< ConfigTag, tnlMeshVertexTag > SeedType; typedef typename tnlMeshTraits< ConfigTag >::PointType PointType; enum { dimensions = Tag::dimensions }; enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions }; /*~tnlMeshEntity() { Loading
src/mesh/tnlMeshEntityInitializer.h +97 −256 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/mesh/tnlMeshEntitySeed.h +7 −0 Original line number Diff line number Diff line Loading @@ -71,5 +71,12 @@ class tnlMeshEntitySeed IdArrayType cornerIds; }; template< typename MeshConfig, typename EntityTopology > ostream& operator << ( ostream& str, const tnlMeshEntitySeed< MeshConfig, EntityTopology >& e ) { str << e.getCornerIds(); return str; }; #endif /* TNLMESHENTITYSEED_H */