//============================================================================= int Amesos_Umfpack::NumericFactorization() { IsNumericFactorizationOK_ = false; if (IsSymbolicFactorizationOK_ == false) { // Call here what is needed, to avoid double shipping of the matrix CreateTimer(Comm(), 2); MyPID_ = Comm().MyPID(); NumProcs_ = Comm().NumProc(); AMESOS_CHK_ERR(ConvertToSerial(true)); AMESOS_CHK_ERR(ConvertToUmfpackCRS()); AMESOS_CHK_ERR(PerformSymbolicFactorization()); IsSymbolicFactorizationOK_ = true; NumSymbolicFact_++; AMESOS_CHK_ERR(PerformNumericFactorization()); } else { // need to reshuffle and reconvert because entry values may have changed AMESOS_CHK_ERR(ConvertToSerial(false)); AMESOS_CHK_ERR(ConvertToUmfpackCRS()); AMESOS_CHK_ERR(PerformNumericFactorization()); } NumNumericFact_++; IsNumericFactorizationOK_ = true; return 0; }
//============================================================================= int Amesos_Dscpack::NumericFactorization() { IsNumericFactorizationOK_ = false; if (!IsSymbolicFactorizationOK_) AMESOS_CHK_ERR(SymbolicFactorization()); AMESOS_CHK_ERR(PerformNumericFactorization()); IsNumericFactorizationOK_ = true; NumNumericFact_++; return(0); }
int Amesos_Scalapack::NumericFactorization() { if( debug_ == 1 ) std::cout << "Entering `NumericFactorization()'" << std::endl; NumNumericFact_++; iam_ = Comm().MyPID(); Epetra_RowMatrix *RowMatrixA = dynamic_cast<Epetra_RowMatrix *>(Problem_->GetOperator()); const Epetra_Map &OriginalMap = RowMatrixA->RowMatrixRowMap() ; NumGlobalElements_ = OriginalMap.NumGlobalElements(); NumGlobalNonzeros_ = RowMatrixA->NumGlobalNonzeros(); RedistributeA(); ConvertToScalapack(); return PerformNumericFactorization( ); }
//============================================================================= int Amesos_Klu::NumericFactorization() { if ( !TrustMe_ ) { IsNumericFactorizationOK_ = false; if (IsSymbolicFactorizationOK_ == false) AMESOS_CHK_ERR(SymbolicFactorization()); ResetTimer(1); // "overhead" time Epetra_CrsMatrix *CrsMatrixA = dynamic_cast<Epetra_CrsMatrix *>(RowMatrixA_); if ( CrsMatrixA == 0 ) // hack to get around Bug #1502 AMESOS_CHK_ERR( CreateLocalMatrixAndExporters() ) ; assert( NumGlobalElements_ == RowMatrixA_->NumGlobalCols() ); if ( AddZeroToDiag_ == 0 ) assert( numentries_ == RowMatrixA_->NumGlobalNonzeros() ); AMESOS_CHK_ERR( ExportToSerial() ); if ( CrsMatrixA == 0 ) { // continuation of hack to avoid bug #1502 AMESOS_CHK_ERR( ConvertToKluCRS(true) ); } else { AMESOS_CHK_ERR( ConvertToKluCRS(false) ); } OverheadTime_ = AddTime("Total Amesos overhead time", OverheadTime_, 1); } // this time is all for KLU AMESOS_CHK_ERR( PerformNumericFactorization() ); NumNumericFact_++; IsNumericFactorizationOK_ = true; return 0; }