void CompCol_ICPreconditioner :: init(const SparseMtrx &A) { if ( A.giveType() == SMT_SymCompCol ) { this->initialize( * ( ( SymCompCol * ) & A ) ); } else if ( A.giveType() == SMT_CompCol ) { this->initialize( * ( ( CompCol * ) & A ) ); } else { OOFEM_ERROR("unsupported sparse matrix type"); } }
void CompCol_ILUPreconditioner :: init(const SparseMtrx &A) { #ifdef TIME_REPORT Timer timer; timer.startTimer(); #endif if ( A.giveType() == SMT_CompCol ) { this->initialize( * ( ( CompCol * ) & A ) ); } else if ( A.giveType() == SMT_DynCompCol ) { this->initialize( * ( ( DynCompCol * ) & A ) ); } else { OOFEM_ERROR("unsupported sparse matrix type"); } #ifdef TIME_REPORT timer.stopTimer(); OOFEM_LOG_INFO( "ILUP: user time consumed by factorization: %.2fs\n", timer.getUtime() ); #endif }
void CompCol_ILUPreconditioner :: init(const SparseMtrx &A) { #ifdef TIME_REPORT //clock_t tstart = clock(); oofem_timeval tstart; getUtime(tstart); #endif if ( A.giveType() == SMT_CompCol ) { this->initialize( * ( ( CompCol * ) & A ) ); } else if ( A.giveType() == SMT_DynCompCol ) { this->initialize( * ( ( DynCompCol * ) & A ) ); } else { OOFEM_ERROR("CompCol_ILUPreconditioner::init : unsupported sparse matrix type"); } #ifdef TIME_REPORT oofem_timeval ut; getRelativeUtime(ut, tstart); OOFEM_LOG_INFO( "ILUP: user time consumed by factorization: %.2fs\n", ( double ) ( ut.tv_sec + ut.tv_usec / ( double ) OOFEM_USEC_LIM ) ); #endif }