Loading examples/heat-equation/heatEquationSolver.h +4 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ #include <matrices/tnlEllpackMatrix.h> #include "heatEquationSolver.h" #include <matrices/tnlSlicedEllpackMatrix.h> #include <matrices/tnlDenseMatrix.h> template< typename Mesh, typename DifferentialOperator, Loading @@ -44,7 +47,7 @@ class heatEquationSolver typedef typename DifferentialOperator::IndexType IndexType; typedef Mesh MeshType; typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; typedef tnlCSRMatrix< RealType, DeviceType, IndexType > MatrixType; typedef tnlSlicedEllpackMatrix< RealType, DeviceType, IndexType > MatrixType; typedef typename MatrixType::RowLengthsVector RowLengthsVectorType; static tnlString getTypeStatic(); Loading examples/heat-equation/heatEquationSolver_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <core/mfilename.h> #include <matrices/tnlMatrixSetter.h> #include <matrices/tnlMultidiagonalMatrixSetter.h> #include "heatEquationSolver.h" Loading Loading @@ -163,6 +164,7 @@ setupLinearSystem( const MeshType& mesh, if( ! matrix.setRowLengths( rowLengths ) ) return false; return true; //return tnlMultidiagonalMatrixSetter< Mesh >::setupMatrix( mesh, matrix ); } template< typename Mesh, Loading Loading @@ -268,8 +270,8 @@ assemblyLinearSystem( const RealType& time, b ); /*matrix.print( cout ); cout << endl << b << endl; cout << endl << u << endl;*/ //abort(); cout << endl << u << endl; abort();*/ } template< typename Mesh, Loading src/implementation/core/tnlCuda.cu +1 −0 Original line number Diff line number Diff line Loading @@ -391,5 +391,6 @@ bool tnlCuda::checkDevice( const char* file_name, int line ) break; } throw EXIT_FAILURE; return false; } src/implementation/core/vectors/tnlSharedVector_impl.h +2 −32 Original line number Diff line number Diff line Loading @@ -152,6 +152,7 @@ template< typename Real, tnlSharedVector< Real, Device, Index >& tnlSharedVector< Real, Device, Index > :: operator -= ( const Vector& vector ) { alphaXPlusBetaY( -1.0, vector, 1.0 ); return ( *this ); } template< typename Real, Loading @@ -161,40 +162,9 @@ template< typename Real, tnlSharedVector< Real, Device, Index >& tnlSharedVector< Real, Device, Index > :: operator += ( const Vector& vector ) { alphaXPlusBetaY( 1.0, vector, 1.0 ); return ( *this ); } /*template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 if( ! file. write< const Index, Device >( &this -> size ) ) #else if( ! file. write( &this -> size ) ) #endif return false; if( ! file. write< Element, Device, Index >( this -> data, this -> size ) ) { cerr << "I was not able to SAVE tnlSharedVector " << this -> getName() << " with size " << this -> getSize() << endl; return false; } return true; }; template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( const tnlString& fileName ) const { return tnlObject :: save( fileName ); };*/ template< typename Real, typename Device, typename Index > Loading src/implementation/matrices/CMakeLists.txt +5 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,11 @@ SET( headers tnlMatrix_impl.h tnlCSRMatrix_impl.h tnlMatrixReader_impl.h tnlMatrixWriter_impl.h tnlMatrixSetter_impl.h ) tnlMatrixSetter_impl.h tnlSparseMatrixRow_impl.h tnlDenseMatrixRow_impl.h tnlTridiagonalMatrixRow_impl.h tnlMultidiagonalMatrixSetter_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/implementation/matrices ) set( common_SOURCES Loading Loading
examples/heat-equation/heatEquationSolver.h +4 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ #include <matrices/tnlEllpackMatrix.h> #include "heatEquationSolver.h" #include <matrices/tnlSlicedEllpackMatrix.h> #include <matrices/tnlDenseMatrix.h> template< typename Mesh, typename DifferentialOperator, Loading @@ -44,7 +47,7 @@ class heatEquationSolver typedef typename DifferentialOperator::IndexType IndexType; typedef Mesh MeshType; typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; typedef tnlCSRMatrix< RealType, DeviceType, IndexType > MatrixType; typedef tnlSlicedEllpackMatrix< RealType, DeviceType, IndexType > MatrixType; typedef typename MatrixType::RowLengthsVector RowLengthsVectorType; static tnlString getTypeStatic(); Loading
examples/heat-equation/heatEquationSolver_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <core/mfilename.h> #include <matrices/tnlMatrixSetter.h> #include <matrices/tnlMultidiagonalMatrixSetter.h> #include "heatEquationSolver.h" Loading Loading @@ -163,6 +164,7 @@ setupLinearSystem( const MeshType& mesh, if( ! matrix.setRowLengths( rowLengths ) ) return false; return true; //return tnlMultidiagonalMatrixSetter< Mesh >::setupMatrix( mesh, matrix ); } template< typename Mesh, Loading Loading @@ -268,8 +270,8 @@ assemblyLinearSystem( const RealType& time, b ); /*matrix.print( cout ); cout << endl << b << endl; cout << endl << u << endl;*/ //abort(); cout << endl << u << endl; abort();*/ } template< typename Mesh, Loading
src/implementation/core/tnlCuda.cu +1 −0 Original line number Diff line number Diff line Loading @@ -391,5 +391,6 @@ bool tnlCuda::checkDevice( const char* file_name, int line ) break; } throw EXIT_FAILURE; return false; }
src/implementation/core/vectors/tnlSharedVector_impl.h +2 −32 Original line number Diff line number Diff line Loading @@ -152,6 +152,7 @@ template< typename Real, tnlSharedVector< Real, Device, Index >& tnlSharedVector< Real, Device, Index > :: operator -= ( const Vector& vector ) { alphaXPlusBetaY( -1.0, vector, 1.0 ); return ( *this ); } template< typename Real, Loading @@ -161,40 +162,9 @@ template< typename Real, tnlSharedVector< Real, Device, Index >& tnlSharedVector< Real, Device, Index > :: operator += ( const Vector& vector ) { alphaXPlusBetaY( 1.0, vector, 1.0 ); return ( *this ); } /*template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 if( ! file. write< const Index, Device >( &this -> size ) ) #else if( ! file. write( &this -> size ) ) #endif return false; if( ! file. write< Element, Device, Index >( this -> data, this -> size ) ) { cerr << "I was not able to SAVE tnlSharedVector " << this -> getName() << " with size " << this -> getSize() << endl; return false; } return true; }; template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( const tnlString& fileName ) const { return tnlObject :: save( fileName ); };*/ template< typename Real, typename Device, typename Index > Loading
src/implementation/matrices/CMakeLists.txt +5 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,11 @@ SET( headers tnlMatrix_impl.h tnlCSRMatrix_impl.h tnlMatrixReader_impl.h tnlMatrixWriter_impl.h tnlMatrixSetter_impl.h ) tnlMatrixSetter_impl.h tnlSparseMatrixRow_impl.h tnlDenseMatrixRow_impl.h tnlTridiagonalMatrixRow_impl.h tnlMultidiagonalMatrixSetter_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/implementation/matrices ) set( common_SOURCES Loading