Loading src/mesh/initializer/tnlMeshEntityInitializer.h +9 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include <mesh/initializer/tnlMeshSuperentityStorageInitializer.h> #include <mesh/initializer/tnlMeshSubentitySeedCreator.h> #include "tnlMeshEntitySeed.h" template< typename MeshConfig > class tnlMeshInitializer; Loading Loading @@ -452,7 +454,13 @@ class tnlMeshEntityInitializerLayer< MeshConfig, protected: static void initSubentities( EntityType& entity, GlobalIndexType entityIndex, const SeedType& entitySeed, InitializerType& meshInitializer ) {}; InitializerType& meshInitializer ) { //cout << " Initiating subentities with " << DimensionsTag::value << " dimensions ... " << endl; const IdArrayType &subentityIdsArray = InitializerType::template subentityIdsArray< DimensionsTag >(entity); for( LocalIndexType i = 0; i < subentityIdsArray.getSize(); i++ ) meshInitializer.template getSuperentityInitializer< DimensionsTag >().addSuperentity( EntityDimensionsTag(), subentityIdsArray[ i ], entityIndex); } }; Loading src/mesh/initializer/tnlMeshSuperentityStorageInitializer.h +11 −4 Original line number Diff line number Diff line Loading @@ -53,10 +53,11 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, typedef tnlDimensionsTag< EntityTopology::dimensions > EntityDimensions; typedef typename tnlMeshTraits< MeshConfig >::GlobalIdArrayType GlobalIdArrayType; typedef tnlMeshTraits< MeshConfig > MeshTraits; typedef typename MeshTraits::GlobalIdArrayType GlobalIdArrayType; typedef typename tnlMeshTraits< MeshConfig >::GlobalIndexType GlobalIndexType; typedef typename MeshTraits::GlobalIndexType GlobalIndexType; typedef tnlMeshInitializer< MeshConfig > MeshInitializer; public: Loading @@ -64,6 +65,7 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, void addSuperentity( DimensionsTag, GlobalIndexType entityIndex, GlobalIndexType superentityIndex) { //cout << "Adding superentity with " << DimensionsTag::value << " dimensions of enity with " << EntityDimensions::value << " ... " << endl; indexPairs.push_back( IndexPair{ entityIndex, superentityIndex } ); } Loading @@ -78,7 +80,7 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, superentityIdsArray.setSize( static_cast< GlobalIndexType >( indexPairs.size() ) ); GlobalIndexType currentBegin = 0; GlobalIndexType lastEntityIndex = 0; //cout << "There are " << superentityIdsArray.getSize() << " superentities..." << endl; cout << "There are " << superentityIdsArray.getSize() << " superentities with " << DimensionsTag::value << " dimensions of enities with " << EntityDimensions::value << " ... " << endl; for( GlobalIndexType i = 0; i < superentityIdsArray.getSize(); i++) { superentityIdsArray[ i ] = indexPairs[i].superentityIndex; Loading @@ -95,6 +97,11 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, meshInitializer.template superentityIdsArray< DimensionsTag >( meshInitializer.template meshEntitiesArray< EntityDimensions >()[ lastEntityIndex ] ).bind( superentityIdsArray, currentBegin, superentityIdsArray.getSize() - currentBegin ); indexPairs.clear(); /**** * Network initializer */ BaseType::initSuperentities( meshInitializer ); } Loading src/mesh/layers/tnlMeshStorageLayer.h +4 −2 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ class tnlMeshStorageLayer< MeshConfig, entities[ i ].print( str ); str << endl; } SuperentityStorageBaseType::print( str ); } bool operator==( const tnlMeshStorageLayer& meshLayer ) const Loading Loading @@ -286,6 +287,7 @@ class tnlMeshStorageLayer< MeshConfig, tnlDimensionsTag< 0 >, true > : { str << i << vertices[ i ] << endl; } SuperentityStorageBaseType::print( str ); } bool operator==( const tnlMeshStorageLayer& meshLayer ) const Loading src/mesh/layers/tnlMeshSubentityStorageLayer.h +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ class tnlMeshSubentityStorageLayer< MeshConfig, this->verticesIndices[ localIndex ] = globalIndex; } IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; } IdArrayType& subentityIdsArray( DimensionsTag ) { return this->verticesIndices; } protected: Loading src/mesh/layers/tnlMeshSuperentityAccess.h +3 −3 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ class tnlMeshSuperentityAccess : tnlDimensionsTag< tnlMeshTraits< MeshConfig >::meshDimensions > > { public: bool operator == ( const tnlMeshSuperentityAccess< MeshConfig, MeshEntity>& a ) const { return true; } // TODO: fix void print( ostream& str ) const{}; Loading @@ -57,11 +58,10 @@ class tnlMeshSuperentityAccessLayer< MeshConfig, public: typedef tnlMeshTraits< MeshConfig > MeshTraits; typedef typename MeshTraits::template SuperentityTraits< MeshEntity, Dimensions > SuperentityTraits; typedef typename MeshTraits::template SuperentityTraits< MeshEntity, Dimensions::value > SuperentityTraits; typedef typename SuperentityTraits::SuperentityAccessorType SuperentityAccessorType; typedef typename tnlMeshTraits< MeshConfig >::IdArrayAccessorType IdArrayAccessorType; using BaseType::superentityIds; IdArrayAccessorType superentityIds( Dimensions ) const { return m_superentityIndices; } Loading Loading
src/mesh/initializer/tnlMeshEntityInitializer.h +9 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include <mesh/initializer/tnlMeshSuperentityStorageInitializer.h> #include <mesh/initializer/tnlMeshSubentitySeedCreator.h> #include "tnlMeshEntitySeed.h" template< typename MeshConfig > class tnlMeshInitializer; Loading Loading @@ -452,7 +454,13 @@ class tnlMeshEntityInitializerLayer< MeshConfig, protected: static void initSubentities( EntityType& entity, GlobalIndexType entityIndex, const SeedType& entitySeed, InitializerType& meshInitializer ) {}; InitializerType& meshInitializer ) { //cout << " Initiating subentities with " << DimensionsTag::value << " dimensions ... " << endl; const IdArrayType &subentityIdsArray = InitializerType::template subentityIdsArray< DimensionsTag >(entity); for( LocalIndexType i = 0; i < subentityIdsArray.getSize(); i++ ) meshInitializer.template getSuperentityInitializer< DimensionsTag >().addSuperentity( EntityDimensionsTag(), subentityIdsArray[ i ], entityIndex); } }; Loading
src/mesh/initializer/tnlMeshSuperentityStorageInitializer.h +11 −4 Original line number Diff line number Diff line Loading @@ -53,10 +53,11 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, typedef tnlDimensionsTag< EntityTopology::dimensions > EntityDimensions; typedef typename tnlMeshTraits< MeshConfig >::GlobalIdArrayType GlobalIdArrayType; typedef tnlMeshTraits< MeshConfig > MeshTraits; typedef typename MeshTraits::GlobalIdArrayType GlobalIdArrayType; typedef typename tnlMeshTraits< MeshConfig >::GlobalIndexType GlobalIndexType; typedef typename MeshTraits::GlobalIndexType GlobalIndexType; typedef tnlMeshInitializer< MeshConfig > MeshInitializer; public: Loading @@ -64,6 +65,7 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, void addSuperentity( DimensionsTag, GlobalIndexType entityIndex, GlobalIndexType superentityIndex) { //cout << "Adding superentity with " << DimensionsTag::value << " dimensions of enity with " << EntityDimensions::value << " ... " << endl; indexPairs.push_back( IndexPair{ entityIndex, superentityIndex } ); } Loading @@ -78,7 +80,7 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, superentityIdsArray.setSize( static_cast< GlobalIndexType >( indexPairs.size() ) ); GlobalIndexType currentBegin = 0; GlobalIndexType lastEntityIndex = 0; //cout << "There are " << superentityIdsArray.getSize() << " superentities..." << endl; cout << "There are " << superentityIdsArray.getSize() << " superentities with " << DimensionsTag::value << " dimensions of enities with " << EntityDimensions::value << " ... " << endl; for( GlobalIndexType i = 0; i < superentityIdsArray.getSize(); i++) { superentityIdsArray[ i ] = indexPairs[i].superentityIndex; Loading @@ -95,6 +97,11 @@ class tnlMeshSuperentityStorageInitializerLayer< MeshConfig, meshInitializer.template superentityIdsArray< DimensionsTag >( meshInitializer.template meshEntitiesArray< EntityDimensions >()[ lastEntityIndex ] ).bind( superentityIdsArray, currentBegin, superentityIdsArray.getSize() - currentBegin ); indexPairs.clear(); /**** * Network initializer */ BaseType::initSuperentities( meshInitializer ); } Loading
src/mesh/layers/tnlMeshStorageLayer.h +4 −2 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ class tnlMeshStorageLayer< MeshConfig, entities[ i ].print( str ); str << endl; } SuperentityStorageBaseType::print( str ); } bool operator==( const tnlMeshStorageLayer& meshLayer ) const Loading Loading @@ -286,6 +287,7 @@ class tnlMeshStorageLayer< MeshConfig, tnlDimensionsTag< 0 >, true > : { str << i << vertices[ i ] << endl; } SuperentityStorageBaseType::print( str ); } bool operator==( const tnlMeshStorageLayer& meshLayer ) const Loading
src/mesh/layers/tnlMeshSubentityStorageLayer.h +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ class tnlMeshSubentityStorageLayer< MeshConfig, this->verticesIndices[ localIndex ] = globalIndex; } IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; } IdArrayType& subentityIdsArray( DimensionsTag ) { return this->verticesIndices; } protected: Loading
src/mesh/layers/tnlMeshSuperentityAccess.h +3 −3 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ class tnlMeshSuperentityAccess : tnlDimensionsTag< tnlMeshTraits< MeshConfig >::meshDimensions > > { public: bool operator == ( const tnlMeshSuperentityAccess< MeshConfig, MeshEntity>& a ) const { return true; } // TODO: fix void print( ostream& str ) const{}; Loading @@ -57,11 +58,10 @@ class tnlMeshSuperentityAccessLayer< MeshConfig, public: typedef tnlMeshTraits< MeshConfig > MeshTraits; typedef typename MeshTraits::template SuperentityTraits< MeshEntity, Dimensions > SuperentityTraits; typedef typename MeshTraits::template SuperentityTraits< MeshEntity, Dimensions::value > SuperentityTraits; typedef typename SuperentityTraits::SuperentityAccessorType SuperentityAccessorType; typedef typename tnlMeshTraits< MeshConfig >::IdArrayAccessorType IdArrayAccessorType; using BaseType::superentityIds; IdArrayAccessorType superentityIds( Dimensions ) const { return m_superentityIndices; } Loading