[Trilinos-Users] Segmentation fault when using setPrecOperator and user defined preconditoner

John Jomo john.jomo at tum.de
Mon May 29 11:39:58 EDT 2017


Hallo,

I want to apply a user-defined preconditioner when using Aztec00 through 
the function setPrecOperator() but get an exception when the iterate 
function is called on my AzteC00 object. The exception seems to be 
related to a bad_cast.

Here is a code snippet.

Teuchos::ParameterList mySolverParameterlist;
mySolverParameterlist.set( "AZ_output", AZ_summary );
mySolverParameterlist.set( "AZ_tol", 1e-10 );
mySolverParameterlist.set( "AZ_conv", AZ_rhs );
mySolverParameterlist.set( "AZ_solver", AZ_cg );
mySolverParameterlist.set( "Max_Iters", 8000 );

Epetra_LinearProblem problem( A, x, b );

AztecOO solver(problem);

EpetraFECrsMatrixPtr preconditioner = 
myEpetraLinearSystem.computePreconditionerMatrix();

solver.SetParameters( mySolverParameterlist );
solver.SetPrecOperator( preconditioner );
solver.Iterate( mySolverParameterlist.get("Max_Iters",100), 
mySolverParameterlist.get( "AZ_tol",1e-8) );


I tried following the advice in the AzteC00 examples or in the following 
thread

_https://trilinos.org/pipermail/trilinos-users/2016-January/005276.html_


My user defined Preconditioner is an algebraic preconditoner which I 
store as a Epetra_FECrsMatrix. I compute the values of the 
preconditioner in the function computePreconditionerMatrix() and call 
FillComplete when finished.

A Epetra_FECrsMatrix should be a Epetra_Operator so I do not see why 
code doesn't work. Is there anything I am missing?

Thanks for the help.


bests,


John


-- 
John Jomo M.Sc.
Technische Universität München
Computation in Engineering
Simulation in Applied Mechanics - SAM
Arcisstraße 21
80333 München
Tel.:     0049 / 89 / 289 25064
Fax:      0049 / 89 / 289 25051
E-Mail:   john.jomo at tum.de<mailto:john.jomo at tum.de>
Internet: www.cie.bgu.tum.de<http://www.cie.bgu.tum.de/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170529/507ba312/attachment.html>


More information about the Trilinos-Users mailing list