[Trilinos-Users] Segmentation fault when using setPrecOperator and user defined preconditoner
Heroux, Michael A
maherou at sandia.gov
Tue May 30 16:05:18 EDT 2017
John,
Can you send the error output?
Mike
From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of John Jomo <john.jomo at tum.de>
Date: Monday, May 29, 2017 at 10:39 AM
To: Trilinos Users <trilinos-users at trilinos.org>
Subject: [EXTERNAL] [Trilinos-Users] Segmentation fault when using setPrecOperator and user defined preconditoner
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><mailto:john.jomo at tum.de><mailto:john.jomo at tum.de>
Internet: www.cie.bgu.tum.de<http://www.cie.bgu.tum.de><http://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/20170530/1c5817a2/attachment.html>
More information about the Trilinos-Users
mailing list