<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META content="MSHTML 6.00.6000.17092" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011>Alexis,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=859533308-07042011>I
couldn't find such functionality in VTK. However, you can get the roots for
your 3x3 matrix directly. Theory here (although you may know this already): <A
href="http://en.wikipedia.org/wiki/Eigenvalue_algorithm#Eigenvalues_of_3.C3.973_matrices">http://en.wikipedia.org/wiki/Eigenvalue_algorithm#Eigenvalues_of_3.C3.973_matrices</A>.
It is what I used in the end for l2.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011>Regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011>Adriano</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=859533308-07042011></SPAN></FONT><FONT
size=2>===================================<BR><BR>Adriano Gagliardi MEng
PhD<BR>Business Sector Leader<BR>Computational Aerodynamics<BR>Aircraft Research
Association Ltd.<BR>Manton Lane<BR>Bedford<BR><BR>Tel: 01234 32 4644<BR>E-mail:
agagliardi@ara.co.uk<BR>Url: www.ara.co.uk </FONT></DIV>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> vtkusers-bounces@vtk.org
[mailto:vtkusers-bounces@vtk.org] <B>On Behalf Of </B>Alexis
Chan<BR><B>Sent:</B> 06 April 2011 20:32<BR><B>To:</B> vtkusers@vtk.org;
vis-contest-2011@freelists.org<BR><B>Subject:</B> [vtkusers] Computing
eigenvalues for asymmetric matrices &detecting complex
conjugate<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="BACKGROUND-COLOR: transparent"><SPAN>Hi<BR></SPAN><SPAN>I am trying
to compute the eigenvalue of S^2 + Omega^2 where S: strain-rate tensor and
Omega:spin tensor [1]<BR><BR></SPAN><SPAN><B>Question
1:</B></SPAN><BR><SPAN><BR>Since vtkMath::Jacobi computes the eigenvalues for a
symmetric matrix, does that mean that I have compute the eigenvalues for S
separately from the eigenvalues of Omega?<BR><BR>Is there a way to compute
eigenvalues of asymmetric matrices in VTK ? </SPAN> Should I run the Matlab
eig function using <SPAN></SPAN>vtkMatlabEngineInterface
instead?<BR><SPAN><BR>Here's how I compute S^2+Omega^2 in my modification of
vtkCellDerivatives:</SPAN><BR><SPAN><BR>else</SPAN>
<SPAN>if</SPAN><SPAN>(</SPAN><SPAN>this</SPAN><SPAN>-></SPAN><SPAN>TensorMode</SPAN>
<SPAN>==</SPAN>
<SPAN>VTK_TENSOR_MODE_COMPUTE_LAMBDA2</SPAN><SPAN>)</SPAN><SPAN>// This is not
actually Lambda2, but the tensor used for calculating lambda2</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>{</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>0</SPAN><SPAN>,</SPAN><SPAN>0</SPAN><SPAN>,</SPAN>
<SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>0</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>0</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>3</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>3</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"><SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>0</SPAN><SPAN>,</SPAN><SPAN>1</SPAN><SPAN>,</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>0</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>4</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>0</SPAN><SPAN>,</SPAN><SPAN>2</SPAN><SPAN>,</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>0</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>3</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>8</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>1</SPAN><SPAN>,</SPAN><SPAN>0</SPAN><SPAN>,</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>0</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>4</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>1</SPAN><SPAN>,</SPAN><SPAN>1</SPAN><SPAN>,</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>3</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>3</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>1</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>4</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>4</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>1</SPAN><SPAN>,</SPAN><SPAN>2</SPAN><SPAN>,</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>3</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>4</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>8</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>2</SPAN><SPAN>,</SPAN><SPAN>0</SPAN><SPAN>,</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>8</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>2</SPAN><SPAN>,</SPAN><SPAN>1</SPAN><SPAN>,</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>1</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>4</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.5</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>8</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>SetComponent</SPAN><SPAN>(</SPAN><SPAN>2</SPAN><SPAN>,</SPAN><SPAN>2</SPAN><SPAN>,</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>2</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>6</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>5</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>0.25</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>7</SPAN><SPAN>]</SPAN>
<SPAN>+</SPAN>
<SPAN>1</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>8</SPAN><SPAN>]</SPAN><SPAN>*</SPAN><SPAN>derivs</SPAN><SPAN>[</SPAN><SPAN>8</SPAN><SPAN>]);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> </DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>outTensors</SPAN><SPAN>-></SPAN><SPAN>InsertTuple</SPAN><SPAN>(</SPAN><SPAN>cellId</SPAN><SPAN>,</SPAN>
<SPAN>tens</SPAN><SPAN>-></SPAN><SPAN>T</SPAN><SPAN>);</SPAN></DIV>
<DIV
style="BACKGROUND-COLOR: transparent"> <SPAN>}<BR><BR></SPAN></DIV>full
file here: <A
href="https://github.com/alexisylchan/VTK/blob/master/Graphics/myVTKCellDerivatives.cxx"
target=_blank>https://github.com/alexisylchan/VTK/blob/master/Graphics/myVTKCellDerivatives.cxx</A><BR><BR><B>Question2:</B><BR><BR>How
do I determine if the eigenvalue returned by vtkMath::Jacobi is a real or
complex-conjugate value?<BR><BR>I would appreciate any help! Thanks.<BR><BR>[1]
<SPAN></SPAN><A
href="http://journals.cambridge.org/download.php?file=%2FFLM%2FFLM285%2FS0022112095000462a.pdf&code=b89c005d1fed041d4786ecfec8f757c2"
target=_blank>Jinhee Jeong and Fazle Hussain. On the Identification of a Vortex.
Journal of Fluid Mechanics, pages 69-94, 285 1995</A> <BR>[2] <A
href="http://citeseer.ist.psu.edu/viewdoc/summary?cid=543964"
target=_blank><SPAN
style="FONT-WEIGHT: normal; FONT-SIZE: 11pt; VERTICAL-ALIGN: baseline; COLOR: rgb(0,0,0); FONT-STYLE: normal; FONT-FAMILY: Times New Roman; BACKGROUND-COLOR: transparent; TEXT-DECORATION: none">Sujudi,D.,
and Haines,R., “Identification of Swirling Flow in 3-D Vector Fields”, Proc.
AIAA (Am. Inst. of Aeronautics and Astronautics) Computational Fluid Dynamics
Conf., American Institute of Aeronautics and Astronautics, (Reston, Va., June
1995, pp. 151-158.</SPAN></A> <BR>--
<BR>Regards,<BR>Alexis<BR><BR><p>**********************************************************************<br />This email contains information that is private and confidential and is intended only for the addressee.<br />If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br />Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br />system management and security reasons.<br />Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office:<br />Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</p><p>**********************************************************************</p>
</BODY></HTML>