Loading src/implementation/core/tnlMultiArray2D_impl.h +6 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,11 @@ bool tnlMultiArray< 2, Element, Device, Index > :: setDimensions( const tnlTuple { tnlAssert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0, cerr << "dimensions = " << dimensions ); this -> dimensions = dimensions; /**** * Swap the dimensions in the tuple to be compatible with the previous method. */ this -> dimensions. x() = dimensions. y(); this -> dimensions. y() = dimensions. x(); return tnlArray< Element, Device, Index > :: setSize( this -> dimensions[ 1 ] * this -> dimensions[ 0 ] ); } Loading src/implementation/core/tnlMultiArray3D_impl.h +6 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,12 @@ bool tnlMultiArray< 3, Element, Device, Index > :: setDimensions( const tnlTuple { tnlAssert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0 && dimensions[ 2 ], cerr << "dimensions = " << dimensions ); this -> dimensions = dimensions; /**** * Swap the dimensions in the tuple to be compatible with the previous method. */ this -> dimensions. x() = dimensions. z(); this -> dimensions. y() = dimensions. y(); this -> dimensions. z() = dimensions. x(); return tnlArray< Element, Device, Index > :: setSize( this -> dimensions[ 2 ] * this -> dimensions[ 1 ] * this -> dimensions[ 0 ] ); Loading src/implementation/core/tnlMultiArray4D_impl.h +10 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,13 @@ bool tnlMultiArray< 4, Element, Device, Index > :: setDimensions( const tnlTuple { tnlAssert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0 && dimensions[ 2 ] && dimensions[ 3 ] > 0, cerr << "dimensions = " << dimensions ); this -> dimensions = dimensions; /**** * Swap the dimensions in the tuple to be compatible with the previous method. */ this -> dimensions[ 0 ] = dimensions[ 3 ]; this -> dimensions[ 1 ] = dimensions[ 2 ]; this -> dimensions[ 2 ] = dimensions[ 1 ]; this -> dimensions[ 3 ] = dimensions[ 0 ]; return tnlArray< Element, Device, Index > :: setSize( this -> dimensions[ 3 ] * this -> dimensions[ 2 ] * this -> dimensions[ 1 ] * Loading tools/src/tnl-view.h +11 −5 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ bool convertObject( const Mesh& mesh, return false; } if( verbose ) cout << " writing to " << outputFileName << " ... \r" << flush; cout << " writing to " << outputFileName << " ... " << flush; if( parsedObjectType[ 0 ] == "tnlSharedVector" || Loading @@ -59,7 +59,6 @@ bool convertObject( const Mesh& mesh, return false; } if( parsedObjectType[ 0 ] == "tnlMultiVector" || parsedObjectType[ 0 ] == "tnlSharedMultiVector" ) { Loading @@ -68,9 +67,16 @@ bool convertObject( const Mesh& mesh, return false; tnlGrid< Dimensions, Element, tnlHost, Index > grid; grid. setDimensions( multiVector. getDimensions() ); grid. setLowerCorner( tnlTuple< Dimensions, Element >( 0.0 ) ); grid. setUpperCorner( tnlTuple< Dimensions, Element >( 1.0 ) ); const Element spaceStep = grid. getSpaceStep(). x(); grid. setSpaceStep( tnlTuple< Dimensions, Element >( spaceStep ) ); if( ! grid. write( multiVector, outputFileName, outputFormat ) ) return false; } if( verbose ) cout << "[ OK ]."; return true; } template< typename Mesh, typename Element, typename Index > Loading Loading @@ -175,12 +181,12 @@ bool processFiles( const tnlParameterContainer& parameters ) cerr << "Unable to parse object type " << objectType << "." << endl; return false; } return setElementType< Mesh >( mesh, inputFiles[ i ], parsedObjectType, parameters ); } setElementType< Mesh >( mesh, inputFiles[ i ], parsedObjectType, parameters ); } if( verbose ) cout << endl; } } #endif /* TNL_VIEW_H_ */ src/core/tnlTuple.h +1 −1 File changed.Contains only whitespace changes. Show changes Loading
src/implementation/core/tnlMultiArray2D_impl.h +6 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,11 @@ bool tnlMultiArray< 2, Element, Device, Index > :: setDimensions( const tnlTuple { tnlAssert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0, cerr << "dimensions = " << dimensions ); this -> dimensions = dimensions; /**** * Swap the dimensions in the tuple to be compatible with the previous method. */ this -> dimensions. x() = dimensions. y(); this -> dimensions. y() = dimensions. x(); return tnlArray< Element, Device, Index > :: setSize( this -> dimensions[ 1 ] * this -> dimensions[ 0 ] ); } Loading
src/implementation/core/tnlMultiArray3D_impl.h +6 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,12 @@ bool tnlMultiArray< 3, Element, Device, Index > :: setDimensions( const tnlTuple { tnlAssert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0 && dimensions[ 2 ], cerr << "dimensions = " << dimensions ); this -> dimensions = dimensions; /**** * Swap the dimensions in the tuple to be compatible with the previous method. */ this -> dimensions. x() = dimensions. z(); this -> dimensions. y() = dimensions. y(); this -> dimensions. z() = dimensions. x(); return tnlArray< Element, Device, Index > :: setSize( this -> dimensions[ 2 ] * this -> dimensions[ 1 ] * this -> dimensions[ 0 ] ); Loading
src/implementation/core/tnlMultiArray4D_impl.h +10 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,13 @@ bool tnlMultiArray< 4, Element, Device, Index > :: setDimensions( const tnlTuple { tnlAssert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0 && dimensions[ 2 ] && dimensions[ 3 ] > 0, cerr << "dimensions = " << dimensions ); this -> dimensions = dimensions; /**** * Swap the dimensions in the tuple to be compatible with the previous method. */ this -> dimensions[ 0 ] = dimensions[ 3 ]; this -> dimensions[ 1 ] = dimensions[ 2 ]; this -> dimensions[ 2 ] = dimensions[ 1 ]; this -> dimensions[ 3 ] = dimensions[ 0 ]; return tnlArray< Element, Device, Index > :: setSize( this -> dimensions[ 3 ] * this -> dimensions[ 2 ] * this -> dimensions[ 1 ] * Loading
tools/src/tnl-view.h +11 −5 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ bool convertObject( const Mesh& mesh, return false; } if( verbose ) cout << " writing to " << outputFileName << " ... \r" << flush; cout << " writing to " << outputFileName << " ... " << flush; if( parsedObjectType[ 0 ] == "tnlSharedVector" || Loading @@ -59,7 +59,6 @@ bool convertObject( const Mesh& mesh, return false; } if( parsedObjectType[ 0 ] == "tnlMultiVector" || parsedObjectType[ 0 ] == "tnlSharedMultiVector" ) { Loading @@ -68,9 +67,16 @@ bool convertObject( const Mesh& mesh, return false; tnlGrid< Dimensions, Element, tnlHost, Index > grid; grid. setDimensions( multiVector. getDimensions() ); grid. setLowerCorner( tnlTuple< Dimensions, Element >( 0.0 ) ); grid. setUpperCorner( tnlTuple< Dimensions, Element >( 1.0 ) ); const Element spaceStep = grid. getSpaceStep(). x(); grid. setSpaceStep( tnlTuple< Dimensions, Element >( spaceStep ) ); if( ! grid. write( multiVector, outputFileName, outputFormat ) ) return false; } if( verbose ) cout << "[ OK ]."; return true; } template< typename Mesh, typename Element, typename Index > Loading Loading @@ -175,12 +181,12 @@ bool processFiles( const tnlParameterContainer& parameters ) cerr << "Unable to parse object type " << objectType << "." << endl; return false; } return setElementType< Mesh >( mesh, inputFiles[ i ], parsedObjectType, parameters ); } setElementType< Mesh >( mesh, inputFiles[ i ], parsedObjectType, parameters ); } if( verbose ) cout << endl; } } #endif /* TNL_VIEW_H_ */