<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:Helv;
panose-1:2 11 6 4 2 2 2 3 2 4;}
@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:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Dear PETSc Team,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">May I request your opinion of the development proposal in the following mail.
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">This work has been carried out in the framework of a PhD thesis ; besides the scientific
goals, the proposed features are intended to be integrated in the open-source software Code_Aster, a general purpose finite element solver developed at EDF R&D, in particular for nuclear safety assessment.
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">In order to ensure the perennity of the development, their integration within PETSc is crucial.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">This is why I gently request your position on their integration in PETSc. Let us know your
policy on the subject and do not hesitate to request for extra integration work if needed.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Nicolas<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="margin-left:4.35pt;border-collapse:collapse">
<tbody>
<tr>
<td width="121" rowspan="2" valign="top" style="width:90.8pt;padding:1.5pt 1.5pt 1.5pt 1.5pt">
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Helv","sans-serif";color:black"></span><span style="font-size:10.0pt;font-family:"Helv","sans-serif";color:black"><img width="110" height="60" id="Image_x0020_1" src="cid:image001.png@01D123C5.B8E415A0"> <o:p></o:p></span></p>
</td>
<td width="450" valign="top" style="width:337.15pt;padding:1.5pt 1.5pt 1.5pt 1.5pt">
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><span style="font-size:9.0pt;font-family:"Helv","sans-serif";color:black"> <o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="450" valign="top" style="width:337.15pt;padding:1.5pt 1.5pt 1.5pt 1.5pt">
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#FF8100">Nicolas Tardieu</span></b><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#FF8100"><br>
Head of the Rotating Machinery Group</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#0062E1"><o:p></o:p></span></p>
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#0062E1">EDF - R&D
</span><span lang="EN-US" style="font-size:2.0pt;font-family:"Helv","sans-serif";color:#0062E1"><br>
<o:p></o:p></span></p>
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#0062E1">nicolas.tardieu@edf.fr<o:p></o:p></span></b></p>
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#0062E1">Tél. : +33 1 47 65 39 05<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="121" valign="top" style="width:90.8pt;padding:1.5pt 1.5pt 1.5pt 1.5pt">
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Helv","sans-serif";color:black"><o:p> </o:p></span></p>
</td>
<td width="450" style="width:337.15pt;padding:1.5pt 1.5pt 1.5pt 1.5pt">
<p class="MsoNormal" style="page-break-after:avoid;text-autospace:none"><span lang="EN-US" style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#0062E1"><o:p> </o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">---------- Forwarded message ----------<br>
From: <b>Sylvain Mercier</b> <</span><a href="mailto:sylvainmercier85@gmail.com"><span lang="EN-US">sylvainmercier85@gmail.com</span></a><span lang="EN-US">><br>
Date: 2015-11-03 17:09 GMT+01:00<br>
Subject: [petsc-dev] Contribution proposal about the computation of (harmonic) Ritz pairs within GMRES<br>
To: </span><a href="mailto:petsc-dev@mcs.anl.gov"><span lang="EN-US">petsc-dev@mcs.anl.gov</span></a><span lang="EN-US"><br>
<br>
<br>
Hi everyone,<br>
<br>
During my phd thesis, I have worked on solving sequences of linear<br>
systems with slowly varying matrices using GMRES(restart). </span>In<br>
particular, I have developed a preconditioning technique to improve<br>
the action of an existing "first-level preconditioner". This new<br>
method is defined using Ritz or harmonic Ritz vectors obtained at the<br>
end of the solution of a linear system. Then I have developed two<br>
routines in PETSc (that I've called KSPSetComputeRitz and<br>
KSPComputeRitz) in order to compute the (harmonic) Ritz pairs<br>
associated to the smallest or largest (harmonic) Ritz values in<br>
modulus computed from the Hessenberg matrix of the last complete cycle<br>
in GMRES.<br>
<br>
Beyond the application to the preconditioning technique that I have<br>
developed, this routine can be used to recover approximated eigenpairs<br>
(and not only eigenvalues as already available in PETSc) of the<br>
preconditioned matrix at the end of a solution with GMRES. That is why<br>
I propose this contribution.<br>
<br>
Two new routines has been developed, similarly to the existing<br>
routines KSPSetComputeEigenvalues and KSPComputeEigenvalues.<br>
<br>
The first one is called KSPSetComputeRitz and sets a flag so that the<br>
last complete Hessenberg matrix computed with GMRES(restart) will be<br>
stored. Here is the synopsis of the current version (located in<br>
src/ksp/ksp/interface/itfunc.c)<br>
<br>
PetscErrorCode KSPSetComputeEigenvalues(KSP ksp,PetscBool flg)<br>
<br>
Input Parameters<br>
ksp - iterative context obtained from KSPCreate()<br>
flg - PETSC_TRUE or PETSC_FALSE<br>
<br>
<br>
The second routine aims at computing the Ritz or harmonic Ritz<br>
associated to the smallest or largest values in modulus. Here is the<br>
synopsis of the current version (located in<br>
src/ksp/ksp/impls/gmres/gmreig.c)<br>
<br>
PetscErrorCode KSPComputeRitz(KSP ksp,PetscBool ritz,PetscBool<br>
small,PetscInt *nrit,Vec S[],PetscReal tetar[],PetscReal tetai[])<br>
<br>
Input Parameter<br>
ksp - iterative context obtained from KSPCreate()<br>
ritz - PETSC_TRUE or PETSC_FALSE to compute Ritz pairs<br>
and harmonic Ritz pairs, respectively<br>
small - PETSC_TRUE or PETSC_FALSE to compute pairs<br>
associated to smallest or largest values in modulus, respectively<br>
<br>
Input/Output parameter<br>
n - The number of required and recovered pairs<br>
<br>
Output Parameters<br>
S[] - a multidimensional PETSc vector to store<br>
the (harmonic) Ritz vectors, provided by user with a dimension of at<br>
least n<br>
tetar - real part of computed (harmonic) Ritz values, provided<br>
by user with a dimension of at least n<br>
tetai - imaginary part of computed (harmonic) Ritz values,<br>
provided by user with a dimension of at least n<br>
<br>
This routine has been developed whithin GMRES for real-valued linear<br>
systems. Then the (harmonic) Ritz pairs are possibly complex-valued<br>
and conjugated. In this case, two successive columns of S are equal to<br>
the real and the imaginary parts of the vectors. Finally, the routine<br>
KSPSolve_GMRES (located in src/ksp/ksp/impls/gmres/gmreig.c) has been<br>
modified in order to store the Hessenberg matrix and the basis vectors<br>
of the Krylov subspace as soon as a complete cycle has been performed.<br>
<br>
To conclude, I propose to contribute to PETSc with these developments<br>
(I have followed the conventions detailed in the developer guide).<br>
Please find attached a patch and the modified files.<br>
<br>
Regards,<br>
Sylvain<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p></p>
<p><br>
Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.</p>
<p>Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.</p>
<p>Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.<br>
____________________________________________________</p>
<p>This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.</p>
<p>If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.</p>
<p>E-mail communication cannot be guaranteed to be timely secure, error or virus-free.</p></body>
</html>