Commit 96306a20 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'master' into mhfem

* master:
  Name in tnlObject is deleted.
  Deleting name from tnlString.
  Deleting name from tnlObject.
  Deleting name from tnlObject.
  Deleting name from tnlObject.
  Deleting name in tnlObject.
  Adding problem dependent build config tag to tnl-quickstart.
  Fixing tnl-quickstart.
parents e7fe1b15 2e46d567
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -51,9 +51,6 @@ navierStokesSolver< Mesh, EulerScheme > :: navierStokesSolver()
  T( 0.0 ),
  rhsIndex( 0 )
{

   this -> mesh. setName( "navier-stokes-mesh" );
   this -> dofVector. setName( "navier-stokes-dof-vector" );
}

template< typename Mesh, typename EulerScheme >
+0 −2
Original line number Diff line number Diff line
@@ -42,8 +42,6 @@ class tnlArray : public virtual tnlObject

   tnlArray();

   tnlArray( const tnlString& name );

   static tnlString getType();

   tnlString getTypeVirtual() const;
+7 −30
Original line number Diff line number Diff line
@@ -36,15 +36,6 @@ tnlArray< Element, Device, Index > :: tnlArray()
{
};

template< typename Element,
           typename Device,
           typename Index >
tnlArray< Element, Device, Index > :: tnlArray( const tnlString& name )
: size( 0 ), data( 0 )
{
   this -> setName( name );
};

template< typename Element,
           typename Device,
           typename Index >
