Commit 300dd21e authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing entity orientations.

parent df636720
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -122,8 +122,9 @@ void tnlSharedArray< Element, Device, Index > :: bind( Array& array,
                                                       IndexType index,
                                                       IndexType size )
{
   tnlStaticAssert( Array::DeviceType::DeviceType == DeviceType::DeviceType,
                    "Attempt to bind arrays between different devices." );
   //tnlStaticAssert( Array::DeviceType::DeviceType == DeviceType::DeviceType,
   //                 "Attempt to bind arrays between different devices." );
   // TODO: fix this - it does nto work with tnlStaticArray
   this->data = &( array. getData()[ index ] );
   if( ! size )
      this->size = array. getSize();
+6 −0
Original line number Diff line number Diff line
@@ -178,6 +178,9 @@ class tnlMeshSubentityStorageLayer< ConfigTag,
      return this->subentityOrientations[ index ].getSubvertexPermutation();
   }

   using BaseType::subentityOrientationsArray;
	OrientationArrayType& subentityOrientationsArray( DimensionsTag ) { return this->subentityOrientations; }
   
   private:
      IdArrayType subentitiesIndices;

@@ -309,6 +312,9 @@ class tnlMeshSubentityStorageLayer< ConfigTag,
   using BaseType::subentityIdsArray;
   IdArrayType& subentityIdsArray( DimensionsTag ) { return this->subentitiesIndices; }
   
   using BaseType::subentityOrientationsArray;
   void subentityOrientationsArray() {}
   
   private:
      IdArrayType subentitiesIndices;

+2 −0
Original line number Diff line number Diff line
@@ -242,10 +242,12 @@ class tnlMeshEntityInitializerLayer< ConfigTag,
         GlobalIndexType subentityIndex = meshInitializer.findEntitySeedIndex( subentitySeeds[ i ] );
         subentityIdsArray[ i ] = subentityIndex;
         subentityOrientationsArray[ i ] = meshInitializer.template getReferenceOrientation< DimensionsTag >( subentityIndex ).createOrientation( subentitySeeds[ i ] );
         cout << "    Subentity orientation = " << subentityOrientationsArray[ i ].getSubvertexPermutation() << endl;
         meshInitializer.
            template getSuperentityInitializer< DimensionsTag >().
               addSuperentity( EntityDimensionsTag(), subentityIdsArray[ i ], entityIndex );
      }
      
      BaseType::initSubentities( entity, entityIndex, entitySeed, meshInitializer );
   }
};
+4 −1
Original line number Diff line number Diff line
@@ -29,7 +29,10 @@ class tnlMeshEntityOrientation

      IdPermutationArrayAccessorType getSubvertexPermutation() const
      {
         return this->subvertexPermutation.subarray( 0, this->subvertexPermutation.getSize() );
         IdPermutationArrayAccessorType accessor;
         accessor.bind( this->subvertexPermutation );
         return accessor;
         //return this->subvertexPermutation.subarray( 0, this->subvertexPermutation.getSize() );
      }

   private:
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ class tnlMeshConfigTraits
      // TODO: to asi presunout do implementace, stejne to bude vazane na TNL
      typedef tnlArray< GlobalIndexType, tnlHost, GlobalIndexType >             GlobalIdArrayType;
      typedef tnlConstSharedArray< GlobalIndexType, tnlHost, LocalIndexType >   IdArrayAccessorType;
      typedef tnlSharedArray< LocalIndexType, tnlHost, LocalIndexType >         IdPermutationArrayAccessorType;
      typedef tnlConstSharedArray< LocalIndexType, tnlHost, LocalIndexType >         IdPermutationArrayAccessorType;
      typedef tnlArray< Point, tnlHost, GlobalIndexType>                        PointArrayType;
      typedef tnlArray< CellSeed, tnlHost, GlobalIndexType >                    CellSeedArrayType;