<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Jordi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Testing symmetry is fairly straightforward.  Here is an example function from the HPCG Benchmark code: 
<a href="https://github.com/hpcg-benchmark/hpcg/blob/master/src/TestSymmetry.cpp">
https://github.com/hpcg-benchmark/hpcg/blob/master/src/TestSymmetry.cpp</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Testing positive definiteness is more challenging.  There is a version of the conjugate gradients method in AztecOO that produces an estimate of the condition number of the matrix, which, for an SPD matrix, is the ratio of the max and min
 eigenvalues.  I am not sure if or how it would work if the matrix is indefinite.  Selecting this solver is straightforward if you are already using AztecOO.  See this PDF and search on condnum: 
<a href="https://trilinos.github.io/pdfs/Trilinos4.0Tutorial.pdf">https://trilinos.github.io/pdfs/Trilinos4.0Tutorial.pdf</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Note that this will produce a condition estimate for the preconditioned matrix, if you are using preconditioning.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sorry there is nothing easier.  In general, we tend to know from the properties of our problems whether or not a matrix is symmetric, positive definite or both, so we don’t provide turnkey ways to test for these properties.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Mike<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Trilinos-Users <trilinos-users-bounces@trilinos.org> on behalf of Sivasankaran Rajamanickam <srajama@sandia.gov><br>
<b>Date: </b>Wednesday, December 18, 2019 at 1:49 PM<br>
<b>To: </b>Jordi Font I Reverter <jordi.font.i@upc.edu>, Trilinos Users <trilinos-users@trilinos.org><br>
<b>Subject: </b>Re: [Trilinos-Users] [EXTERNAL] Question about boolean inside Trillinos to know if a matrix is symmetric positive-definite<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p>​Jordi<o:p></o:p></p>
<p>  We do not have such a Boolean function.<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>-Siva<o:p></o:p></p>
<p><o:p> </o:p></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="color:#212121">
<hr size="0" width="100%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Trilinos-Users <trilinos-users-bounces@trilinos.org> on behalf of Jordi Font I Reverter <jordi.font.i@upc.edu><br>
<b>Sent:</b> Wednesday, December 18, 2019 9:54 AM<br>
<b>To:</b> trilinos-users@trilinos.org<br>
<b>Subject:</b> [EXTERNAL] [Trilinos-Users] Question about boolean inside Trillinos to know if a matrix is symmetric positive-definite</span><span style="color:#212121">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">Greetings.<br>
<br>
My name is Jordi Font and I am a Ph.D. student in the Universitat Politècnica de Catalunya (Spain) under the supervision of Marino Arroyo. We perform numerical simulations of biological dynamics and we are currently developing a High-Performance library for
 Finite Element Methods. We are interested in using Amesos, Amesos2, AztecOO and Belos to solve the sparse linear systems derived from such numerical methods.<br>
<br>
I would like to ask you if there is any boolean function inside any of these four packages (or another one provided by Trillinos) that returns if the matrix from the LHS is symmetric positive-definite or not.<br>
<br>
Thankfully,<br>
Jordi Font <o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>