Skip to content
Snippets Groups Projects
Commit e18cb1c7 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Clened up MeshEntityInitializer

parent 9abb3a63
No related branches found
No related tags found
No related merge requests found
...@@ -49,9 +49,6 @@ class MeshEntityInitializer ...@@ -49,9 +49,6 @@ class MeshEntityInitializer
using BaseType = MeshEntityInitializerLayer< MeshConfig, using BaseType = MeshEntityInitializerLayer< MeshConfig,
EntityTopology, EntityTopology,
MeshDimensionsTag< EntityTopology::dimensions - 1 > >; MeshDimensionsTag< EntityTopology::dimensions - 1 > >;
using SubentityBaseType = MeshEntityInitializerLayer< MeshConfig,
EntityTopology,
MeshDimensionsTag< EntityTopology::dimensions - 1 > >;
using SuperentityBaseType = MeshSuperentityStorageInitializerLayer< MeshConfig, using SuperentityBaseType = MeshSuperentityStorageInitializerLayer< MeshConfig,
EntityTopology, EntityTopology,
typename MeshTraits< MeshConfig >::DimensionsTag >; typename MeshTraits< MeshConfig >::DimensionsTag >;
...@@ -60,9 +57,7 @@ class MeshEntityInitializer ...@@ -60,9 +57,7 @@ class MeshEntityInitializer
using GlobalIndexType = typename MeshTraitsType::GlobalIndexType; using GlobalIndexType = typename MeshTraitsType::GlobalIndexType;
using LocalIndexType = typename MeshTraitsType::LocalIndexType; using LocalIndexType = typename MeshTraitsType::LocalIndexType;
using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionsTag::value >; using EntityTraitsType = typename MeshTraitsType::template EntityTraits< DimensionsTag::value >;
using EntityType = typename EntityTraitsType::EntityType; using EntityType = typename EntityTraitsType::EntityType;
using SubvertexTraits = typename MeshTraitsType::template SubentityTraits< EntityTopology, 0 >;
using InitializerType = MeshInitializer< MeshConfig >; using InitializerType = MeshInitializer< MeshConfig >;
using SeedType = MeshEntitySeed< MeshConfig, EntityTopology >; using SeedType = MeshEntitySeed< MeshConfig, EntityTopology >;
...@@ -70,25 +65,12 @@ class MeshEntityInitializer ...@@ -70,25 +65,12 @@ class MeshEntityInitializer
public: public:
static String getType() { return "MeshEntityInitializer"; }; static String getType() { return "MeshEntityInitializer"; };
MeshEntityInitializer() : entity(0), entityIndex( -1 ) {}
static void initEntity( EntityType& entity, GlobalIndexType entityIndex, const SeedType& entitySeed, InitializerType& initializer) static void initEntity( EntityType& entity, GlobalIndexType entityIndex, const SeedType& entitySeed, InitializerType& initializer)
{ {
for( LocalIndexType i = 0; i < entitySeed.getCornerIds().getSize(); i++ ) for( LocalIndexType i = 0; i < entitySeed.getCornerIds().getSize(); i++ )
initializer.template setSubentityIndex< 0 >( entity, entityIndex, i, entitySeed.getCornerIds()[ i ] ); initializer.template setSubentityIndex< 0 >( entity, entityIndex, i, entitySeed.getCornerIds()[ i ] );
BaseType::initSubentities( entity, entityIndex, entitySeed, initializer ); BaseType::initSubentities( entity, entityIndex, entitySeed, initializer );
} }
static void setEntityVertex( EntityType& entity,
LocalIndexType localIndex,
GlobalIndexType globalIndex )
{
entity.setVertexIndex( localIndex, globalIndex );
}
private:
EntityType *entity;
GlobalIndexType entityIndex;
}; };
template< typename MeshConfig > template< typename MeshConfig >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment