Skip to content
Snippets Groups Projects
Commit ec5abd62 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Implementing superentity initializer.

parent e77c8bf5
No related branches found
No related tags found
No related merge requests found
TODO: Mesh TODO: Mesh
* vsechny traits zkusit presunout do jednotneho MeshTraits, tj. temer MeshConfigTraits ale pojmenovat jako MeshTraits * vsechny traits zkusit presunout do jednotneho MeshTraits, tj. temer MeshConfigTraits ale pojmenovat jako MeshTraits
* zrusit tnlDimesnionsTag * omezit tnlDimesnionsTag - asi to ale nepujde
- ale pozor na konstrukce jako BaseType::superentityIdsArray< SuperDimensionTag >( DimensionsTag ); ( v tnlMesh.h)
* prejmenovat Tagy v topologies na Topology zrejme * prejmenovat Tagy v topologies na Topology zrejme
* zrusit tnlStorageTraits * zrusit tnlStorageTraits
......
...@@ -54,7 +54,8 @@ struct tnlMeshConfigBase ...@@ -54,7 +54,8 @@ struct tnlMeshConfigBase
/**** /****
* Vertices and cells must always be stored * Vertices and cells must always be stored
*/ */
return ( dimensions == 0 || dimensions == cellDimensions ); return true;
//return ( dimensions == 0 || dimensions == cellDimensions );
} }
/**** /****
...@@ -66,7 +67,8 @@ struct tnlMeshConfigBase ...@@ -66,7 +67,8 @@ struct tnlMeshConfigBase
/**** /****
* Vertices must always be stored * Vertices must always be stored
*/ */
return ( SubentityDimensions == 0 ); return true;
//return ( SubentityDimensions == 0 );
} }
/**** /****
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
#include <mesh/traits/tnlMeshTraits.h> #include <mesh/traits/tnlMeshTraits.h>
#include <mesh/traits/tnlMeshEntitiesTraits.h> #include <mesh/traits/tnlMeshEntitiesTraits.h>
#include <mesh/traits/tnlStorageTraits.h> #include <mesh/traits/tnlStorageTraits.h>
#include <mesh/traits/tnlMeshConfigTraits.h>
template< typename MeshConfig >
class tnlMesh;
template< typename DimensionsTag, template< typename DimensionsTag,
typename Device, typename Device,
...@@ -41,7 +45,8 @@ template< typename ConfigTag > ...@@ -41,7 +45,8 @@ template< typename ConfigTag >
class tnlMeshStorageLayers class tnlMeshStorageLayers
: public tnlMeshStorageLayer< ConfigTag, : public tnlMeshStorageLayer< ConfigTag,
typename tnlMeshTraits< ConfigTag >::DimensionsTag > typename tnlMeshTraits< ConfigTag >::DimensionsTag >
{}; {
};
template< typename ConfigTag, template< typename ConfigTag,
...@@ -49,18 +54,23 @@ template< typename ConfigTag, ...@@ -49,18 +54,23 @@ template< typename ConfigTag,
class tnlMeshStorageLayer< ConfigTag, class tnlMeshStorageLayer< ConfigTag,
DimensionsTag, DimensionsTag,
tnlStorageTraits< true > > tnlStorageTraits< true > >
: public tnlMeshStorageLayer< ConfigTag, typename DimensionsTag::Decrement > : public tnlMeshStorageLayer< ConfigTag, typename DimensionsTag::Decrement >,
public tnlMeshSuperentityStorageLayers< ConfigTag,
typename tnlMeshConfigTraits< ConfigTag >::template EntityTraits< DimensionsTag >::Tag >
{ {
public:
typedef tnlMeshStorageLayer< ConfigTag, typedef tnlMeshStorageLayer< ConfigTag,
typename DimensionsTag::Decrement > BaseType; typename DimensionsTag::Decrement > BaseType;
typedef tnlMeshSuperentityStorageLayers< ConfigTag,
typename tnlMeshConfigTraits< ConfigTag >::template EntityTraits< DimensionsTag >::Tag > SuperentityStorageBaseType;
typedef tnlMeshEntitiesTraits< ConfigTag, DimensionsTag > Tag; typedef tnlMeshEntitiesTraits< ConfigTag, DimensionsTag > Tag;
typedef typename Tag::ContainerType ContainerType; typedef typename Tag::ContainerType ContainerType;
typedef typename Tag::SharedContainerType SharedContainerType; typedef typename Tag::SharedContainerType SharedContainerType;
typedef typename ContainerType::IndexType GlobalIndexType; typedef typename ContainerType::IndexType GlobalIndexType;
typedef typename ContainerType::ElementType EntityType; typedef typename ContainerType::ElementType EntityType;
protected:
using BaseType::setNumberOfEntities; using BaseType::setNumberOfEntities;
using BaseType::getNumberOfEntities; using BaseType::getNumberOfEntities;
...@@ -164,9 +174,27 @@ class tnlMeshStorageLayer< ConfigTag, ...@@ -164,9 +174,27 @@ class tnlMeshStorageLayer< ConfigTag,
protected: protected:
ContainerType entities; ContainerType entities;
SharedContainerType sharedEntities; SharedContainerType sharedEntities;
// TODO: this is only for the mesh initializer - fix it
public:
using BaseType::entitiesArray;
typename tnlMeshConfigTraits< ConfigTag >::template EntityTraits< DimensionsTag >::ContainerType& entitiesArray( DimensionsTag )
{
return entities;
}
using BaseType::superentityIdsArray;
template< typename SuperDimensionsTag >
typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType& superentityIdsArray( DimensionsTag )
{
return SuperentityStorageBaseType::superentityIdsArray( SuperDimensionsTag() );
}
}; };
template< typename ConfigTag, template< typename ConfigTag,
...@@ -182,9 +210,18 @@ class tnlMeshStorageLayer< ConfigTag, ...@@ -182,9 +210,18 @@ class tnlMeshStorageLayer< ConfigTag,
template< typename ConfigTag > template< typename ConfigTag >
class tnlMeshStorageLayer< ConfigTag, class tnlMeshStorageLayer< ConfigTag,
tnlDimensionsTag< 0 >, tnlDimensionsTag< 0 >,
tnlStorageTraits< true > > tnlStorageTraits< true > > :
public tnlMeshSuperentityStorageLayers< ConfigTag,
tnlMeshVertexTag >
{ {
public:
typedef tnlDimensionsTag< 0 > DimensionsTag; typedef tnlDimensionsTag< 0 > DimensionsTag;
typedef tnlMeshSuperentityStorageLayers< ConfigTag,
tnlMeshVertexTag > SuperentityStorageBaseType;
typedef tnlMeshEntitiesTraits< ConfigTag, typedef tnlMeshEntitiesTraits< ConfigTag,
DimensionsTag > Tag; DimensionsTag > Tag;
...@@ -194,7 +231,6 @@ class tnlMeshStorageLayer< ConfigTag, ...@@ -194,7 +231,6 @@ class tnlMeshStorageLayer< ConfigTag,
typedef typename ContainerType::ElementType VertexType; typedef typename ContainerType::ElementType VertexType;
typedef typename VertexType::PointType PointType; typedef typename VertexType::PointType PointType;
protected:
tnlMeshStorageLayer() tnlMeshStorageLayer()
{ {
...@@ -329,6 +365,22 @@ class tnlMeshStorageLayer< ConfigTag, ...@@ -329,6 +365,22 @@ class tnlMeshStorageLayer< ConfigTag,
ContainerType vertices; ContainerType vertices;
SharedContainerType sharedVertices; SharedContainerType sharedVertices;
// TODO: this is only for the mesh initializer - fix it
public:
typename tnlMeshConfigTraits< ConfigTag >::template EntityTraits< DimensionsTag >::ContainerType& entitiesArray( DimensionsTag )
{
return vertices;
}
template< typename SuperDimensionsTag >
typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType& superentityIdsArray( DimensionsTag )
{
return SuperentityStorageBaseType::superentityIdsArray( SuperDimensionsTag() );
}
}; };
/**** /****
...@@ -341,7 +393,7 @@ class tnlMeshStorageLayer< ConfigTag, ...@@ -341,7 +393,7 @@ class tnlMeshStorageLayer< ConfigTag,
{ {
protected: protected:
void setNumberOfEntities(); void setNumberOfEntities();
}; };
......
/***************************************************************************
tnlMeshSuperentityAccess.h - description
-------------------
begin : Aug 15, 2015
copyright : (C) 2015 by Tomas Oberhuber et al.
email : tomas.oberhuber@fjfi.cvut.cz
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef TNLSUPERENTITYACCESS_H
#define TNLSUPERENTITYACCESS_H
#include <mesh/traits/tnlStorageTraits.h>
#include <mesh/traits/tnlMeshConfigTraits.h>
template< typename MeshConfig,
typename MeshEntity,
typename Dimensions,
typename SuperentityStorage =
tnlStorageTraits< tnlMeshConfigTraits< MeshConfig >::template SuperentityTraits< MeshEntity, Dimensions>::storageEnabled > >
class tnlMeshSuperentityAccessLayer;
template< typename MeshConfig,
typename MeshEntity >
class tnlMeshSuperentityAccess :
public tnlMeshSuperentityAccessLayer< MeshConfig,
MeshEntity,
tnlDimensionsTag< tnlMeshConfigTraits< MeshConfig >::meshDimensions > >
{
public:
bool operator == ( const tnlMeshSuperentityAccess< MeshConfig, MeshEntity>& a ) const { return true; } // TODO: fix
void print( ostream& str ) const{};
};
template< typename MeshConfig,
typename MeshEntity,
typename Dimensions >
class tnlMeshSuperentityAccessLayer< MeshConfig,
MeshEntity,
Dimensions,
tnlStorageTraits< true > > :
public tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, typename Dimensions::Decrement >
{
typedef tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, typename Dimensions::Decrement > BaseType;
public:
typedef typename tnlMeshConfigTraits< MeshConfig >::IdArrayAccessorType IdArrayAccessorType;
using BaseType::superentityIds;
IdArrayAccessorType superentityIds( Dimensions ) const { return m_superentityIndices; }
using BaseType::superentityIdsArray;
IdArrayAccessorType &superentityIdsArray( Dimensions ) { return m_superentityIndices; }
//bool operator == ( const tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, Dimensions, tnlStorageTraits< true > >& l ) { return true; } // TODO: fix
private:
IdArrayAccessorType m_superentityIndices;
};
template< typename MeshConfig,
typename MeshEntity,
typename Dimensions >
class tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, Dimensions, tnlStorageTraits< false > > :
public tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, typename Dimensions::Decrement >
{
};
template< typename MeshConfig,
typename MeshEntity >
class tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, tnlDimensionsTag< MeshEntity::dimensions >, tnlStorageTraits< false > >
{
protected:
/***
* Necessary because of 'using TBase::...;' in the derived classes
*/
void superentityIds() {}
void superentityIdsArray() {}
};
template< typename MeshConfig,
typename MeshEntity >
class tnlMeshSuperentityAccessLayer< MeshConfig, MeshEntity, tnlDimensionsTag< MeshEntity::dimensions >, tnlStorageTraits< true > >
{
protected:
/***
* Necessary because of 'using TBase::...;' in the derived classes
*/
void superentityIds() {}
void superentityIdsArray() {}
};
#endif /* TNLSUPERENTITYACCESS_H */
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <mesh/tnlDimensionsTag.h> #include <mesh/tnlDimensionsTag.h>
#include <mesh/traits/tnlStorageTraits.h> #include <mesh/traits/tnlStorageTraits.h>
#include <mesh/traits/tnlMeshTraits.h> #include <mesh/traits/tnlMeshTraits.h>
#include <mesh/traits/tnlMeshConfigTraits.h>
#include <mesh/traits/tnlMeshSuperentitiesTraits.h> #include <mesh/traits/tnlMeshSuperentitiesTraits.h>
template< typename ConfigTag, template< typename ConfigTag,
...@@ -173,11 +174,20 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, ...@@ -173,11 +174,20 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,
superentitiesIndices == layer.superentitiesIndices ); superentitiesIndices == layer.superentitiesIndices );
} }
private: private:
ContainerType superentitiesIndices; ContainerType superentitiesIndices;
SharedContainerType sharedSuperentitiesIndices; SharedContainerType sharedSuperentitiesIndices;
// TODO: this is only for the mesh initializer - fix it
public:
using BaseType::superentityIdsArray;
typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType& superentityIdsArray( DimensionsTag )
{
return this->superentitiesIndices;
}
}; };
template< typename ConfigTag, template< typename ConfigTag,
...@@ -251,7 +261,13 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, ...@@ -251,7 +261,13 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,
{ {
return true; return true;
} }
template< typename SuperDimensionsTag >
typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType& superentityIdsArray( DimensionsTag )
{
tnlAssert( false, );
//return this->superentitiesIndices;
}
}; };
template< typename ConfigTag, template< typename ConfigTag,
...@@ -309,6 +325,14 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, ...@@ -309,6 +325,14 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,
{ {
return true; return true;
} }
template< typename SuperDimensionsTag >
typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType& superentityIdsArray( DimensionsTag )
{
tnlAssert( false, );
//return this->superentitiesIndices;
}
}; };
#endif /* TNLMESHSUPERENTITYSTORAGELAYER_H_ */ #endif /* TNLMESHSUPERENTITYSTORAGELAYER_H_ */
...@@ -27,8 +27,6 @@ template< typename MeshConfig > ...@@ -27,8 +27,6 @@ template< typename MeshConfig >
class tnlMesh : public tnlObject, class tnlMesh : public tnlObject,
public tnlMeshStorageLayers< MeshConfig > public tnlMeshStorageLayers< MeshConfig >
{ {
typedef tnlMeshStorageLayers< MeshConfig > BaseType;
public: public:
typedef MeshConfig Config; typedef MeshConfig Config;
typedef typename tnlMeshTraits< MeshConfig >::PointType PointType; typedef typename tnlMeshTraits< MeshConfig >::PointType PointType;
...@@ -55,7 +53,7 @@ class tnlMesh : public tnlObject, ...@@ -55,7 +53,7 @@ class tnlMesh : public tnlObject,
bool save( tnlFile& file ) const bool save( tnlFile& file ) const
{ {
if( ! tnlObject::save( file ) || if( ! tnlObject::save( file ) ||
! BaseType::save( file ) ) ! entitiesStorage.save( file ) )
{ {
cerr << "Mesh saving failed." << endl; cerr << "Mesh saving failed." << endl;
return false; return false;
...@@ -66,7 +64,7 @@ class tnlMesh : public tnlObject, ...@@ -66,7 +64,7 @@ class tnlMesh : public tnlObject,
bool load( tnlFile& file ) bool load( tnlFile& file )
{ {
if( ! tnlObject::load( file ) || if( ! tnlObject::load( file ) ||
! BaseType::load( file ) ) ! entitiesStorage.load( file ) )
{ {
cerr << "Mesh loading failed." << endl; cerr << "Mesh loading failed." << endl;
return false; return false;
...@@ -88,10 +86,10 @@ class tnlMesh : public tnlObject, ...@@ -88,10 +86,10 @@ class tnlMesh : public tnlObject,
}; };
typedef EntitiesTraits< dimensions > CellTraits; typedef EntitiesTraits< dimensions > CellTraits;
using BaseType::setNumberOfVertices; /*using BaseType::setNumberOfVertices;
using BaseType::getNumberOfVertices; using BaseType::getNumberOfVertices;
using BaseType::setVertex; using BaseType::setVertex;
using BaseType::getVertex; using BaseType::getVertex;*/
template< int Dimensions > template< int Dimensions >
bool entitiesAvalable() const bool entitiesAvalable() const
...@@ -102,91 +100,107 @@ class tnlMesh : public tnlObject, ...@@ -102,91 +100,107 @@ class tnlMesh : public tnlObject,
template< int Dimensions > template< int Dimensions >
bool setNumberOfEntities( typename EntitiesTraits< Dimensions >::GlobalIndexType size ) bool setNumberOfEntities( typename EntitiesTraits< Dimensions >::GlobalIndexType size )
{ {
return BaseType::setNumberOfEntities( tnlDimensionsTag< Dimensions >(), size ); return entitiesStorage.setNumberOfEntities( tnlDimensionsTag< Dimensions >(), size );
} }
template< int Dimensions > template< int Dimensions >
typename EntitiesTraits< Dimensions >::GlobalIndexType getNumberOfEntities() const typename EntitiesTraits< Dimensions >::GlobalIndexType getNumberOfEntities() const
{ {
return BaseType::getNumberOfEntities( tnlDimensionsTag< Dimensions >() ); return entitiesStorage.getNumberOfEntities( tnlDimensionsTag< Dimensions >() );
} }
bool setNumberOfCells( typename EntitiesTraits< dimensions >::GlobalIndexType size ) bool setNumberOfCells( typename EntitiesTraits< dimensions >::GlobalIndexType size )
{ {
return BaseType::setNumberOfEntities( tnlDimensionsTag< dimensions >(), size ); return entitiesStorage.setNumberOfEntities( tnlDimensionsTag< dimensions >(), size );
} }
typename EntitiesTraits< dimensions >::GlobalIndexType getNumberOfCells() const typename EntitiesTraits< dimensions >::GlobalIndexType getNumberOfCells() const
{ {
return BaseType::getNumberOfEntities( tnlDimensionsTag< dimensions >() ); return entitiesStorage.getNumberOfEntities( tnlDimensionsTag< dimensions >() );
} }
template< int Dimensions > template< int Dimensions >
typename EntitiesTraits< Dimensions >::EntityType& typename EntitiesTraits< Dimensions >::EntityType&
getEntity( const typename EntitiesTraits< Dimensions >::GlobalIndexType entityIndex ) getEntity( const typename EntitiesTraits< Dimensions >::GlobalIndexType entityIndex )
{ {
return BaseType::getEntity( tnlDimensionsTag< Dimensions >(), entityIndex ); return entitiesStorage.getEntity( tnlDimensionsTag< Dimensions >(), entityIndex );
} }
template< int Dimensions > template< int Dimensions >
const typename EntitiesTraits< Dimensions >::EntityType& const typename EntitiesTraits< Dimensions >::EntityType&
getEntity( const typename EntitiesTraits< Dimensions >::GlobalIndexType entityIndex ) const getEntity( const typename EntitiesTraits< Dimensions >::GlobalIndexType entityIndex ) const
{ {
return BaseType::getEntity( tnlDimensionsTag< Dimensions >(), entityIndex ); return entitiesStorage.getEntity( tnlDimensionsTag< Dimensions >(), entityIndex );
} }
template< int Dimensions > template< int Dimensions >
void setEntity( const typename EntitiesTraits< Dimensions >::GlobalIndexType entityIndex, void setEntity( const typename EntitiesTraits< Dimensions >::GlobalIndexType entityIndex,
const typename EntitiesTraits< Dimensions >::EntityType& entity ) const typename EntitiesTraits< Dimensions >::EntityType& entity )
{ {
BaseType::setEntity( tnlDimensionsTag< Dimensions >(), entityIndex, entity ); entitiesStorage.setEntity( tnlDimensionsTag< Dimensions >(), entityIndex, entity );
} }
template< int Dimensions > template< int Dimensions >
typename EntitiesTraits< Dimensions >::SharedContainerType& getEntities() typename EntitiesTraits< Dimensions >::SharedContainerType& getEntities()
{ {
return BaseType::getEntities( tnlDimensionsTag< Dimensions >() ); return entitiesStorage.getEntities( tnlDimensionsTag< Dimensions >() );
} }
template< int Dimensions > template< int Dimensions >
const typename EntitiesTraits< Dimensions >::SharedContainerType& getEntities() const const typename EntitiesTraits< Dimensions >::SharedContainerType& getEntities() const
{ {
return BaseType::getEntities( tnlDimensionsTag< Dimensions >() ); return entitiesStorage.getEntities( tnlDimensionsTag< Dimensions >() );
} }
typename EntitiesTraits< dimensions >::EntityType& typename EntitiesTraits< dimensions >::EntityType&
getCell( const typename EntitiesTraits< dimensions >::GlobalIndexType entityIndex ) getCell( const typename EntitiesTraits< dimensions >::GlobalIndexType entityIndex )
{ {
return BaseType::getEntity( tnlDimensionsTag< dimensions >(), entityIndex ); return entitiesStorage.getEntity( tnlDimensionsTag< dimensions >(), entityIndex );
} }
const typename EntitiesTraits< dimensions >::EntityType& const typename EntitiesTraits< dimensions >::EntityType&
getCell( const typename EntitiesTraits< dimensions >::GlobalIndexType entityIndex ) const getCell( const typename EntitiesTraits< dimensions >::GlobalIndexType entityIndex ) const
{ {
return BaseType::getEntity( tnlDimensionsTag< dimensions >(), entityIndex ); return entitiesStorage.getEntity( tnlDimensionsTag< dimensions >(), entityIndex );
} }
void setCell( const typename EntitiesTraits< dimensions >::GlobalIndexType entityIndex, void setCell( const typename EntitiesTraits< dimensions >::GlobalIndexType entityIndex,
const typename EntitiesTraits< dimensions >::EntityType& entity ) const typename EntitiesTraits< dimensions >::EntityType& entity )
{ {
BaseType::setEntity( tnlDimensionsTag< dimensions >(), entityIndex, entity ); entitiesStorage.setEntity( tnlDimensionsTag< dimensions >(), entityIndex, entity );
} }
void print( ostream& str ) const void print( ostream& str ) const
{ {
BaseType::print( str ); entitiesStorage.print( str );
} }
bool operator==( const tnlMesh& mesh ) const bool operator==( const tnlMesh& mesh ) const
{ {
return BaseType::operator==( mesh ); return entitiesStorage.operator==( mesh.entitiesStorage );
} }
private: // TODO: this is only for mesh intializer - remove it if possible
template< typename DimensionsTag >
typename tnlMeshConfigTraits< MeshConfig >::template EntityTraits< DimensionsTag >::ContainerType& entitiesArray()
{
return entitiesStorage.entitiesArray( DimensionsTag() );
}
template< typename DimensionsTag, typename SuperDimensionsTag >
typename tnlMeshConfigTraits< MeshConfig >::GlobalIdArrayType& superentityIdsArray()
{
return entitiesStorage.template superentityIdsArray< SuperDimensionsTag >( DimensionsTag() );
}
protected:
void init();
tnlMeshStorageLayers< MeshConfig > entitiesStorage;
void init();
tnlMeshConfigValidator< MeshConfig > configValidator; tnlMeshConfigValidator< MeshConfig > configValidator;
}; };
......
...@@ -26,12 +26,13 @@ ...@@ -26,12 +26,13 @@
#include <mesh/topologies/tnlMeshVertexTag.h> #include <mesh/topologies/tnlMeshVertexTag.h>
#include <mesh/layers/tnlMeshSubentityStorageLayer.h> #include <mesh/layers/tnlMeshSubentityStorageLayer.h>
#include <mesh/layers/tnlMeshSuperentityStorageLayer.h> #include <mesh/layers/tnlMeshSuperentityStorageLayer.h>
#include <mesh/layers/tnlMeshSuperentityAccess.h>
template< typename ConfigTag, template< typename ConfigTag,
typename EntityTag > typename EntityTag >
class tnlMeshEntity class tnlMeshEntity
: public tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >, : public tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >,
public tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >, public tnlMeshSuperentityAccess< ConfigTag, EntityTag >,
public tnlMeshEntityId< typename ConfigTag::IdType, public tnlMeshEntityId< typename ConfigTag::IdType,
typename ConfigTag::GlobalIndexType > typename ConfigTag::GlobalIndexType >
{ {
...@@ -61,16 +62,16 @@ class tnlMeshEntity ...@@ -61,16 +62,16 @@ class tnlMeshEntity
bool save( tnlFile& file ) const bool save( tnlFile& file ) const
{ {
if( ! tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::save( file ) || if( ! tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::save( file ) /*||
! tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >::save( file ) ) ! tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >::save( file )*/ )
return false; return false;
return true; return true;
} }
bool load( tnlFile& file ) bool load( tnlFile& file )
{ {
if( ! tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::load( file ) || if( ! tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::load( file ) /*||
! tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >::load( file ) ) ! tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >::load( file ) */ )
return false; return false;
return true; return true;
} }
...@@ -79,13 +80,13 @@ class tnlMeshEntity ...@@ -79,13 +80,13 @@ class tnlMeshEntity
{ {
str << "\t Mesh entity dimensions: " << EntityTag::dimensions << endl; str << "\t Mesh entity dimensions: " << EntityTag::dimensions << endl;
tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::print( str ); tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::print( str );
tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >::print( str ); tnlMeshSuperentityAccess< ConfigTag, EntityTag >::print( str );
} }
bool operator==( const tnlMeshEntity& entity ) const bool operator==( const tnlMeshEntity& entity ) const
{ {
return ( tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::operator==( entity ) && return ( tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::operator==( entity ) &&
tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag >::operator==( entity ) && tnlMeshSuperentityAccess< ConfigTag, EntityTag >::operator==( entity ) &&
tnlMeshEntityId< typename ConfigTag::IdType, tnlMeshEntityId< typename ConfigTag::IdType,
typename ConfigTag::GlobalIndexType >::operator==( entity ) ); typename ConfigTag::GlobalIndexType >::operator==( entity ) );
} }
...@@ -202,13 +203,10 @@ class tnlMeshEntity ...@@ -202,13 +203,10 @@ class tnlMeshEntity
typedef int LocalIndexType; typedef int LocalIndexType;
// TODO: make this as: // TODO: make this as:
// typedef typename Type::IndexType LocalIndexType // typedef typename Type::IndexType LocalIndexType
/*enum { available = tnlMeshSuperentityStorage< ConfigTag,
EntityTag,
Dimensions >::enabled };*/
static const bool available = ConfigTag::template superentityStorage( EntityTag(), Dimensions ); static const bool available = ConfigTag::template superentityStorage( EntityTag(), Dimensions );
}; };
template< int Dimensions > /*template< int Dimensions >
bool setNumberOfSuperentities( const typename SuperentitiesTraits< Dimensions >::LocalIndexType size ) bool setNumberOfSuperentities( const typename SuperentitiesTraits< Dimensions >::LocalIndexType size )
{ {
static_assert( SuperentitiesTraits< Dimensions >::available, "You try to set number of superentities which are not configured for storage." ); static_assert( SuperentitiesTraits< Dimensions >::available, "You try to set number of superentities which are not configured for storage." );
...@@ -217,13 +215,13 @@ class tnlMeshEntity ...@@ -217,13 +215,13 @@ class tnlMeshEntity
typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType; typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType;
return SuperentityBaseType::setNumberOfSuperentities( tnlDimensionsTag< Dimensions >(), return SuperentityBaseType::setNumberOfSuperentities( tnlDimensionsTag< Dimensions >(),
size ); size );
} }*/
template< int Dimensions > template< int Dimensions >
typename SuperentitiesTraits< Dimensions >::LocalIndexType getNumberOfSuperentities() const typename SuperentitiesTraits< Dimensions >::LocalIndexType getNumberOfSuperentities() const
{ {
static_assert( SuperentitiesTraits< Dimensions >::available, "You try to get number of superentities which are not configured for storage." ); static_assert( SuperentitiesTraits< Dimensions >::available, "You try to get number of superentities which are not configured for storage." );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityBaseType;
return SuperentityBaseType::getNumberOfSuperentities( tnlDimensionsTag< Dimensions >() ); return SuperentityBaseType::getNumberOfSuperentities( tnlDimensionsTag< Dimensions >() );
} }
...@@ -235,7 +233,7 @@ class tnlMeshEntity ...@@ -235,7 +233,7 @@ class tnlMeshEntity
tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(), tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(),
cerr << " localIndex = " << localIndex cerr << " localIndex = " << localIndex
<< " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; ); << " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityBaseType;
SuperentityBaseType::setSuperentityIndex( tnlDimensionsTag< Dimensions >(), SuperentityBaseType::setSuperentityIndex( tnlDimensionsTag< Dimensions >(),
localIndex, localIndex,
globalIndex ); globalIndex );
...@@ -249,7 +247,7 @@ class tnlMeshEntity ...@@ -249,7 +247,7 @@ class tnlMeshEntity
tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(), tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(),
cerr << " localIndex = " << localIndex cerr << " localIndex = " << localIndex
<< " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; ); << " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityBaseType;
return SuperentityBaseType::getSuperentityIndex( tnlDimensionsTag< Dimensions >(), return SuperentityBaseType::getSuperentityIndex( tnlDimensionsTag< Dimensions >(),
localIndex ); localIndex );
} }
...@@ -258,15 +256,15 @@ class tnlMeshEntity ...@@ -258,15 +256,15 @@ class tnlMeshEntity
typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndices() typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndices()
{ {
static_assert( SuperentitiesTraits< Dimensions >::available, "You try to get superentities which are not configured for storage." ); static_assert( SuperentitiesTraits< Dimensions >::available, "You try to get superentities which are not configured for storage." );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityBaseType;
return SuperentityBaseType::getSuperentitiesIndices( tnlDimensionsTag< Dimensions >() ); //return SuperentityBaseType::getSuperentitiesIndices( tnlDimensionsTag< Dimensions >() );
} }
template< int Dimensions > template< int Dimensions >
const typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndices() const const typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndices() const
{ {
static_assert( SuperentitiesTraits< Dimensions >::available, "You try to get superentities which are not configured for storage." ); static_assert( SuperentitiesTraits< Dimensions >::available, "You try to get superentities which are not configured for storage." );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, EntityTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityBaseType;
return SuperentityBaseType::getSubentitiesIndices( tnlDimensionsTag< Dimensions >() ); return SuperentityBaseType::getSubentitiesIndices( tnlDimensionsTag< Dimensions >() );
} }
...@@ -304,11 +302,22 @@ class tnlMeshEntity ...@@ -304,11 +302,22 @@ class tnlMeshEntity
{ {
return this->getSubentitiesIndices< 0 >(); return this->getSubentitiesIndices< 0 >();
} }
// TODO: This is only for the mesh initializer, fix this
typedef tnlMeshSuperentityAccess< ConfigTag, EntityTag > SuperentityAccessBase;
typedef typename tnlMeshConfigTraits< ConfigTag>::IdArrayAccessorType IdArrayAccessorType;
template<typename DimensionsTag >
IdArrayAccessorType& superentityIdsArray()
{
return SuperentityAccessBase::superentityIdsArray( DimensionsTag());
}
}; };
template< typename ConfigTag > template< typename ConfigTag >
class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
: public tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >, : public tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag >,
public tnlMeshEntityId< typename ConfigTag::IdType, public tnlMeshEntityId< typename ConfigTag::IdType,
typename ConfigTag::GlobalIndexType > typename ConfigTag::GlobalIndexType >
{ {
...@@ -348,7 +357,7 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -348,7 +357,7 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
bool save( tnlFile& file ) const bool save( tnlFile& file ) const
{ {
if( ! tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::save( file ) || if( //! tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::save( file ) ||
! point.save( file ) ) ! point.save( file ) )
return false; return false;
return true; return true;
...@@ -356,7 +365,7 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -356,7 +365,7 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
bool load( tnlFile& file ) bool load( tnlFile& file )
{ {
if( ! tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::load( file ) || if( //! tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::load( file ) ||
! point.load( file ) ) ! point.load( file ) )
return false; return false;
return true; return true;
...@@ -366,12 +375,12 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -366,12 +375,12 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
{ {
str << "\t Mesh entity dimensions: " << tnlMeshVertexTag::dimensions << endl; str << "\t Mesh entity dimensions: " << tnlMeshVertexTag::dimensions << endl;
str << "\t Coordinates = ( " << point << " )"; str << "\t Coordinates = ( " << point << " )";
tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::print( str ); tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag >::print( str );
} }
bool operator==( const tnlMeshEntity& entity ) const bool operator==( const tnlMeshEntity& entity ) const
{ {
return ( tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::operator==( entity ) && return ( tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag >::operator==( entity ) &&
tnlMeshEntityId< typename ConfigTag::IdType, tnlMeshEntityId< typename ConfigTag::IdType,
typename ConfigTag::GlobalIndexType >::operator==( entity ) && typename ConfigTag::GlobalIndexType >::operator==( entity ) &&
point == entity.point ); point == entity.point );
...@@ -399,7 +408,8 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -399,7 +408,8 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
Dimensions >::enabled };*/ Dimensions >::enabled };*/
static const bool available = ConfigTag::template superentityStorage< tnlMeshVertexTag >( Dimensions ); static const bool available = ConfigTag::template superentityStorage< tnlMeshVertexTag >( Dimensions );
}; };
template< int Dimensions >
/*template< int Dimensions >
bool setNumberOfSuperentities( const typename SuperentitiesTraits< Dimensions >::LocalIndexType size ) bool setNumberOfSuperentities( const typename SuperentitiesTraits< Dimensions >::LocalIndexType size )
{ {
tnlAssert( size >= 0, tnlAssert( size >= 0,
...@@ -407,41 +417,41 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -407,41 +417,41 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType; typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType;
return SuperentityBaseType::setNumberOfSuperentities( tnlDimensionsTag< Dimensions >(), return SuperentityBaseType::setNumberOfSuperentities( tnlDimensionsTag< Dimensions >(),
size ); size );
} }*/
template< int Dimensions > template< int Dimensions >
typename SuperentitiesTraits< Dimensions >::LocalIndexType getNumberOfSuperentities() const typename SuperentitiesTraits< Dimensions >::LocalIndexType getNumberOfSuperentities() const
{ {
typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag > SuperentityBaseType;
return SuperentityBaseType::getNumberOfSuperentities( tnlDimensionsTag< Dimensions >() ); //return SuperentityBaseType::getNumberOfSuperentities( tnlDimensionsTag< Dimensions >() );
} }
template< int Dimensions > template< int Dimensions >
typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndices() typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndices()
{ {
typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag > SuperentityBaseType;
return SuperentityBaseType::getSuperentitiesIndices( tnlDimensionsTag< Dimensions >() ); //return SuperentityBaseType::getSuperentitiesIndices( tnlDimensionsTag< Dimensions >() );
} }
template< int Dimensions > template< int Dimensions >
const typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndeces() const const typename SuperentitiesTraits< Dimensions >::SharedContainerType& getSuperentitiesIndeces() const
{ {
typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag > SuperentityBaseType;
return SuperentityBaseType::getSubentitiesIndices( tnlDimensionsTag< Dimensions >() ); //return SuperentityBaseType::getSubentitiesIndices( tnlDimensionsTag< Dimensions >() );
} }
template< int Dimensions > /*template< int Dimensions >
void setSuperentityIndex( const typename SuperentitiesTraits< Dimensions >::LocalIndexType localIndex, void setSuperentityIndex( const typename SuperentitiesTraits< Dimensions >::LocalIndexType localIndex,
const typename SuperentitiesTraits< Dimensions >::GlobalIndexType globalIndex ) const typename SuperentitiesTraits< Dimensions >::GlobalIndexType globalIndex )
{ {
tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(), tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(),
cerr << " localIndex = " << localIndex cerr << " localIndex = " << localIndex
<< " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; ); << " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag > SuperentityBaseType;
SuperentityBaseType::setSuperentityIndex( tnlDimensionsTag< Dimensions >(), SuperentityBaseType::setSuperentityIndex( tnlDimensionsTag< Dimensions >(),
localIndex, localIndex,
globalIndex ); globalIndex );
} }*/
template< int Dimensions > template< int Dimensions >
typename SuperentitiesTraits< Dimensions >::GlobalIndexType typename SuperentitiesTraits< Dimensions >::GlobalIndexType
...@@ -450,9 +460,9 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -450,9 +460,9 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(), tnlAssert( localIndex < this->getNumberOfSuperentities< Dimensions >(),
cerr << " localIndex = " << localIndex cerr << " localIndex = " << localIndex
<< " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; ); << " this->getNumberOfSuperentities< Dimensions >() = " << this->getNumberOfSuperentities< Dimensions >() << endl; );
typedef tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag > SuperentityBaseType; typedef tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag > SuperentityBaseType;
return SuperentityBaseType::getSuperentityIndex( tnlDimensionsTag< Dimensions >(), /*return SuperentityBaseType::getSuperentityIndex( tnlDimensionsTag< Dimensions >(),
localIndex ); localIndex );*/
} }
/**** /****
...@@ -465,6 +475,19 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag > ...@@ -465,6 +475,19 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
protected: protected:
PointType point; PointType point;
// TODO: This is only for the mesh initializer, fix this
public:
typedef typename tnlMeshConfigTraits< ConfigTag>::IdArrayAccessorType IdArrayAccessorType;
typedef tnlMeshSuperentityAccess< ConfigTag, tnlMeshVertexTag > SuperentityAccessBase;
template<typename DimensionsTag >
IdArrayAccessorType& superentityIdsArray()
{
return SuperentityAccessBase::superentityIdsArray( DimensionsTag());
}
}; };
template< typename ConfigTag, template< typename ConfigTag,
...@@ -486,5 +509,4 @@ struct tnlDynamicTypeTag< tnlMeshEntity< ConfigTag, EntityTag > > ...@@ -486,5 +509,4 @@ struct tnlDynamicTypeTag< tnlMeshEntity< ConfigTag, EntityTag > >
enum { value = true }; enum { value = true };
}; };
#endif /* TNLMESHENTITY_H_ */ #endif /* TNLMESHENTITY_H_ */
...@@ -42,10 +42,10 @@ template< typename ConfigTag, ...@@ -42,10 +42,10 @@ template< typename ConfigTag,
class tnlMeshEntityInitializer class tnlMeshEntityInitializer
: public tnlMeshEntityInitializerLayer< ConfigTag, : public tnlMeshEntityInitializerLayer< ConfigTag,
EntityTag, EntityTag,
tnlDimensionsTag< EntityTag::dimensions - 1 > >, tnlDimensionsTag< EntityTag::dimensions - 1 > >/*,
public tnlMeshSuperentityInitializerLayer< ConfigTag, public tnlMeshSuperentityInitializerLayer< ConfigTag,
EntityTag, EntityTag,
typename tnlMeshTraits< ConfigTag >::DimensionsTag > typename tnlMeshTraits< ConfigTag >::DimensionsTag >*/
{ {
typedef tnlDimensionsTag< EntityTag::dimensions > DimensionsTag; typedef tnlDimensionsTag< EntityTag::dimensions > DimensionsTag;
private: private:
...@@ -118,11 +118,11 @@ class tnlMeshEntityInitializer ...@@ -118,11 +118,11 @@ class tnlMeshEntityInitializer
return this->entity->template getSubentitiesIndices< SubentityDimensionTag::value >(); return this->entity->template getSubentitiesIndices< SubentityDimensionTag::value >();
} }
template< typename SuperentityDimensionTag > /*template< typename SuperentityDimensionTag >
bool setNumberOfSuperentities( SuperentityDimensionTag, typename tnlMeshSuperentitiesTraits< ConfigTag, EntityTag, SuperentityDimensionTag >::ContainerType::IndexType size ) bool setNumberOfSuperentities( SuperentityDimensionTag, typename tnlMeshSuperentitiesTraits< ConfigTag, EntityTag, SuperentityDimensionTag >::ContainerType::IndexType size )
{ {
return this->entity->template setNumberOfSuperentities< SuperentityDimensionTag::value >( size ); return this->entity->template setNumberOfSuperentities< SuperentityDimensionTag::value >( size );
} }*/
// TODO: check if we need the following two methods // TODO: check if we need the following two methods
/*template< typename SuperentityDimensionTag > /*template< typename SuperentityDimensionTag >
...@@ -157,7 +157,7 @@ class tnlMeshEntityInitializer ...@@ -157,7 +157,7 @@ class tnlMeshEntityInitializer
void initSuperentities() void initSuperentities()
{ {
//cout << " Initiating superentities..." << endl; //cout << " Initiating superentities..." << endl;
SuperentityBaseType::initSuperentities( *this) ; //SuperentityBaseType::initSuperentities( *this) ;
} }
template< typename SubentityDimensionTag > template< typename SubentityDimensionTag >
...@@ -224,10 +224,10 @@ class tnlMeshEntityInitializer ...@@ -224,10 +224,10 @@ class tnlMeshEntityInitializer
}; };
template< typename ConfigTag > template< typename ConfigTag >
class tnlMeshEntityInitializer< ConfigTag, tnlMeshVertexTag > class tnlMeshEntityInitializer< ConfigTag, tnlMeshVertexTag >/*
: public tnlMeshSuperentityInitializerLayer< ConfigTag, : public tnlMeshSuperentityInitializerLayer< ConfigTag,
tnlMeshVertexTag, tnlMeshVertexTag,
typename tnlMeshTraits< ConfigTag >::DimensionsTag > typename tnlMeshTraits< ConfigTag >::DimensionsTag >*/
{ {
typedef tnlDimensionsTag< 0 > DimensionsTag; typedef tnlDimensionsTag< 0 > DimensionsTag;
...@@ -283,7 +283,7 @@ class tnlMeshEntityInitializer< ConfigTag, tnlMeshVertexTag > ...@@ -283,7 +283,7 @@ class tnlMeshEntityInitializer< ConfigTag, tnlMeshVertexTag >
void initSuperentities() void initSuperentities()
{ {
//cout << " Initiating superentities of vertex ..." << endl; //cout << " Initiating superentities of vertex ..." << endl;
SuperentityBaseType::initSuperentities(*this); //SuperentityBaseType::initSuperentities(*this);
} }
}; };
...@@ -333,7 +333,7 @@ class tnlMeshEntityInitializerLayer< ConfigTag, ...@@ -333,7 +333,7 @@ class tnlMeshEntityInitializerLayer< ConfigTag,
GlobalIndexType superentityIndex = entityInitializer.getEntityIndex(); GlobalIndexType superentityIndex = entityInitializer.getEntityIndex();
subentityContainer[ i ] = subentityIndex; subentityContainer[ i ] = subentityIndex;
//cout << " Setting " << i << "-th subentity to " << subentityContainer[ i ] << endl; //cout << " Setting " << i << "-th subentity to " << subentityContainer[ i ] << endl;
meshInitializer.getEntityInitializer( DimensionsTag(), subentityIndex ).addSuperentity( EntityDimensionsTag(), superentityIndex ); //meshInitializer.getEntityInitializer( DimensionsTag(), subentityIndex ).addSuperentity( EntityDimensionsTag(), superentityIndex );
} }
BaseType::initSubentities( entityInitializer, meshInitializer ); BaseType::initSubentities( entityInitializer, meshInitializer );
...@@ -482,7 +482,7 @@ class tnlMeshEntityInitializerLayer< ConfigTag, ...@@ -482,7 +482,7 @@ class tnlMeshEntityInitializerLayer< ConfigTag,
cerr << " subentityContainer = " << subentityContainer << endl; ); cerr << " subentityContainer = " << subentityContainer << endl; );
GlobalIndexType superentityIndex = entityInitializer.getEntityIndex(); GlobalIndexType superentityIndex = entityInitializer.getEntityIndex();
tnlAssert( superentityIndex >= 0, ); tnlAssert( superentityIndex >= 0, );
meshInitializer.getEntityInitializer( DimensionsTag(), subentityIndex).addSuperentity( EntityDimensionsTag(), superentityIndex ); //meshInitializer.getEntityInitializer( DimensionsTag(), subentityIndex).addSuperentity( EntityDimensionsTag(), superentityIndex );
} }
} }
}; };
......
...@@ -47,7 +47,7 @@ class tnlMeshInitializer ...@@ -47,7 +47,7 @@ class tnlMeshInitializer
public: public:
tnlMeshInitializer() tnlMeshInitializer()
: verbose( false ) : verbose( false ), mesh( 0 )
{} {}
void setVerbose( bool verbose ) void setVerbose( bool verbose )
...@@ -58,6 +58,7 @@ class tnlMeshInitializer ...@@ -58,6 +58,7 @@ class tnlMeshInitializer
bool initMesh( MeshType& mesh ) bool initMesh( MeshType& mesh )
{ {
//cout << "======= Starting mesh initiation ========" << endl; //cout << "======= Starting mesh initiation ========" << endl;
this->mesh = &mesh;
this->setMesh( mesh ); this->setMesh( mesh );
if( ! this->checkCells() ) if( ! this->checkCells() )
return false; return false;
...@@ -70,11 +71,34 @@ class tnlMeshInitializer ...@@ -70,11 +71,34 @@ class tnlMeshInitializer
return true; return true;
} }
template< typename SuperDimensionsTag, typename MeshEntity>
static typename tnlMeshConfigTraits< ConfigTag >::IdArrayAccessorType& superentityIdsArray( MeshEntity& entity )
{
return entity.template superentityIdsArray< SuperDimensionsTag >();
}
template< typename DimensionsTag >
typename tnlMeshConfigTraits< ConfigTag >::template EntityTraits< DimensionsTag>::ContainerType& meshEntitiesArray()
{
return mesh->template entitiesArray< DimensionsTag >();
}
template< typename DimensionsTag, typename SuperDimensionsTag >
typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType& meshSuperentityIdsArray()
{
return mesh->template superentityIdsArray< DimensionsTag, SuperDimensionsTag >();
}
protected: protected:
bool verbose; bool verbose;
MeshType* mesh;
}; };
/****
* Mesh initializer layer for cells
*/
template< typename ConfigTag > template< typename ConfigTag >
class tnlMeshInitializerLayer< ConfigTag, class tnlMeshInitializerLayer< ConfigTag,
typename tnlMeshTraits< ConfigTag >::DimensionsTag, typename tnlMeshTraits< ConfigTag >::DimensionsTag,
...@@ -155,7 +179,7 @@ class tnlMeshInitializerLayer< ConfigTag, ...@@ -155,7 +179,7 @@ class tnlMeshInitializerLayer< ConfigTag,
void initEntities( InitializerType& meshInitializer ) void initEntities( InitializerType& meshInitializer )
{ {
//cout << " Initiating entities with " << DimensionsTag::value << " dimensions..." << endl; cout << " Initiating cells..." << endl;
for( typename CellInitializerContainerType::IndexType i = 0; for( typename CellInitializerContainerType::IndexType i = 0;
i < cellInitializerContainer.getSize(); i < cellInitializerContainer.getSize();
i++ ) i++ )
...@@ -164,14 +188,23 @@ class tnlMeshInitializerLayer< ConfigTag, ...@@ -164,14 +188,23 @@ class tnlMeshInitializerLayer< ConfigTag,
cellInitializerContainer[ i ].initEntity( meshInitializer ); cellInitializerContainer[ i ].initEntity( meshInitializer );
} }
cellInitializerContainer.reset(); cellInitializerContainer.reset();
//cout << "Initiating superentities ...." << endl;
//superentityInitializer.initSuperentities( meshInitializer );
BaseType::initEntities( meshInitializer ); BaseType::initEntities( meshInitializer );
} }
private: private:
CellInitializerContainerType cellInitializerContainer; typedef tnlMeshSuperentityInitializerLayer< ConfigTag,
}; typename tnlMeshConfigTraits< ConfigTag >::CellType,
typename tnlMeshTraits< ConfigTag >::DimensionsTag > SuperentityInitializer;
CellInitializerContainerType cellInitializerContainer;
SuperentityInitializer superentityInitializer;
};
/****
* Mesh initializer layer for other mesh entities than cells
*/
template< typename ConfigTag, template< typename ConfigTag,
typename DimensionsTag > typename DimensionsTag >
class tnlMeshInitializerLayer< ConfigTag, class tnlMeshInitializerLayer< ConfigTag,
...@@ -245,7 +278,7 @@ class tnlMeshInitializerLayer< ConfigTag, ...@@ -245,7 +278,7 @@ class tnlMeshInitializerLayer< ConfigTag,
void initEntities( InitializerType &meshInitializer ) void initEntities( InitializerType &meshInitializer )
{ {
//cout << " Initiating entities with " << DimensionsTag::value << " dimensions..." << endl; cout << " Initiating entities with " << DimensionsTag::value << " dimensions..." << endl;
//cout << " Container with entities with " << DimensionsTag::value << " dimensions has: " << endl << this->uniqueContainer << endl; //cout << " Container with entities with " << DimensionsTag::value << " dimensions has: " << endl << this->uniqueContainer << endl;
const GlobalIndexType numberOfEntities = uniqueContainer.getSize(); const GlobalIndexType numberOfEntities = uniqueContainer.getSize();
this->getMesh().template setNumberOfEntities< DimensionsTag::value >( numberOfEntities ); this->getMesh().template setNumberOfEntities< DimensionsTag::value >( numberOfEntities );
...@@ -266,15 +299,24 @@ class tnlMeshInitializerLayer< ConfigTag, ...@@ -266,15 +299,24 @@ class tnlMeshInitializerLayer< ConfigTag,
} }
entityInitializerContainer.reset(); entityInitializerContainer.reset();
cout << "Initiating superentities..." << endl;
superentityInitializer.initSuperentities( meshInitializer );
BaseType::initEntities( meshInitializer ); BaseType::initEntities( meshInitializer );
} }
private: private:
UniqueContainerType uniqueContainer; typedef tnlMeshSuperentityInitializerLayer< ConfigTag,
EntityInitializerContainerType entityInitializerContainer; EntityTag,
typename tnlMeshTraits< ConfigTag >::DimensionsTag > SuperentityInitializer;
SuperentityInitializer superentityInitializer;
UniqueContainerType uniqueContainer;
EntityInitializerContainerType entityInitializerContainer;
}; };
/****
* Mesh initializer layer for entities not being stored
*/
template< typename ConfigTag, template< typename ConfigTag,
typename DimensionsTag > typename DimensionsTag >
class tnlMeshInitializerLayer< ConfigTag, class tnlMeshInitializerLayer< ConfigTag,
...@@ -284,7 +326,9 @@ class tnlMeshInitializerLayer< ConfigTag, ...@@ -284,7 +326,9 @@ class tnlMeshInitializerLayer< ConfigTag,
typename DimensionsTag::Decrement > typename DimensionsTag::Decrement >
{}; {};
/****
* Mesh initializer layer for vertices
*/
template< typename ConfigTag > template< typename ConfigTag >
class tnlMeshInitializerLayer< ConfigTag, class tnlMeshInitializerLayer< ConfigTag,
tnlDimensionsTag< 0 >, tnlDimensionsTag< 0 >,
...@@ -350,13 +394,20 @@ class tnlMeshInitializerLayer< ConfigTag, ...@@ -350,13 +394,20 @@ class tnlMeshInitializerLayer< ConfigTag,
vertexInitializer.init( vertexContainer[ i ], i ); vertexInitializer.init( vertexContainer[ i ], i );
vertexInitializer.initEntity( meshInitializer ); vertexInitializer.initEntity( meshInitializer );
} }
superentityInitializer.initSuperentities( meshInitializer );
vertexInitializerContainer.reset(); vertexInitializerContainer.reset();
} }
private: private:
VertexInitializerContainerType vertexInitializerContainer; typedef tnlMeshSuperentityInitializerLayer< ConfigTag,
typename tnlMeshConfigTraits< ConfigTag >::CellType,
typename tnlMeshTraits< ConfigTag >::DimensionsTag > SuperentityInitializer;
SuperentityInitializer superentityInitializer;
MeshType* mesh; VertexInitializerContainerType vertexInitializerContainer;
MeshType* mesh;
}; };
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
#include <mesh/traits/tnlStorageTraits.h> #include <mesh/traits/tnlStorageTraits.h>
#include <mesh/tnlDimensionsTag.h> #include <mesh/tnlDimensionsTag.h>
#include <algorithm>
template< typename ConfigTag, template< typename ConfigTag >
typename EntityTag > class tnlMeshInitializer;
class tnlMeshEntityInitializer;
template< typename ConfigTag, template< typename ConfigTag,
typename EntityTag, typename EntityTag,
...@@ -46,34 +46,59 @@ class tnlMeshSuperentityInitializerLayer< ConfigTag, ...@@ -46,34 +46,59 @@ class tnlMeshSuperentityInitializerLayer< ConfigTag,
EntityTag, EntityTag,
typename DimensionsTag::Decrement > BaseType; typename DimensionsTag::Decrement > BaseType;
typedef typename tnlMeshSuperentitiesTraits< ConfigTag, typedef tnlDimensionsTag< EntityTag::dimensions > EntityDimensions;
EntityTag,
DimensionsTag >::GrowableContainerType GrowableContainerType; typedef typename tnlMeshConfigTraits< ConfigTag >::GlobalIdArrayType GlobalIdArrayType;
typedef typename GrowableContainerType::ElementType GlobalIndexType;
typedef tnlMeshEntityInitializer< ConfigTag, EntityTag > EntityInitializerType; typedef typename tnlMeshConfigTraits< ConfigTag >::GlobalIndexType GlobalIndexType;
typedef tnlMeshInitializer< ConfigTag > MeshInitializer;
public:
public:
using BaseType::addSuperentity; using BaseType::addSuperentity;
void addSuperentity( DimensionsTag, GlobalIndexType entityIndex )
{ void addSuperentity( DimensionsTag, GlobalIndexType entityIndex, GlobalIndexType superentityIndex)
superentityContainer.Append( entityIndex ); {
} indexPairs.push_back( IndexPair{ entityIndex, superentityIndex } );
}
protected:
void initSuperentities( EntityInitializerType& entityInitializer ) void initSuperentities( MeshInitializer& meshInitializer )
{ {
entityInitializer.setNumberOfSuperentities( DimensionsTag(), std::sort( indexPairs.begin(),
superentityContainer.getSize() ); indexPairs.end(),
superentityContainer.toArray( entityInitializer.getSuperentityContainer( DimensionsTag()) ); []( IndexPair pair0, IndexPair pair1 ){ return ( pair0.entityIndex < pair1.entityIndex ); } );
superentityContainer.reset();
GlobalIdArrayType &superentityIdsArray = meshInitializer.template meshSuperentityIdsArray< EntityDimensions, DimensionsTag >();
BaseType::initSuperentities( entityInitializer ); superentityIdsArray.setSize( static_cast< GlobalIndexType >( indexPairs.size() ) );
} GlobalIndexType currentBegin = 0;
GlobalIndexType lastEntityIndex = 0;
for( GlobalIndexType i = 0; i < superentityIdsArray.getSize(); i++)
{
superentityIdsArray[ i ] = indexPairs[i].superentityIndex;
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();
BaseType::initSuperentities( meshInitializer );
}
private: private:
GrowableContainerType superentityContainer; struct IndexPair
{
GlobalIndexType entityIndex;
GlobalIndexType superentityIndex;
};
std::vector< IndexPair > indexPairs;
}; };
template< typename ConfigTag, template< typename ConfigTag,
...@@ -96,11 +121,11 @@ class tnlMeshSuperentityInitializerLayer< ConfigTag, ...@@ -96,11 +121,11 @@ class tnlMeshSuperentityInitializerLayer< ConfigTag,
tnlDimensionsTag< EntityTag::dimensions >, tnlDimensionsTag< EntityTag::dimensions >,
tnlStorageTraits< true > > tnlStorageTraits< true > >
{ {
typedef tnlMeshEntityInitializer< ConfigTag, EntityTag > EntityInitializerType; typedef tnlMeshInitializer< ConfigTag > MeshInitializerType;
protected: public:
void addSuperentity() {} // This method is due to 'using BaseType::...;' in the derived classes. void addSuperentity() {} // This method is due to 'using BaseType::...;' in the derived classes.
void initSuperentities( EntityInitializerType& ) {} void initSuperentities( MeshInitializerType& ) {}
}; };
template< typename ConfigTag, template< typename ConfigTag,
...@@ -110,11 +135,11 @@ class tnlMeshSuperentityInitializerLayer< ConfigTag, ...@@ -110,11 +135,11 @@ class tnlMeshSuperentityInitializerLayer< ConfigTag,
tnlDimensionsTag< EntityTag::dimensions >, tnlDimensionsTag< EntityTag::dimensions >,
tnlStorageTraits< false > > tnlStorageTraits< false > >
{ {
typedef tnlMeshEntityInitializer< ConfigTag, EntityTag > EntityInitializerType; typedef tnlMeshInitializer< ConfigTag > MeshInitializerType;
protected: public:
void addSuperentity() {} // This method is due to 'using BaseType::...;' in the derived classes. void addSuperentity() {} // This method is due to 'using BaseType::...;' in the derived classes.
void initSuperentities( EntityInitializerType& ) {} void initSuperentities( MeshInitializerType& ) {}
}; };
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#ifndef TNLMESHCONFIGTRAITS_H #ifndef TNLMESHCONFIGTRAITS_H
#define TNLMESHCONFIGTRAITS_H #define TNLMESHCONFIGTRAITS_H
#include <core/tnlHost.h>
#include <mesh/traits/tnlMeshEntitiesTraits.h> #include <mesh/traits/tnlMeshEntitiesTraits.h>
#include <mesh/traits/tnlMeshSubentitiesTraits.h> #include <mesh/traits/tnlMeshSubentitiesTraits.h>
#include <mesh/traits/tnlMeshSuperentitiesTraits.h> #include <mesh/traits/tnlMeshSuperentitiesTraits.h>
...@@ -43,10 +44,10 @@ class tnlMeshConfigTraits ...@@ -43,10 +44,10 @@ class tnlMeshConfigTraits
typedef EntitySeed<TConfig, TCellTopology> TCellSeed;*/ typedef EntitySeed<TConfig, TCellTopology> TCellSeed;*/
// TODO: to asi presunout do implementace, stejne to bude vazane na TNL // TODO: to asi presunout do implementace, stejne to bude vazane na TNL
typedef tnlArrayArray< GlobalIndexType, GlobalIndexType > GlobalIdArrayType; typedef tnlArray< GlobalIndexType, tnlHost, GlobalIndexType > GlobalIdArrayType;
typedef tnlSharedArray< GlobalIndexType, LocalIndexType > IdArrayAccessorType; typedef tnlSharedArray< GlobalIndexType, tnlHost, LocalIndexType > IdArrayAccessorType;
typedef tnlSharedArray< LocalIndexType, LocalIndexType > IdPermutationArrayAccessorType; typedef tnlSharedArray< LocalIndexType, tnlHost, LocalIndexType > IdPermutationArrayAccessorType;
typedef tnlArray< Point, GlobalIndexType> PointArrayType; typedef tnlArray< Point, tnlHost, GlobalIndexType> PointArrayType;
//typedef tnlArray<TCellSeed, TGlobalIndex> TCellSeedArray; //typedef tnlArray<TCellSeed, TGlobalIndex> TCellSeedArray;
template< typename Dimensions > using EntityTraits = template< typename Dimensions > using EntityTraits =
...@@ -55,7 +56,7 @@ class tnlMeshConfigTraits ...@@ -55,7 +56,7 @@ class tnlMeshConfigTraits
template< typename MeshEntity, typename SubDimensions > using SubentityTraits = template< typename MeshEntity, typename SubDimensions > using SubentityTraits =
tnlMeshSubentitiesTraits< MeshConfig, MeshEntity, SubDimensions >; tnlMeshSubentitiesTraits< MeshConfig, MeshEntity, SubDimensions >;
template< typename MeshEntityy, typename SuperDimensions > using SuperentityTraits = template< typename MeshEntity, typename SuperDimensions > using SuperentityTraits =
tnlMeshSuperentitiesTraits< MeshConfig, MeshEntity, SuperDimensions >; tnlMeshSuperentitiesTraits< MeshConfig, MeshEntity, SuperDimensions >;
}; };
......
...@@ -31,16 +31,12 @@ template< typename ConfigTag, ...@@ -31,16 +31,12 @@ template< typename ConfigTag,
typename DimensionsTag > typename DimensionsTag >
class tnlMeshSuperentitiesTraits class tnlMeshSuperentitiesTraits
{ {
/*enum { storageEnabled = tnlMeshSuperentityStorage< ConfigTag,
EntityTag,
DimensionsTag::value >::enabled };*/
static const bool storageEnabled = ConfigTag::template superentityStorage< EntityTag >( EntityTag(), DimensionsTag::value );
typedef typename ConfigTag::GlobalIndexType GlobalIndexType; typedef typename ConfigTag::GlobalIndexType GlobalIndexType;
typedef typename ConfigTag::LocalIndexType LocalIndexType; typedef typename ConfigTag::LocalIndexType LocalIndexType;
public: public:
static const bool storageEnabled = ConfigTag::template superentityStorage< EntityTag >( EntityTag(), DimensionsTag::value );
typedef tnlMeshEntity< ConfigTag, EntityTag > EntityType; typedef tnlMeshEntity< ConfigTag, EntityTag > EntityType;
typedef typename typedef typename
tnlMeshEntitiesTraits< ConfigTag, tnlMeshEntitiesTraits< ConfigTag,
......
...@@ -456,7 +456,7 @@ class tnlMeshEntityTester : public CppUnit :: TestCase ...@@ -456,7 +456,7 @@ class tnlMeshEntityTester : public CppUnit :: TestCase
CPPUNIT_ASSERT( triangleEntities[ 1 ].template getSubentityIndex< 1 >( 1 ) == 3 ); CPPUNIT_ASSERT( triangleEntities[ 1 ].template getSubentityIndex< 1 >( 1 ) == 3 );
CPPUNIT_ASSERT( triangleEntities[ 1 ].template getSubentityIndex< 1 >( 2 ) == 4 ); CPPUNIT_ASSERT( triangleEntities[ 1 ].template getSubentityIndex< 1 >( 2 ) == 4 );
vertexEntities[ 0 ].template setNumberOfSuperentities< 1 >( 2 ); /*vertexEntities[ 0 ].template setNumberOfSuperentities< 1 >( 2 );
vertexEntities[ 0 ].template setSuperentityIndex< 1 >( 0, 2 ); vertexEntities[ 0 ].template setSuperentityIndex< 1 >( 0, 2 );
vertexEntities[ 0 ].template setSuperentityIndex< 1 >( 1, 1 ); vertexEntities[ 0 ].template setSuperentityIndex< 1 >( 1, 1 );
...@@ -467,7 +467,7 @@ class tnlMeshEntityTester : public CppUnit :: TestCase ...@@ -467,7 +467,7 @@ class tnlMeshEntityTester : public CppUnit :: TestCase
vertexEntities[ 1 ].template setNumberOfSuperentities< 2 >( 2 ); vertexEntities[ 1 ].template setNumberOfSuperentities< 2 >( 2 );
vertexEntities[ 1 ].template setSuperentityIndex< 2 >( 0, 0 ); vertexEntities[ 1 ].template setSuperentityIndex< 2 >( 0, 0 );
vertexEntities[ 1 ].template setSuperentityIndex< 2 >( 1, 1 ); vertexEntities[ 1 ].template setSuperentityIndex< 2 >( 1, 1 );*/
CPPUNIT_ASSERT( vertexEntities[ 0 ].template getNumberOfSuperentities< 1 >() == 2 ); CPPUNIT_ASSERT( vertexEntities[ 0 ].template getNumberOfSuperentities< 1 >() == 2 );
CPPUNIT_ASSERT( vertexEntities[ 0 ].template getSuperentityIndex< 1 >( 0 ) == 2 ); CPPUNIT_ASSERT( vertexEntities[ 0 ].template getSuperentityIndex< 1 >( 0 ) == 2 );
...@@ -482,12 +482,12 @@ class tnlMeshEntityTester : public CppUnit :: TestCase ...@@ -482,12 +482,12 @@ class tnlMeshEntityTester : public CppUnit :: TestCase
CPPUNIT_ASSERT( vertexEntities[ 1 ].template getSuperentityIndex< 2 >( 0 ) == 0 ); CPPUNIT_ASSERT( vertexEntities[ 1 ].template getSuperentityIndex< 2 >( 0 ) == 0 );
CPPUNIT_ASSERT( vertexEntities[ 1 ].template getSuperentityIndex< 2 >( 1 ) == 1 ); CPPUNIT_ASSERT( vertexEntities[ 1 ].template getSuperentityIndex< 2 >( 1 ) == 1 );
edgeEntities[ 0 ].template setNumberOfSuperentities< 2 >( 2 ); /*edgeEntities[ 0 ].template setNumberOfSuperentities< 2 >( 2 );
edgeEntities[ 0 ].template setSuperentityIndex< 2 >( 0, 0 ); edgeEntities[ 0 ].template setSuperentityIndex< 2 >( 0, 0 );
edgeEntities[ 0 ].template setSuperentityIndex< 2 >( 1, 1 ); edgeEntities[ 0 ].template setSuperentityIndex< 2 >( 1, 1 );*/
CPPUNIT_ASSERT( edgeEntities[ 0 ].template getNumberOfSuperentities< 2 >() == 2 ); /*CPPUNIT_ASSERT( edgeEntities[ 0 ].template getNumberOfSuperentities< 2 >() == 2 );
CPPUNIT_ASSERT( edgeEntities[ 0 ].template getSuperentityIndex< 2 >( 0 ) == 0 ); CPPUNIT_ASSERT( edgeEntities[ 0 ].template getSuperentityIndex< 2 >( 0 ) == 0 );*/
}; };
}; };
......
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