[Trilinos-Users] ILU IFPACK preconditioner

Heroux, Michael A maherou at sandia.gov
Wed Oct 29 10:33:39 MDT 2008


Lucia,

Sorry, I should have been more careful with my advice.  The Ifpack Factory actually returns a pointer of type Ifpack_AdditiveSchwarz<Ifpack_ILU>.  In this class, there is a method called Inverse() that returns a pointer to Ifpack_ILU object.  Hopefully, this should work well for you.

Mike


On 10/29/08 10:32 AM, "Lucia Mirabella" <lucia at mathcs.emory.edu> wrote:

Hi,

thanks to a Simone Deparis' suggestion, I discovered that the result of
the dynamic cast is a null pointer... so maybe that's the problem, but I
still don't know why it happens...

thanks for your help,

Lucia



lucia at mathcs.emory.edu wrote:
> Hi Mike,
>
>
>> If you haven't called the Compute() method, then you could see this kind
>> of error.  Might this be the problem?
>>
>
> actually I did call the Compute() method. Please find attached the whole
> piece of code I'm trying to compile & run
>
> "
> std::string PrecType = "ILU";
>
> int OverlapLevel = 1;
>
> Prec = Teuchos::rcp( Factory.Create(PrecType, &*B_rcp, OverlapLevel) );
>
> ifpackList.set("fact: drop tolerance", drop_tol_IFPACK);
>
> ifpackList.set("fact: level-of-fill", 1);
>
> Prec->SetParameters(ifpackList);
>
> Prec->Initialize();
>
> Prec->Compute();
>
> Ifpack_ILU * Prec_ILU = dynamic_cast<Ifpack_ILU *>(&*Prec);
>
> Epetra_CrsMatrix L_factor= Prec_ILU->L();
>
> //^^^ here I get the segfault
> "
>
> many thanks again for your help
>
> Lucia
>
>
>
>

_______________________________________________
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/20081029/5e2a40ec/attachment.html 


More information about the Trilinos-Users mailing list