Commit 550688fa authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Debuging tnlMesh.

parent 3bee5d1f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -74,6 +74,11 @@ class tnlMeshStorageLayer< ConfigTag,
      this->sharedEntities.setName( tnlString( "tnlMeshStorageLayer < " ) + tnlString( DimensionsTraits::value ) + " >::sharedEntities" );
   }

   ~tnlMeshStorageLayer()
   {
      cout << "Destroying mesh storage layer with " << DimensionsTraits::value << " dimensions and " << this->entities.getSize() << " entities." << endl;
   }

   bool setNumberOfEntities( DimensionsTraits, const GlobalIndexType size )
   {
      if( ! this->entities.setSize( size ) )
@@ -126,6 +131,7 @@ class tnlMeshStorageLayer< ConfigTag,

   bool load( tnlFile& file )
   {
      cout << "Loading mesh layer with dimensions " << DimensionsTraits::value << endl;
      if( ! BaseType::load( file ) ||
          ! this->entities.load( file ) )
         return false;
@@ -190,6 +196,11 @@ class tnlMeshStorageLayer< ConfigTag,
      this->sharedVertices.setName( tnlString( "tnlMeshStorageLayer < " ) + tnlString( DimensionsTraits::value ) + " >::sharedVertices" );
   }

   ~tnlMeshStorageLayer()
   {
        cout << "mesh storage layer: dimensions = " << DimensionsTraits::value << " entities = " << this->vertices.getSize() << endl;
   }


   bool setNumberOfVertices( const GlobalIndexType size )
   {
+13 −0
Original line number Diff line number Diff line
@@ -72,6 +72,13 @@ class tnlMeshSubentityStorageLayer< ConfigTag,
   tnlMeshSubentityStorageLayer()
   {
      this->sharedSubentitiesIndices.bind( this->subentitiesIndices );
      this->sharedSubentitiesIndices.setName( "sharedSubentitiesIndices" );
      //this->subentitiesIndices.setName( "subentitiesIndices" );
   }

   ~tnlMeshSubentityStorageLayer()
   {
      cout << "      Destroying " << this->sharedSubentitiesIndices.getSize() << " subentities with "<< DimensionsTraits::value << " dimensions." << endl;
   }

   tnlMeshSubentityStorageLayer& operator = ( const tnlMeshSubentityStorageLayer& layer )
@@ -192,6 +199,12 @@ class tnlMeshSubentityStorageLayer< ConfigTag,
      this->sharedVerticesIndices.bind( this->verticesIndices );
   }

   ~tnlMeshSubentityStorageLayer()
   {
      cout << "      Destroying " << this->sharedVerticesIndices.getSize() << " subentities with "<< DimensionsTraits::value << " dimensions." << endl;
   }


   tnlMeshSubentityStorageLayer& operator = ( const tnlMeshSubentityStorageLayer& layer )
   {
      this->verticesIndices = layer.verticesIndices;
+7 −0
Original line number Diff line number Diff line
@@ -83,9 +83,16 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,
       this->sharedSuperentitiesIndices.setName( tnlString( "tnlMeshSuperentityStorageLayer < " ) + tnlString( DimensionsTraits::value ) + " >::sharedSuperentitiesIndices" );
    }

    ~tnlMeshSuperentityStorageLayer()
    {
       cout << "      Destroying " << this->superentitiesIndices.getSize() << " superentities with "<< DimensionsTraits::value << " dimensions." << endl;
    }

    tnlMeshSuperentityStorageLayer& operator = ( const tnlMeshSuperentityStorageLayer& layer )
    {
       this->superentitiesIndices.setSize( layer.superentitiesIndices.getSize() );
       this->superentitiesIndices = layer.superentitiesIndices;
       this->sharedSuperentitiesIndices.bind( this->superentitiesIndices );
       return *this;
    }

+8 −0
Original line number Diff line number Diff line
@@ -36,6 +36,11 @@ class tnlMesh : public tnlObject,
   typedef typename tnlMeshTraits< ConfigTag >::PointType PointType;
   enum { dimensions = tnlMeshTraits< ConfigTag >::meshDimensions };

   ~tnlMesh()
   {
      cerr << "Destroying mesh " << this->getName() << endl;
   }

   static tnlString getType()
   {
      return tnlString( "tnlMesh< ") + ConfigTag::getType() + " >";
@@ -61,7 +66,10 @@ class tnlMesh : public tnlObject,
   {
      if( ! tnlObject::load( file ) ||
          ! BaseType::load( file ) )
      {
         cerr << "Loading a mesh failed." << endl;
         return false;
      }
      return true;
   }

+10 −0
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ class tnlMeshEntity
      return this->getType();
   }

   ~tnlMeshEntity()
   {
      cerr << "   Destroying entity with " << EntityTag::dimensions << " dimensions..." << endl;
   }

   bool save( tnlFile& file ) const
   {
      if( ! tnlMeshSubentityStorageLayers< ConfigTag, EntityTag >::save( file ) ||
@@ -312,6 +317,11 @@ class tnlMeshEntity< ConfigTag, tnlMeshVertexTag >
   enum { dimensions = Tag::dimensions };
   enum { meshDimensions = tnlMeshTraits< ConfigTag >::meshDimensions };

   ~tnlMeshEntity()
   {
      cerr << "   Destroying entity with " << tnlMeshVertexTag::dimensions << " dimensions..." << endl;
   }

   bool save( tnlFile& file ) const
   {
      if( ! tnlMeshSuperentityStorageLayers< ConfigTag, tnlMeshVertexTag >::save( file ) ||
Loading