[Trilinos-Users] Anasazi Block Krylov Schur Trouble With
Preconditioners
Davood Ansari
david.ansari at gmail.com
Mon Feb 25 20:51:47 MST 2008
*Hi everyone
Well, I am trying to modify the example with Anasazi BKS to fit into my
problem.
The major change I am making is that I use ifpack preconditioner other than
that
of the example ( BlockKrylovSchurEpetraExGenAztecOO.cpp ). The issue is
that the code numerically fails when any preconditioner other than that of
the original
code ( BlockKrylovSchurEpetraExGenAztecOO.cpp ) is used. The error message
is
as:*
Aztec status AZ_ill_cond: GMRES hessenberg ill-conditioned
Error! Caught exception in BlockKrylovSchur::iterate() at iteration 1
std::exception
terminate called after throwing an instance of 'Anasazi::OperatorError'
what(): /opt/Trilinos/Parallel/include/AnasaziEpetraAdapter.hpp:792:
Throw number = 1
Throw test that evaluated to true: Op.Apply( x, y ) != 0
Error in Epetra_Operator::Apply()!
*For the above case I had used the following chunk of code to build my
preconditioner: (I have also tried
preconditioners form ifpack's factory class )
*
Teuchos::RCP<Ifpack_IlukGraph> IlukGraph;
Teuchos::RCP<Ifpack_CrsRiluk> ILUK;
// This block examaplifies the use of Ifpack (without using the Factory
class) derived from example progrma from Michael A. Heroux
if (prec_ilu_fill>-1)
{
Epetra_Time timer(Comm);
double elapsed_time = timer.ElapsedTime();
IlukGraph = Teuchos::rcp( new Ifpack_IlukGraph((*A).Graph(),
prec_ilu_fill, prec_ptn_overlap) );
assert(IlukGraph->ConstructFilledGraph()==0);
ILUK = Teuchos::rcp( new Ifpack_CrsRiluk(*IlukGraph) );
ILUK->SetAbsoluteThreshold(prec_abs_tresh);
ILUK->SetRelativeThreshold(prec_rel_tresh);
int initerr = ILUK->InitValues(*A);
if (initerr!=0) cout << Comm << "InitValues error = " << initerr;
assert(ILUK->Factor()==0);
elapsed_time = timer.ElapsedTime() - elapsed_time;
if(rank == 0)
{
cout << " done." << std::endl;
cout << "\tTime to construct " << prec_type << " preconditioner:
" << elapsed_time << "sec."<<endl;
}
}
*The original code, however, uses the following chunk to build the
preconditioner:
* Teuchos::RCP<Ifpack_CrsIct> ICT;
ICT = Teuchos::rcp( new Ifpack_CrsIct(*A, prec_drop_tol, prec_ilut_fill)
);
ICT->SetAbsoluteThreshold(prec_abs_tresh);
ICT->SetRelativeThreshold(prec_rel_tresh);
int initerr = ICT->InitValues(*A);
if (initerr != 0) cout << "\tInitValues error = " << initerr ;
int info = ICT->Factor();
assert( info==0 );
if (rank==0)
{
bool transA = false;
double Cond_Est;
ICT->Condest(transA, Cond_Est);
cout << "\tCondition number estimate for this preconditoner = " <<
Cond_Est << endl;
}
*Any idea why should other preconditioners (or even ICT made through the
ifpack factory) should lead to this failure ?
Yours
Davood
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080226/daa45cc0/attachment-0001.html
More information about the Trilinos-Users
mailing list