[Trilinos-Users] ILU IFPACK preconditioner
Heroux, Michael A
maherou at sandia.gov
Tue Oct 28 21:12:59 MDT 2008
Lucia,
If you haven't called the Compute() method, then you could see this kind of error. Might this be the problem?
Mike
On 10/28/08 10:09 PM, "Lucia Mirabella" <lucia at mathcs.emory.edu> wrote:
Mike,
thanks for your answer. I've just tried your suggestion, but I get a
segmentation fault at runtime when I try to extract the L factor.
Do you know what causes this problem?
Thank you,
Lucia
Heroux, Michael A wrote:
> 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/b90dbede/attachment.html
More information about the Trilinos-Users
mailing list