Commit 9d1f1b3b authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed unused methods from the superentity storage layer

parent 13584878
Loading
Loading
Loading
Loading
+0 −64
Original line number Diff line number Diff line
@@ -187,30 +187,6 @@ getSubentityIndices() const
   return SubentityBaseType::getSubentityIndices( MeshDimensionsTag< Subdimensions >() );
}

template< typename MeshConfig,
          typename EntityTopology >
   template< int SuperDimensions >
typename MeshEntity< MeshConfig, EntityTopology >::template SuperentityTraits< SuperDimensions >::AccessArrayType&
MeshEntity< MeshConfig, EntityTopology >::
getSuperentityIndices()
{
   static_assert( SuperentityTraits< SuperDimension >::storageEnabled, "You try to get superentities which are not configured for storage." );
   typedef MeshSuperentityAccess< MeshConfig, EntityTopology >  SuperentityBaseType;
   return SuperentityBaseType::getSuperentityIndices( MeshDimensionsTag< SuperDimensions >() );
}

template< typename MeshConfig,
          typename EntityTopology >
   template< int SuperDimension >
const typename MeshEntity< MeshConfig, EntityTopology >::template SuperentityTraits< SuperDimension >::AccessArrayType&
MeshEntity< MeshConfig, EntityTopology >::
getSuperentityIndices() const
{
   static_assert( SuperentityTraits< SuperDimension >::storageEnabled, "You try to get superentities which are not configured for storage." );
   typedef MeshSuperentityAccess< MeshConfig, EntityTopology >  SuperentityBaseType;
   return SuperentityBaseType::getSuperentityIndices( MeshDimensionsTag< SuperDimensions >() );
}

template< typename MeshConfig,
          typename EntityTopology >
constexpr typename MeshEntity< MeshConfig, EntityTopology >::LocalIndexType
@@ -295,17 +271,6 @@ subentityIdsArray()
   return SubentityStorageLayers::subentityIdsArray( MeshDimensionsTag< Subdimensions >() );
}

template< typename MeshConfig,
          typename EntityTopology >
   template< int Superdimensions >
typename MeshEntity< MeshConfig, EntityTopology >::IdArrayAccessorType&
MeshEntity< MeshConfig, EntityTopology >::
superentityIdsArray()
{
   typedef MeshSuperentityAccess< MeshConfig, EntityTopology >            SuperentityAccessBase;
   return SuperentityAccessBase::superentityIdsArray( MeshDimensionsTag< Superdimensions >());
}

template< typename MeshConfig,
          typename EntityTopology >
   template< int Subdimensions >
@@ -394,26 +359,6 @@ getEntityDimension() const
   return EntityTopology::dimensions;
}

template< typename MeshConfig >
   template< int Superdimensions >
typename MeshEntity< MeshConfig, MeshVertexTopology >::template SuperentityTraits< Superdimensions >::AccessArrayType&
MeshEntity< MeshConfig, MeshVertexTopology >::
getSuperentityIndices()
{
   typedef MeshSuperentityAccess< MeshConfig, MeshVertexTopology >  SuperentityBaseType;
   return SuperentityBaseType::getSuperentityIndices( MeshDimensionsTag< Superdimensions >() );
}

template< typename MeshConfig >
   template< int Superdimensions >
const typename MeshEntity< MeshConfig, MeshVertexTopology >::template SuperentityTraits< Superdimensions >::AccessArrayType&
MeshEntity< MeshConfig, MeshVertexTopology >::
getSuperentityIndices() const
{
   typedef MeshSuperentityAccess< MeshConfig, MeshVertexTopology >  SuperentityBaseType;
   return SuperentityBaseType::getSuperentityIndices( MeshDimensionsTag< Superdimensions >() );
}

template< typename MeshConfig >
typename MeshEntity< MeshConfig, MeshVertexTopology >::PointType
MeshEntity< MeshConfig, MeshVertexTopology >::
@@ -430,15 +375,6 @@ setPoint( const PointType& point )
   this->point = point;
}

