Re: [eigen] <xxx>PivLU::solve( diagonal matrices )

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2010/6/1 Manoj Rajagopalan <rmanoj@xxxxxxxxx>:
> Hi,
>
>   The <xxx>PivLU::solve() member seems to be implemented only for MatrixBase
> descendants.

Right.

> My PDE solver code requires calling solve on a diagonal matrix.
> One way I can think of achieving this is to call <xxx>PivLU::inverse() *
> diag-matrix. Is there a better way to achieve this?

Right now, slightly better:

lu.solve(diagmatrix.toDenseMatrix());

However, this is still not optimal. What would be really efficient
would be an optimized triangular inverse(). Then we could compute L^-1
efficiently and then use our triangular solver to compute U^-1 L^-1 =
(LU)^-1.

The usefulness of this would be far-reaching: in particular it would
give a more optimized inverse().

>
>   Would an implementation of solve for DiagonalBase<> descendants as args be
> desirable, esp. since the argument is passed as const& ?

What is desirable is an optimized triangular inversion function, as
explained above :)

That would be VERY desirable (provided that it runs faster than our
current solution of applying our triangular solver to the identity
matrix).

Cheers,
Benoit

>
> Thanks,
> Manoj
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/