Loading src/matrix/Makefile.am +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ headers = \ tnlBICGStabSolver.h \ tnlGMRESSolver.h \ mPreconditioner.h \ mILUPreconditioner.h \ tnlILUPreconditioner.h \ mPETSCPreconditioner.h sources = tnlBaseMatrix.cpp Loading src/matrix/mILUPreconditioner.cpp→src/matrix/tnlILUPreconditioner.cpp +9 −9 Original line number Diff line number Diff line /*************************************************************************** mILUPreconditioner.cpp - description tnlILUPreconditioner.cpp - description ------------------- begin : 2007/02/01 copyright : (C) 2007 by Tomas Oberhuber Loading @@ -18,7 +18,7 @@ #include <assert.h> #include <math.h> #include "debug.h" #include "mILUPreconditioner.h" #include "tnlILUPreconditioner.h" #include "mfuncs.h" #ifdef ILU_DEBUG Loading @@ -41,7 +41,7 @@ void WriteFullMatrix( ostream& o_str, const m_real* M, const m_int N ) } #endif //-------------------------------------------------------------------------- mILUPreconditioner :: mILUPreconditioner( const m_int _size, tnlILUPreconditioner :: tnlILUPreconditioner( const m_int _size, const m_int initial_size, const m_int segment_size, const m_int init_row_elements ) Loading @@ -55,7 +55,7 @@ mILUPreconditioner :: mILUPreconditioner( const m_int _size, M = new tnlCSRMatrix( size, initial_size, segment_size, init_row_elements ); } //-------------------------------------------------------------------------- mILUPreconditioner :: ~mILUPreconditioner() tnlILUPreconditioner :: ~tnlILUPreconditioner() { if( M ) delete M; if( y ) delete[] y; Loading @@ -65,14 +65,14 @@ mILUPreconditioner :: ~mILUPreconditioner() #endif } //-------------------------------------------------------------------------- const tnlCSRMatrix* mILUPreconditioner :: Data() const const tnlCSRMatrix* tnlILUPreconditioner :: Data() const { return M; } //-------------------------------------------------------------------------- m_int mILUPreconditioner :: Init( const tnlCSRMatrix& A, const m_real& threshold ) m_int tnlILUPreconditioner :: Init( const tnlCSRMatrix& A, const m_real& threshold ) { dbgFunctionName( "mILUPreconditioner", "Init" ); dbgFunctionName( "tnlILUPreconditioner", "Init" ); assert( A. Size() == M -> Size() ); long int non_zero_elements( 0 ); #ifdef CSR_MATRIX_TUNING Loading Loading @@ -282,9 +282,9 @@ cout << "LU: " << ( m_real ) i / ( m_real ) size * 100.0 << " % done \r" << fl } //-------------------------------------------------------------------------- void mILUPreconditioner :: Solve( const m_real* b, m_real* x ) const void tnlILUPreconditioner :: Solve( const m_real* b, m_real* x ) const { dbgFunctionName( "mILUPreconditioner", "Solve" ); dbgFunctionName( "tnlILUPreconditioner", "Solve" ); const m_int size = M -> Size(); const tnlCSRMatrixElement* M_data; const tnlCSRMatrixRowInfo *M_rows_info; Loading src/matrix/mILUPreconditioner.h→src/matrix/tnlILUPreconditioner.h +9 −9 Original line number Diff line number Diff line /*************************************************************************** mILUPreconditioner.h - description tnlILUPreconditioner.h - description ------------------- begin : 2007/02/01 copyright : (C) 2007 by Tomas Oberhuber Loading @@ -15,8 +15,8 @@ * * ***************************************************************************/ #ifndef mILUPreconditionerH #define mILUPreconditionerH #ifndef tnlILUPreconditionerH #define tnlILUPreconditionerH #include <matrix/mPreconditioner.h> #include <matrix/tnlCSRMatrix.h> Loading @@ -24,11 +24,11 @@ //#define ILU_DEBUG template< typename T > class mILUPreconditioner : public mPreconditioner< T > template< typename T > class tnlILUPreconditioner : public mPreconditioner< T > { public: mILUPreconditioner( const long int _size, tnlILUPreconditioner( const long int _size, const long int initial_size, const long int segment_size, const long int init_row_elements = 0 ) Loading @@ -45,7 +45,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > tnlString GetType() const { T t; return tnlString( "mILUPreconditioner< " ) + tnlString( GetParameterType( t ) ) + tnlString( " >" ); return tnlString( "tnlILUPreconditioner< " ) + tnlString( GetParameterType( t ) ) + tnlString( " >" ); }; Loading @@ -56,7 +56,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > bool Init( const tnlCSRMatrix< T >& A, const T& threshold ) { dbgFunctionName( "mILUPreconditioner", "Init" ); dbgFunctionName( "tnlILUPreconditioner", "Init" ); assert( A. GetSize() == M -> GetSize() ); long int non_zero_elements( 0 ); #ifdef CSR_MATRIX_TUNING Loading Loading @@ -269,7 +269,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > bool Solve( const T* b, T* x ) const { dbgFunctionName( "mILUPreconditioner", "Solve" ); dbgFunctionName( "tnlILUPreconditioner", "Solve" ); const long int size = M -> GetSize(); const tnlCSRMatrixElement< T >* M_data; const tnlCSRMatrixRowInfo *M_rows_info; Loading Loading @@ -331,7 +331,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > return true; } ~mILUPreconditioner() ~tnlILUPreconditioner() { if( M ) delete M; if( y ) delete[] y; Loading Loading
src/matrix/Makefile.am +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ headers = \ tnlBICGStabSolver.h \ tnlGMRESSolver.h \ mPreconditioner.h \ mILUPreconditioner.h \ tnlILUPreconditioner.h \ mPETSCPreconditioner.h sources = tnlBaseMatrix.cpp Loading
src/matrix/mILUPreconditioner.cpp→src/matrix/tnlILUPreconditioner.cpp +9 −9 Original line number Diff line number Diff line /*************************************************************************** mILUPreconditioner.cpp - description tnlILUPreconditioner.cpp - description ------------------- begin : 2007/02/01 copyright : (C) 2007 by Tomas Oberhuber Loading @@ -18,7 +18,7 @@ #include <assert.h> #include <math.h> #include "debug.h" #include "mILUPreconditioner.h" #include "tnlILUPreconditioner.h" #include "mfuncs.h" #ifdef ILU_DEBUG Loading @@ -41,7 +41,7 @@ void WriteFullMatrix( ostream& o_str, const m_real* M, const m_int N ) } #endif //-------------------------------------------------------------------------- mILUPreconditioner :: mILUPreconditioner( const m_int _size, tnlILUPreconditioner :: tnlILUPreconditioner( const m_int _size, const m_int initial_size, const m_int segment_size, const m_int init_row_elements ) Loading @@ -55,7 +55,7 @@ mILUPreconditioner :: mILUPreconditioner( const m_int _size, M = new tnlCSRMatrix( size, initial_size, segment_size, init_row_elements ); } //-------------------------------------------------------------------------- mILUPreconditioner :: ~mILUPreconditioner() tnlILUPreconditioner :: ~tnlILUPreconditioner() { if( M ) delete M; if( y ) delete[] y; Loading @@ -65,14 +65,14 @@ mILUPreconditioner :: ~mILUPreconditioner() #endif } //-------------------------------------------------------------------------- const tnlCSRMatrix* mILUPreconditioner :: Data() const const tnlCSRMatrix* tnlILUPreconditioner :: Data() const { return M; } //-------------------------------------------------------------------------- m_int mILUPreconditioner :: Init( const tnlCSRMatrix& A, const m_real& threshold ) m_int tnlILUPreconditioner :: Init( const tnlCSRMatrix& A, const m_real& threshold ) { dbgFunctionName( "mILUPreconditioner", "Init" ); dbgFunctionName( "tnlILUPreconditioner", "Init" ); assert( A. Size() == M -> Size() ); long int non_zero_elements( 0 ); #ifdef CSR_MATRIX_TUNING Loading Loading @@ -282,9 +282,9 @@ cout << "LU: " << ( m_real ) i / ( m_real ) size * 100.0 << " % done \r" << fl } //-------------------------------------------------------------------------- void mILUPreconditioner :: Solve( const m_real* b, m_real* x ) const void tnlILUPreconditioner :: Solve( const m_real* b, m_real* x ) const { dbgFunctionName( "mILUPreconditioner", "Solve" ); dbgFunctionName( "tnlILUPreconditioner", "Solve" ); const m_int size = M -> Size(); const tnlCSRMatrixElement* M_data; const tnlCSRMatrixRowInfo *M_rows_info; Loading
src/matrix/mILUPreconditioner.h→src/matrix/tnlILUPreconditioner.h +9 −9 Original line number Diff line number Diff line /*************************************************************************** mILUPreconditioner.h - description tnlILUPreconditioner.h - description ------------------- begin : 2007/02/01 copyright : (C) 2007 by Tomas Oberhuber Loading @@ -15,8 +15,8 @@ * * ***************************************************************************/ #ifndef mILUPreconditionerH #define mILUPreconditionerH #ifndef tnlILUPreconditionerH #define tnlILUPreconditionerH #include <matrix/mPreconditioner.h> #include <matrix/tnlCSRMatrix.h> Loading @@ -24,11 +24,11 @@ //#define ILU_DEBUG template< typename T > class mILUPreconditioner : public mPreconditioner< T > template< typename T > class tnlILUPreconditioner : public mPreconditioner< T > { public: mILUPreconditioner( const long int _size, tnlILUPreconditioner( const long int _size, const long int initial_size, const long int segment_size, const long int init_row_elements = 0 ) Loading @@ -45,7 +45,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > tnlString GetType() const { T t; return tnlString( "mILUPreconditioner< " ) + tnlString( GetParameterType( t ) ) + tnlString( " >" ); return tnlString( "tnlILUPreconditioner< " ) + tnlString( GetParameterType( t ) ) + tnlString( " >" ); }; Loading @@ -56,7 +56,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > bool Init( const tnlCSRMatrix< T >& A, const T& threshold ) { dbgFunctionName( "mILUPreconditioner", "Init" ); dbgFunctionName( "tnlILUPreconditioner", "Init" ); assert( A. GetSize() == M -> GetSize() ); long int non_zero_elements( 0 ); #ifdef CSR_MATRIX_TUNING Loading Loading @@ -269,7 +269,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > bool Solve( const T* b, T* x ) const { dbgFunctionName( "mILUPreconditioner", "Solve" ); dbgFunctionName( "tnlILUPreconditioner", "Solve" ); const long int size = M -> GetSize(); const tnlCSRMatrixElement< T >* M_data; const tnlCSRMatrixRowInfo *M_rows_info; Loading Loading @@ -331,7 +331,7 @@ template< typename T > class mILUPreconditioner : public mPreconditioner< T > return true; } ~mILUPreconditioner() ~tnlILUPreconditioner() { if( M ) delete M; if( y ) delete[] y; Loading