template< typename MeshConfig >
   template< int Superdimensions >
typename MeshEntity< MeshConfig, MeshVertexTopology >::MeshTraitsType::IdArrayAccessorType&
MeshEntity< MeshConfig, MeshVertexTopology >::
superentityIdsArray()
{
   return SuperentityAccessBase::superentityIdsArray( MeshDimensionTag< Superdimensions >());
}

template< typename MeshConfig,
          typename EntityTopology >
std::ostream& operator <<( std::ostream& str, const MeshEntity< MeshConfig, EntityTopology >& entity )
+0 −6
Original line number Diff line number Diff line
@@ -81,12 +81,6 @@ public:
      BaseType::initSubentities( entity, entityIndex, entitySeed, initializer );
   }

   template< typename SuperentityDimensionTag >
   typename MeshSuperentityTraits< MeshConfig, EntityTopology, SuperentityDimensionTag::value >::SharedContainerType& getSuperentityContainer( SuperentityDimensionTag )
   {
      return this->entity->template getSuperentityIndices< SuperentityDimensionTag::value >();
   }

   static void setEntityVertex( EntityType& entity,
                                LocalIndexType localIndex,
                                GlobalIndexType globalIndex )
+2 −16
Original line number Diff line number Diff line
@@ -102,15 +102,8 @@ class MeshInitializer
         return entity.template subentityIdsArray< SubDimensionTag::value >();
      }

      template< typename SuperDimensionTag, typename MeshEntity>
      static typename MeshTraitsType::IdArrayAccessorType&
      superentityIdsArray( MeshEntity& entity )
      {
         return entity.template superentityIdsArray< SuperDimensionTag::value >();
      }

      template<typename SubDimensionTag, typename MeshEntity >
      static typename MeshTraitsType::template SubentityTraits< typename MeshEntity::EntityTopology, SubDimensionTag::value >::OrientationArrayType&
      template<typename SubDimensionsTag, typename MeshEntity >
      static typename MeshTraitsType::template SubentityTraits< typename MeshEntity::EntityTopology, SubDimensionsTag::value >::OrientationArrayType&
      subentityOrientationsArray( MeshEntity &entity )
      {
         return entity.template subentityOrientationsArray< SubDimensionTag::value >();
@@ -123,13 +116,6 @@ class MeshInitializer
         return mesh->template entitiesArray< DimensionTag >();
      }

      template< typename DimensionTag, typename SuperDimensionTag >
      typename MeshTraitsType::GlobalIdArrayType&
      meshSuperentityIdsArray()
      {
         return mesh->template superentityIdsArray< DimensionTag, SuperDimensionTag >();
      }

      template< typename EntityTopology, typename SuperdimensionsTag >
      typename MeshTraitsType::template SuperentityTraits< EntityTopology, SuperdimensionsTag::value >::StorageNetworkType&
      meshSuperentityStorageNetwork()
+3 −25
Original line number Diff line number Diff line
@@ -95,28 +95,6 @@ class MeshSuperentityStorageInitializerLayer< MeshConfig,
            Assert( (size_t) maxEntityIndex == dynamicStorageNetwork.size() - 1,
                       std::cerr << "Superentities for some entities are missing." << std::endl; );

            // TODO: what's this supposed to do?
