Loading src/implementation/generators/functions/tnlSinWaveFunction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ template< typename Vertex, typename Device > if( XDiffOrder == 0 ) return this->amplitude * sin( this->phase + 2.0 * M_PI * x / this->waveLength ); if( XDiffOrder == 1 ) return 2.0 * M_PI / this->waveLength * this->amplitude * cos( 2.0 * M_PI * x / this->waveLength ); return 2.0 * M_PI / this->waveLength * this->amplitude * cos( this->phase + 2.0 * M_PI * x / this->waveLength ); return 0.0; } Loading @@ -110,7 +110,7 @@ template< typename Vertex, typename Device > const RealType& z = v.z(); if( XDiffOrder == 0 && YDiffOrder == 0 && ZDiffOrder == 0 ) { return this->amplitude * sin( this->phase + sqrt( x * x + y * y + z * z ) / ( M_PI * this->waveLength) ); return this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y + z * z ) / this->waveLength ); } return 0.0; } Loading src/implementation/matrices/tnlCSRMatrix_impl.h +0 −25 Original line number Diff line number Diff line Loading @@ -71,36 +71,11 @@ template< typename Real, template< typename Vector > bool tnlCSRMatrix< Real, Device, Index >::setRowLengths( const Vector& rowLengths ) { const IndexType slices = roundUpDivision( this->rows, SliceSize ); if( ! this->sliceRowLengths.setSize( slices ) || ! this->slicePointers.setSize( slices + 1 ) ) return false; IndexType row( 0 ), slice( 0 ), sliceRowLength( 0 ); /**** * Compute maximal row length in each slice */ while( row < this->rows ) { sliceRowLength = Max( rowLengths.getElement( row++ ), sliceRowLength ); if( row % SliceSize == 0 ) { this->sliceRowLengths.setElement( slice, sliceRowLength ); this->slicePointers.setElement( slice++, sliceRowLength*SliceSize ); sliceRowLength = 0; } } if( row % SliceSize != 0 ) { this->sliceRowLengths.setElement( slice, sliceRowLength ); this->slicePointers.setElement( slice++, sliceRowLength*SliceSize ); } /**** * Compute the slice pointers using the exclusive prefix sum */ this->slicePointers.setElement( slices, 0 ); this->slicePointers.computeExclusivePrefixSum(); /**** * Allocate values and column indexes Loading src/implementation/schemes/tnlFiniteDifferences_impl.h +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ Real tnlFiniteDifferences< tnlGrid< 1, Real, Device, Index, tnlIdenticalGridGeom 2.0 * function[ grid.getElementIndex( c.x() ) ] + function[ grid.getElementIndex( c.x() - 1 ) ] ) / ( hx * hx ); } } /**** Loading Loading
src/implementation/generators/functions/tnlSinWaveFunction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ template< typename Vertex, typename Device > if( XDiffOrder == 0 ) return this->amplitude * sin( this->phase + 2.0 * M_PI * x / this->waveLength ); if( XDiffOrder == 1 ) return 2.0 * M_PI / this->waveLength * this->amplitude * cos( 2.0 * M_PI * x / this->waveLength ); return 2.0 * M_PI / this->waveLength * this->amplitude * cos( this->phase + 2.0 * M_PI * x / this->waveLength ); return 0.0; } Loading @@ -110,7 +110,7 @@ template< typename Vertex, typename Device > const RealType& z = v.z(); if( XDiffOrder == 0 && YDiffOrder == 0 && ZDiffOrder == 0 ) { return this->amplitude * sin( this->phase + sqrt( x * x + y * y + z * z ) / ( M_PI * this->waveLength) ); return this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y + z * z ) / this->waveLength ); } return 0.0; } Loading
src/implementation/matrices/tnlCSRMatrix_impl.h +0 −25 Original line number Diff line number Diff line Loading @@ -71,36 +71,11 @@ template< typename Real, template< typename Vector > bool tnlCSRMatrix< Real, Device, Index >::setRowLengths( const Vector& rowLengths ) { const IndexType slices = roundUpDivision( this->rows, SliceSize ); if( ! this->sliceRowLengths.setSize( slices ) || ! this->slicePointers.setSize( slices + 1 ) ) return false; IndexType row( 0 ), slice( 0 ), sliceRowLength( 0 ); /**** * Compute maximal row length in each slice */ while( row < this->rows ) { sliceRowLength = Max( rowLengths.getElement( row++ ), sliceRowLength ); if( row % SliceSize == 0 ) { this->sliceRowLengths.setElement( slice, sliceRowLength ); this->slicePointers.setElement( slice++, sliceRowLength*SliceSize ); sliceRowLength = 0; } } if( row % SliceSize != 0 ) { this->sliceRowLengths.setElement( slice, sliceRowLength ); this->slicePointers.setElement( slice++, sliceRowLength*SliceSize ); } /**** * Compute the slice pointers using the exclusive prefix sum */ this->slicePointers.setElement( slices, 0 ); this->slicePointers.computeExclusivePrefixSum(); /**** * Allocate values and column indexes Loading
src/implementation/schemes/tnlFiniteDifferences_impl.h +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ Real tnlFiniteDifferences< tnlGrid< 1, Real, Device, Index, tnlIdenticalGridGeom 2.0 * function[ grid.getElementIndex( c.x() ) ] + function[ grid.getElementIndex( c.x() - 1 ) ] ) / ( hx * hx ); } } /**** Loading