@@ -88,7 +79,6 @@ bool tnlArray< Element, Device, Index > :: setSize( const Index size )
{
   tnlAssert( size >= 0,
              cerr << "You try to set size of tnlArray to negative value."
                   << "Name: " << this -> getName() << endl
                   << "New size: " << size << endl );
   if( this->size == size ) return true;
   if( this->data )
@@ -101,8 +91,7 @@ bool tnlArray< Element, Device, Index > :: setSize( const Index size )
   if( ! this->data )
   {
      cerr << "I am not able to allocate new array with size "
           << ( double ) this->size * sizeof( ElementType ) / 1.0e9 << " GB for "
           << this->getName() << "." << endl;
           << ( double ) this->size * sizeof( ElementType ) / 1.0e9 << " GB." << endl;
      this -> size = 0;
      return false;
   }
@@ -117,8 +106,6 @@ bool tnlArray< Element, Device, Index > :: setLike( const Array& array )
{
   tnlAssert( array. getSize() >= 0,
              cerr << "You try to set size of tnlArray to negative value."
                   << "Name: " << this -> getName() << endl
                   << "Array name:" << array. getName()
                   << "Array size: " << array. getSize() << endl );
   return setSize( array.getSize() );
};
@@ -157,8 +144,7 @@ template< typename Element,
void tnlArray< Element, Device, Index > :: setElement( const Index i, const Element& x )
{
   tnlAssert( 0 <= i && i < this -> getSize(),
              cerr << "Wrong index for setElement method in tnlArray with name "
                   << this -> getName()
              cerr << "Wrong index for setElement method in tnlArray "
                   << " index is " << i
                   << " and array size is " << this -> getSize() );
   return tnlArrayOperations< Device > :: setMemoryElement( &( this -> data[ i ] ), x );
@@ -170,8 +156,7 @@ template< typename Element,
Element tnlArray< Element, Device, Index > :: getElement( Index i ) const
{
   tnlAssert( 0 <= i && i < this -> getSize(),
              cerr << "Wrong index for getElement method in tnlArray with name "
                   << this -> getName()
              cerr << "Wrong index for getElement method in tnlArray "
                   << " index is " << i
                   << " and array size is " << this -> getSize() );
   return tnlArrayOperations< Device > :: getMemoryElement( & ( this -> data[ i ] ) );
@@ -184,8 +169,7 @@ __cuda_callable__
Element& tnlArray< Element, Device, Index > :: operator[] ( Index i )
{
   tnlAssert( 0 <= i && i < this -> getSize(),
              cerr << "Wrong index for operator[] in tnlArray with name "
                   << this -> getName()
              cerr << "Wrong index for operator[] in tnlArray "
                   << " index is " << i
                   << " and array size is " << this -> getSize() );
   return this->data[ i ];
@@ -198,8 +182,7 @@ __cuda_callable__
const Element& tnlArray< Element, Device, Index > :: operator[] ( Index i ) const
{
   tnlAssert( 0 <= i && i < this -> getSize(),
              cerr << "Wrong index for operator[] in tnlArray with name "
                   << this -> getName()
              cerr << "Wrong index for operator[] in tnlArray "
                   << " index is " << i
                   << " and array size is " << this -> getSize() );
   return this->data[ i ];
@@ -212,9 +195,7 @@ tnlArray< Element, Device, Index >&
   tnlArray< Element, Device, Index > :: operator = ( const tnlArray< Element, Device, Index >& array )
{
   tnlAssert( array. getSize() == this -> getSize(),
           cerr << "Source name: " << array. getName() << endl
                << "Source size: " << array. getSize() << endl
                << "Target name: " << this -> getName() << endl
           cerr << "Source size: " << array. getSize() << endl
                << "Target size: " << this -> getSize() << endl );
   tnlArrayOperations< Device > :: 
   template copyMemory< Element,
@@ -234,9 +215,7 @@ tnlArray< Element, Device, Index >&
   tnlArray< Element, Device, Index > :: operator = ( const Array& array )
{
   tnlAssert( array. getSize() == this -> getSize(),
           cerr << "Source name: " << array. getName() << endl
                << "Source size: " << array. getSize() << endl
                << "Target name: " << this -> getName() << endl
           cerr << "Source size: " << array. getSize() << endl
                << "Target size: " << this -> getSize() << endl );
   tnlArrayOperations< Device,
                       typename Array :: DeviceType > ::
@@ -339,7 +318,6 @@ bool tnlArray< Element, Device, Index > :: save( tnlFile& file ) const
   if( this -> size != 0 && ! tnlArrayIO< Element, Device, Index >::save( file, this -> data, this -> size ) )
   {
      cerr << "I was not able to save " << this->getType()
           << " " << this -> getName()
           << " with size " << this -> getSize() << endl;
      return false;
   }
@@ -372,7 +350,6 @@ bool tnlArray< Element, Device, Index > :: load( tnlFile& file )
      if( ! tnlArrayIO< Element, Device, Index >::load( file, this -> data, this -> size ) )
      {
         cerr << "I was not able to load " << this->getType()
                    << " " << this -> getName()
                    << " with size " << this -> getSize() << endl;
         return false;
      }
+3 −7
Original line number Diff line number Diff line
@@ -78,11 +78,9 @@ void tnlConstSharedArray< Element, Device, Index > :: bind( const Element* data,
{
   tnlAssert( size >= 0,
              cerr << "You try to set size of tnlConstSharedArray to negative value."
                   << "Name: " << this -> getName() << endl
                   << "New size: " << size << endl );
   tnlAssert( data != 0,
              cerr << "You try to use null pointer to data for tnlConstSharedArray."
                   << "Name: " << this -> getName() );
              cerr << "You try to use null pointer to data for tnlConstSharedArray." );

   this -> size = size;
   this -> data = data;
@@ -141,7 +139,6 @@ Element tnlConstSharedArray< Element, Device, Index > :: getElement( Index i ) c
{
   tnlAssert( 0 <= i && i < this -> getSize(),
              cerr << "Wrong index for getElement method in tnlConstSharedArray with name "
                   << this -> getName()
                   << " index is " << i
                   << " and array size is " << this -> getSize() );
   return tnlArrayOperations< Device >::getMemoryElement( &( this -> data[ i ] ) );
@@ -155,7 +152,6 @@ const Element& tnlConstSharedArray< Element, Device, Index > :: operator[] ( Ind
{
   tnlAssert( 0 <= i && i < this -> getSize(),
              cerr << "Wrong index for operator[] in tnlConstSharedArray with name "
                   << this -> getName()
                   << " index is " << i
                   << " and array size is " << this -> getSize() );
   // TODO: add static assert - this does not make sense for tnlCudaDevice
@@ -241,7 +237,7 @@ template< typename Element,
bool tnlConstSharedArray< Element, Device, Index > :: save( tnlFile& file ) const
{
   tnlAssert( this -> size != 0,
              cerr << "You try to save empty array. Its name is " << this -> getName() );
              cerr << "You try to save empty array." );
   if( ! tnlObject :: save( file ) )
      return false;
#ifdef HAVE_NOT_CXX11
@@ -252,7 +248,7 @@ bool tnlConstSharedArray< Element, Device, Index > :: save( tnlFile& file ) cons
      return false;
   if( ! file. write< Element, Device, Index >( this -> data, this -> size ) )
   {
      cerr << "I was not able to WRITE tnlConstSharedArray " << this -> getName()
      cerr << "I was not able to WRITE tnlConstSharedArray " 
           << " with size " << this -> getSize() << endl;
      return false;
   }
+0 −8
Original line number Diff line number Diff line
@@ -43,8 +43,6 @@ class tnlMultiArray< 1, Element, Device, Index > : public tnlArray< Element, Dev

   tnlMultiArray();

   tnlMultiArray( const tnlString& name );

   static tnlString getType();

   tnlString getTypeVirtual() const;
@@ -124,8 +122,6 @@ class tnlMultiArray< 2, Element, Device, Index > : public tnlArray< Element, Dev

   tnlMultiArray();

   tnlMultiArray( const tnlString& name );

   static tnlString getType();

   tnlString getTypeVirtual() const;
@@ -209,8 +205,6 @@ class tnlMultiArray< 3, Element, Device, Index > : public tnlArray< Element, Dev

   tnlMultiArray();

   tnlMultiArray( const tnlString& name );

   static tnlString getType();

   tnlString getTypeVirtual() const;
@@ -294,8 +288,6 @@ class tnlMultiArray< 4, Element, Device, Index > : public tnlArray< Element, Dev

   tnlMultiArray();

   tnlMultiArray( const tnlString& name );

   static tnlString getType();

   tnlString getTypeVirtual() const;
Loading