Re: Cubic root finding on a grid [message #68733] |
Fri, 20 November 2009 10:38 |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
On Nov 20, 11:03 am, Luds <lud...@uvic.ca> wrote:
> Hi IDL'ers,
>
> I'm trying to find an efficient method for estimating the eigenvalues
> of a tensor which is defined on a cubic (NxNxN) grid. The tensor is a
> simple 3x3 (symmetric) matrix defined at each of the N^3 grid points,
> so the eigenvalues at a given grid point can be calculated by (for
> example) the IDL routine IMSL_ZEROPOLY simply by finding the roots of
> the cubic polynomial defined by the matrix at that point - but this
> routine doesn't handle array's of coefficients, so it has to be
> evaluated on the grid point by point.
>
> My grids are up to 512^3, so using a for-loop to compute the
> eigenvalues at each node is rather slow. Does anyone know of any
> adaptations of the IMSL_ZEROPOLY routine that can work on a grid of
> 3X3 matricies (or on an array of polynomial coefficients)?
I would suggest you write a simple routine that computes
an array of eigenvalues based upon 9 array of coefficients
of the matrices (wich in reality are only 6 for symmetric
matrices). I would also use the analytical formula for 3d
degree root solving - and symmetric matrix should guarantee
real solutions. All of that can be done vectorially and
requires just a few simple analytical step to be figured out.
Ciao,
Paolo
>
> Any suggestions would help.
>
> Best,
> Ludlow
|
|
|