Commit cf35b44c authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Renamed Assert to TNL_ASSERT in meshes and multimaps

parent a162eaa6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ template< typename Element,
   template<typename ArrayType>
void IndexedMap< Element, Index, Key >::toArray( ArrayType& array ) const
{
   Assert( array.getSize() == getSize(),
   TNL_ASSERT( array.getSize() == getSize(),
               std::cerr << "array.getSize() = " << array.getSize()
                         << " getSize() = " << getSize() );

+18 −18
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ EllpackIndexMultimapValues< Index, Device, LocalIndex >&
EllpackIndexMultimapValues< Index, Device, LocalIndex >::
operator=( const EllpackIndexMultimapValues& other )
{
   Assert( this->getSize() == other.getSize(), );
   TNL_ASSERT( this->getSize() == other.getSize(), );
   if( this->values != other.values ) {
      for( LocalIndexType i = 0; i < this->getSize(); i++ )
         this->setValue( i, other[ i ] );
@@ -92,7 +92,7 @@ EllpackIndexMultimapValues( IndexType* values,
   this->values = &values[ input * allocatedSize ];
   this->valuesCount = &valuesCounts[ input ];
   this->allocatedSize = allocatedSize;
   Assert( *(this->valuesCount) <= allocatedSize, );
   TNL_ASSERT( *(this->valuesCount) <= allocatedSize, );
}

template< typename Index,
@@ -138,7 +138,7 @@ EllpackIndexMultimapValues< Index, Device, LocalIndex >::
setValue( const LocalIndexType& portIndex,
          const IndexType& value )
{
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
@@ -152,7 +152,7 @@ Index
EllpackIndexMultimapValues< Index, Device, LocalIndex >::
getValue( const LocalIndexType& portIndex ) const
{
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
@@ -166,7 +166,7 @@ Index&
EllpackIndexMultimapValues< Index, Device, LocalIndex >::
operator[]( const LocalIndexType& portIndex )
{
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
@@ -180,7 +180,7 @@ const Index&
EllpackIndexMultimapValues< Index, Device, LocalIndex >::
operator[]( const LocalIndexType& portIndex ) const
{
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
+20 −20
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ void
EllpackIndexMultimap< Index, Device, LocalIndex >::
setKeysRange( const IndexType& keysRange )
{
   Assert( keysRange >= 0, );
   TNL_ASSERT( keysRange >= 0, );
   this->keysRange = keysRange;
}

@@ -77,7 +77,7 @@ bool
EllpackIndexMultimap< Index, Device, LocalIndex >::
allocate( const LocalIndexType& maxValuesCount )
{
   Assert( maxValuesCount >= 0, );
   TNL_ASSERT( maxValuesCount >= 0, );
   this->maxValuesCount = maxValuesCount;
   if( ! this->values.setSize( this->keysRange * this->maxValuesCount ) )
      return false;
@@ -94,13 +94,13 @@ bool
EllpackIndexMultimap< Index, Device, LocalIndex >::
allocate( const ValuesAllocationVectorType& valuesCounts )
{
   Assert( valuesCounts.getSize() == this->keysRange,
   TNL_ASSERT( valuesCounts.getSize() == this->keysRange,
               std::cerr << "valuesCounts.getSize() =  " << valuesCounts.getSize()
                         << "this->keysRange = " << this->keysRange
                         << std::endl; );
   this->maxValuesCount = valuesCounts.max();
 
   Assert( this->maxValuesCount >= 0,
   TNL_ASSERT( this->maxValuesCount >= 0,
               std::cerr << "this->maxValuesCount = " << this->maxValuesCount << std::endl; );
   if( ! this->values.setSize( this->keysRange * this->maxValuesCount ) )
      return false;
@@ -117,11 +117,11 @@ typename EllpackIndexMultimap< Index, Device, LocalIndex >::ValuesAccessorType
EllpackIndexMultimap< Index, Device, LocalIndex >::
getValues( const IndexType& inputIndex )
{
   Assert( inputIndex < this->getKeysRange(),
   TNL_ASSERT( inputIndex < this->getKeysRange(),
               std::cerr << "inputIndex = " << inputIndex << std::endl
                         << "this->getKeysRange() = " << this->getKeysRange()
                         << std::endl; );
   Assert( this->getKeysRange() * this->maxValuesCount == this->values.getSize() && this->getKeysRange() == this->valuesCounts.getSize(),
   TNL_ASSERT( this->getKeysRange() * this->maxValuesCount == this->values.getSize() && this->getKeysRange() == this->valuesCounts.getSize(),
               std::cerr << "The map has not been reallocated after calling setKeysRange()." << std::endl
                         << "this->getKeysRange() = " << this->getKeysRange() << std::endl
                         << "this->maxValuesCount = " << this->maxValuesCount << std::endl
@@ -137,11 +137,11 @@ typename EllpackIndexMultimap< Index, Device, LocalIndex >::ConstValuesAccessorT
EllpackIndexMultimap< Index, Device, LocalIndex >::
getValues( const IndexType& inputIndex ) const
{
   Assert( inputIndex < this->getKeysRange(),
   TNL_ASSERT( inputIndex < this->getKeysRange(),
              std::cerr << "inputIndex = " << inputIndex << std::endl
                        << "this->getKeysRange() = " << this->getKeysRange()
                        << std::endl; );
   Assert( this->getKeysRange() * this->maxValuesCount == this->values.getSize() && this->getKeysRange() == this->valuesCounts.getSize(),
   TNL_ASSERT( this->getKeysRange() * this->maxValuesCount == this->values.getSize() && this->getKeysRange() == this->valuesCounts.getSize(),
              std::cerr << "The map has not been reallocated after calling setKeysRange()." << std::endl
                        << "this->getKeysRange() = " << this->getKeysRange() << std::endl
                        << "this->maxValuesCount = " << this->maxValuesCount << std::endl
+24 −24
Original line number Diff line number Diff line
@@ -118,9 +118,9 @@ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >::
setValue( const LocalIndexType& portIndex,
          const IndexType& value )
{
   Assert( this->values,
   TNL_ASSERT( this->values,
               std::cerr << "This instance is not bound to any multimap." << std::endl; );
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
@@ -135,9 +135,9 @@ Index
StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >::
getValue( const LocalIndexType& portIndex ) const
{
   Assert( this->values,
   TNL_ASSERT( this->values,
               std::cerr << "This instance is not bound to any multimap." << std::endl; );
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
@@ -152,9 +152,9 @@ Index&
StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >::
operator[]( const LocalIndexType& portIndex )
{
   Assert( this->values,
   TNL_ASSERT( this->values,
               std::cerr << "This instance is not bound to any multimap." << std::endl; );
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
@@ -169,9 +169,9 @@ const Index&
StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >::
operator[]( const LocalIndexType& portIndex ) const
{
   Assert( this->values,
   TNL_ASSERT( this->values,
               std::cerr << "This instance is not bound to any multimap." << std::endl; );
   Assert( portIndex < this->getSize(),
   TNL_ASSERT( portIndex < this->getSize(),
               std::cerr << " portIndex = " << portIndex
                         << " getSize() = " << this->getSize()
                         << std::endl );
+15 −15
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ void
StaticEllpackIndexMultimap< ValuesCount, Index, Device, LocalIndex >::
setKeysRange( const IndexType& keysRange )
{
   Assert( keysRange >= 0, );
   TNL_ASSERT( keysRange >= 0, );
   this->keysRange = keysRange;
}

@@ -94,10 +94,10 @@ typename StaticEllpackIndexMultimap< ValuesCount, Index, Device, LocalIndex >::V
StaticEllpackIndexMultimap< ValuesCount, Index, Device, LocalIndex >::
getValues( const IndexType& inputIndex )
{
   Assert( inputIndex < this->getKeysRange(),
   TNL_ASSERT( inputIndex < this->getKeysRange(),
               std::cerr << "inputIndex = " << inputIndex << std::endl
                         << "this->getKeysRange() = " << this->getKeysRange() << std::endl; );
   Assert( this->getKeysRange() * ValuesCount == this->values.getSize(),
   TNL_ASSERT( this->getKeysRange() * ValuesCount == this->values.getSize(),
               std::cerr << "The map has not been reallocated after calling setKeysRange()." << std::endl
                         << "this->getKeysRange() = " << this->getKeysRange() << std::endl
                         << "this->values.getSize() = " << this->values.getSize() << std::endl; );
@@ -112,10 +112,10 @@ typename StaticEllpackIndexMultimap< ValuesCount, Index, Device, LocalIndex >::C
StaticEllpackIndexMultimap< ValuesCount, Index, Device, LocalIndex >::
getValues( const IndexType& inputIndex ) const
{
   Assert( inputIndex < this->getKeysRange(),
   TNL_ASSERT( inputIndex < this->getKeysRange(),
               std::cerr << "inputIndex = " << inputIndex << std::endl
                         << "this->getKeysRange() = " << this->getKeysRange() << std::endl; );
   Assert( this->getKeysRange() * ValuesCount == this->values.getSize(),
   TNL_ASSERT( this->getKeysRange() * ValuesCount == this->values.getSize(),
               std::cerr << "The map has not been reallocated after calling setKeysRange()." << std::endl
                         << "this->getKeysRange() = " << this->getKeysRange() << std::endl
                         << "this->values.getSize() = " << this->values.getSize() << std::endl; );
Loading