Commit 3bee5d1f authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Debuging the unstructured mesh.

parent 4c453679
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -157,20 +157,18 @@ class tnlArrayOperations< tnlHost, tnlCuda >
};

template< typename Type1, typename Type2 >
class tnlFastArrayOperations
struct tnlFastArrayOperations
{
   public:

   enum{ enabled = false };
};

template< typename Type >
class tnlFastArrayOperations< Type, Type >
{
   public:

      enum{ enabled = true };
};
template<> struct tnlFastArrayOperations< char,              char >{ enum{ enabled = true }; };
template<> struct tnlFastArrayOperations< int,               int  >{ enum{ enabled = true }; };
template<> struct tnlFastArrayOperations< unsigned int,      unsigned int  >{ enum{ enabled = true }; };
template<> struct tnlFastArrayOperations< long int,          long int  >{ enum{ enabled = true }; };
template<> struct tnlFastArrayOperations< long unsigned int, long unsigned int  >{ enum{ enabled = true }; };
template<> struct tnlFastArrayOperations< float,             float  >{ enum{ enabled = true }; };
template<> struct tnlFastArrayOperations< double,            double  >{ enum{ enabled = true }; };


#include <implementation/core/arrays/tnlArrayOperationsHost_impl.h>
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ bool tnlArrayOperations< tnlHost >::compareMemory( const DestinationElement* des
   }
   else
      for( Index i = 0; i < size; i ++ )
         if( destination[ i ] != source[ i ] )
         if( ! ( destination[ i ] == source[ i ] ) )
            return false;
   return true;
}
+12 −3
Original line number Diff line number Diff line
@@ -145,6 +145,12 @@ class tnlMeshStorageLayer< ConfigTag,
      }
   }

   bool operator==( const tnlMeshStorageLayer& meshLayer ) const
   {
      return ( BaseType::operator==( meshLayer ) && entities == meshLayer.entities );
   }


   protected:
   ContainerType entities;

@@ -279,12 +285,15 @@ class tnlMeshStorageLayer< ConfigTag,
      str << "The mesh vertices are: " << endl;
      for( GlobalIndexType i = 0; i < vertices.getSize();i ++ )
      {
         str << i << " \t ( ";
         vertices[ i ].print( str );
         str << " ) " << endl;
         str << i << vertices[ i ] << endl;
      }
   }

   bool operator==( const tnlMeshStorageLayer& meshLayer ) const
   {
      return ( vertices == meshLayer.vertices );
   }

   private:

   ContainerType vertices;
+11 −0
Original line number Diff line number Diff line
@@ -104,6 +104,12 @@ class tnlMeshSubentityStorageLayer< ConfigTag,
      str << "\t Subentities with " << DimensionsTraits::value << " dimensions are: " << subentitiesIndices << ".";
   }

   bool operator==( const tnlMeshSubentityStorageLayer& layer  ) const
   {
      return ( BaseType::operator==( layer ) &&
               subentitiesIndices == layer.subentitiesIndices );
   }

   /****
    * Make visible setters and getters of the lower subentities
    */
@@ -212,6 +218,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag,
      str << "\t Subentities with " << DimensionsTraits::value << " dimensions are: " << this->verticesIndices << ".";
   }

   bool operator==( const tnlMeshSubentityStorageLayer& layer  ) const
   {
      return ( verticesIndices == layer.verticesIndices );
   }

   GlobalIndexType getSubentityIndex( DimensionsTraits,
                                      const LocalIndexType localIndex ) const
   {
+27 −0
Original line number Diff line number Diff line
@@ -147,6 +147,14 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,

    void print( ostream& str ) const
    {
       BaseType::print( str );
       str << endl << "\t Superentities with " << DimensionsTraits::value << " dimensions are: " << this->superentitiesIndices << ".";
    }

    bool operator==( const tnlMeshSuperentityStorageLayer& layer  ) const
    {
       return ( BaseType::operator==( layer ) &&
                superentitiesIndices == layer.superentitiesIndices );
    }

    private:
@@ -184,6 +192,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,
                                       EntityTag,
                                       DimensionsTraits >      SuperentityTag;

   typedef tnlMeshSuperentityStorageLayer< ConfigTag,
                                           EntityTag,
                                           DimensionsTraits,
                                           tnlStorageTraits< false > > ThisType;

   protected:

   typedef typename SuperentityTag::ContainerType              ContainerType;
@@ -204,6 +217,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,

   void print( ostream& str ) const{}

   bool operator==( const ThisType& layer  ) const
   {
      return true;
   }

   ContainerType& getSuperentitiesIndices(){}

   const ContainerType& getSuperentitiesIndices() const{}
@@ -221,6 +239,10 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,
   typedef tnlMeshSuperentitiesTraits< ConfigTag,
                                       EntityTag,
                                       DimensionsTraits >      SuperentityTag;
   typedef tnlMeshSuperentityStorageLayer< ConfigTag,
                                           EntityTag,
                                           DimensionsTraits,
                                           tnlStorageTraits< true > > ThisType;

   protected:

@@ -242,6 +264,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag,

   void print( ostream& str ) const{}

   bool operator==( const ThisType& layer  ) const
   {
      return true;
   }

   ContainerType& getSuperentitiesIndices(){}

   const ContainerType& getSuperentitiesIndices() const{}
Loading