Commit c25535d2 authored by Ján Bobot's avatar Ján Bobot Committed by Jakub Klinkovský
Browse files

Mesh: Refactoring and fix for wrong declaration

parent 2eb885b1
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -170,26 +170,6 @@ struct EntitySeedHash
      using LocalIndexType = typename EntitySeed::LocalIndexType;
      using GlobalIndexType = typename EntitySeed::GlobalIndexType;

      // Note that we must use an associative function to combine the hashes,
      // because we *want* to ignore the order of the corner IDs.
      std::size_t hash = 0;
      for( LocalIndexType i = 0; i < EntitySeed::getCornersCount(); i++ )
//         hash ^= std::hash< GlobalIndexType >{}( seed.getCornerIds()[ i ] );
         hash += std::hash< GlobalIndexType >{}( seed.getCornerIds()[ i ] );
      return hash;
   }
};

template< typename MeshConfig >
struct EntitySeedHash< EntitySeed< MeshConfig, Topologies::Polygon > >
{
   using Seed = EntitySeed< MeshConfig, Topologies::Polygon >;

   std::size_t operator()( const Seed& seed ) const
   {
      using LocalIndexType = typename Seed::LocalIndexType;
      using GlobalIndexType = typename Seed::GlobalIndexType;

      // Note that we must use an associative function to combine the hashes,
      // because we *want* to ignore the order of the corner IDs.
      std::size_t hash = 0;
+0 −2
Original line number Diff line number Diff line
@@ -89,8 +89,6 @@ public:
   setSubentitiesCounts( const typename MeshTraitsType::NeighborCountsArray& counts )
   {
      static_assert( Dimension > Subdimension, "Invalid combination of Dimension and Subdimension." );
      static_assert( SubentityTraits< Dimension, Subdimension >::storageEnabled,
                     "You try to set subentitiesCounts for subentities which are disabled in the mesh configuration." );
      using BaseType = SubentityStorageLayerFamily< MeshConfig,
                                                    Device,
                                                    typename EntityTraits< Dimension >::EntityTopology >;
+1 −1
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ protected:
   void save( File& file ) const {}
   void load( File& file ) {}

   void setSubentitiesCounts( SubdimensionTag, const typename MeshTraitsType::NeighborCountsArray& );
   void setSubentitiesCounts( SubdimensionTag, const typename MeshTraitsType::NeighborCountsArray& ) {}
   void getSubentitiesCount( SubdimensionTag ) {}
   void getSubentitiesMatrix( SubdimensionTag ) {}
};