[Trilinos-Users] ILU IFPACK preconditioner
Heroux, Michael A
maherou at sandia.gov
Tue Oct 28 16:30:20 MDT 2008
Lucia,
The class Ifpack_Preconditioner does not have a method called L(). Although the factory you are using actually creates an Ifpack_ILU object, it is cast back to its base class Ifpack_Preconditioner. In order to get access to L, you will want to use a dynamic cast to downcast to the Ifpack_ILU object and then use the L() accessor method after that. The following code is approximately what you need:
Ifpack_ILU * iluPrec = dynamic_cast<Ifpack_ILU *>(&*Prec);
Epetra_CrsMatrix L_factor = iluPrec->L();
Mike
On 10/27/08 2:23 PM, "Lucia Mirabella" <lucia at mathcs.emory.edu> wrote:
Hi,
I am encountering a problem while trying to extract L and U factors from
ILU IFPACK preconditioner.
In my code I have a RCP pointer to an Ifpack_Preconditioner object that
is initialized using the Create method of an Ifpack object (with "ILU"
as preconditioner type argument).
"Ifpack Factory;
RCP<Ifpack_Preconditioner> Prec;
Prec = Teuchos::rcp( Factory.Create("ILU", &*B_rcp, OverlapLevel) );"
When I invoke the method L() on the Ifpack_Preconditioner object
"Epetra_CrsMatrix L_factor= Prec->L();"
I get this compiling error:
"error: 'class Ifpack_Preconditioner' has no member named 'L'"
Could you please suggest me how to solve this problem?
Thank you,
Lucia Mirabella
_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20081028/338c8eda/attachment.html
More information about the Trilinos-Users
mailing list