//            std::cout << "There are " << superentityIdsArray.getSize() << " superentities with " << DimensionsTag::value << " dimensions of enities with dimension " << EntityDimensions::value << " ... " << std::endl;
//            GlobalIdArrayType &superentityIdsArray = meshInitializer.template meshSuperentityIdsArray< EntityDimensions, DimensionsTag >();
//            superentityIdsArray.setSize( dynamicStorageNetwork.size() );
//            GlobalIndexType currentBegin = 0;
//            GlobalIndexType lastEntityIndex = 0;
//            for( GlobalIndexType i = 0; i < superentityIdsArray.getSize(); i++)
//            {
//               superentityIdsArray[ i ] = indexPairs[i].superentityIndex;
//
//               //cout << "Adding superentity " << indexPairs[i].superentityIndex << " to entity " << lastEntityIndex << std::endl;
//               if( indexPairs[ i ].entityIndex != lastEntityIndex )
//               {
//                  meshInitializer.template superentityIdsArray< DimensionsTag >( meshInitializer.template meshEntitiesArray< EntityDimensions >()[ lastEntityIndex ] ).bind( superentityIdsArray, currentBegin, i - currentBegin );
//                  currentBegin = i;
//                  lastEntityIndex = indexPairs[ i ].entityIndex;
//               }
//            }
//
//            meshInitializer.template superentityIdsArray< DimensionsTag >( meshInitializer.template meshEntitiesArray< EntityDimensions >()[ lastEntityIndex ] ).bind( superentityIdsArray, currentBegin, superentityIdsArray.getSize() - currentBegin );
//            indexPairs.clear();

            /****
             * Network initializer
             */
@@ -167,9 +145,9 @@ class MeshSuperentityStorageInitializerLayer< MeshConfig,
   using MeshInitializerType = MeshInitializer< MeshConfig >;

public:
   void addSuperentity()                           {} // This method is due to 'using BaseType::...;' in the derived classes.
   using BaseType::initSuperentities;
   void initSuperentities( MeshInitializerType& ) { std::cerr << "***" << std::endl;}
   // Necessary due to 'using BaseType::...;' in the derived classes.
   void addSuperentity() {}
   void initSuperentities( MeshInitializerType& ) {}
};

template< typename MeshConfig,
+0 −16
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ class MeshSuperentityAccessLayer< MeshConfig,
   using SuperentityTraitsType = typename MeshTraitsType::template SuperentityTraits< EntityTopology, DimensionsTag::value >;

public:
   using IdArrayAccessorType     = typename MeshTraitsType::IdArrayAccessorType;
   using GlobalIndexType         = typename SuperentityTraitsType::GlobalIndexType;
   using LocalIndexType          = typename SuperentityTraitsType::LocalIndexType;
   using StorageNetworkType      = typename SuperentityTraitsType::StorageNetworkType;
@@ -162,12 +161,6 @@ public:
      return this->superentityIndices[ localIndex ];
   }

   using BaseType::superentityIds;
   IdArrayAccessorType superentityIds( DimensionsTag ) const { return m_superentityIndices; }

   using BaseType::superentityIdsArray;
   IdArrayAccessorType &superentityIdsArray( DimensionsTag ) { return m_superentityIndices; }

   using BaseType::getSuperentityIndices;
   const SuperentityAccessorType& getSuperentityIndices( DimensionsTag ) const
   {
@@ -188,9 +181,6 @@ public:
   //bool operator == ( const MeshSuperentityAccessLayer< MeshConfig, EntityTopology, Dimensions, tnlStorageTraits< true > >& l ) { return true; } // TODO: fix

private:
   // TODO: used only in mesh initializer, should be removed
   IdArrayAccessorType m_superentityIndices;

   SuperentityAccessorType superentityIndices;
};

@@ -236,9 +226,6 @@ protected:
                             const LocalIndexType& localIndex,
                             const GlobalIndexType& globalIndex ) {}

   void superentityIds()      {}
   void superentityIdsArray() {}

   void getSuperentityIndices() {}

   void print( std::ostream& str ) const {}
@@ -275,9 +262,6 @@ protected:
                             const LocalIndexType& localIndex,
                             const GlobalIndexType& globalIndex ) {}

   void superentityIds()      {}
   void superentityIdsArray() {}

   void getSuperentityIndices() {}

   void print( std::ostream& str ) const {}
Loading