<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&#39;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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</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>-&gt;</span><span>InsertTuple</span><span>(</span><span>cellId</span><span>,</span> <span>tens</span><span>-&gt;</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&amp;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-size: 11pt; font-family: Times New Roman; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;">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>