<html 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)">
<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;}
@font-face
{font-family:Menlo;
panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
p.m-526573182846331489p1, li.m-526573182846331489p1, div.m-526573182846331489p1
{mso-style-name:m_-526573182846331489p1;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.m-526573182846331489m7795183717874518080p1, li.m-526573182846331489m7795183717874518080p1, div.m-526573182846331489m7795183717874518080p1
{mso-style-name:m_-526573182846331489m7795183717874518080p1;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.m-526573182846331489m7795183717874518080p2, li.m-526573182846331489m7795183717874518080p2, div.m-526573182846331489m7795183717874518080p2
{mso-style-name:m_-526573182846331489m7795183717874518080p2;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.m-526573182846331489m7795183717874518080p3, li.m-526573182846331489m7795183717874518080p3, div.m-526573182846331489m7795183717874518080p3
{mso-style-name:m_-526573182846331489m7795183717874518080p3;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.m-526573182846331489m7795183717874518080p4, li.m-526573182846331489m7795183717874518080p4, div.m-526573182846331489m7795183717874518080p4
{mso-style-name:m_-526573182846331489m7795183717874518080p4;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318p1, li.m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318p1, div.m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318p1
{mso-style-name:m_-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318p1;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.p1, li.p1, div.p1
{mso-style-name:p1;
margin:0cm;
background:white;
font-size:8.5pt;
font-family:Menlo;
color:black;}
p.p2, li.p2, div.p2
{mso-style-name:p2;
margin:0cm;
background:white;
font-size:8.5pt;
font-family:Menlo;
color:black;}
p.p4, li.p4, div.p4
{mso-style-name:p4;
margin:0cm;
background:white;
font-size:8.5pt;
font-family:Menlo;
color:#6C36A9;}
span.m-526573182846331489apple-converted-space
{mso-style-name:m_-526573182846331489apple-converted-space;}
span.m-526573182846331489m7795183717874518080s1
{mso-style-name:m_-526573182846331489m7795183717874518080s1;}
span.m-526573182846331489m7795183717874518080apple-converted-space
{mso-style-name:m_-526573182846331489m7795183717874518080apple-converted-space;}
span.m-526573182846331489m7795183717874518080s2
{mso-style-name:m_-526573182846331489m7795183717874518080s2;}
span.m-526573182846331489m7795183717874518080s3
{mso-style-name:m_-526573182846331489m7795183717874518080s3;}
span.m-526573182846331489m7795183717874518080s4
{mso-style-name:m_-526573182846331489m7795183717874518080s4;}
span.m-526573182846331489m7795183717874518080s5
{mso-style-name:m_-526573182846331489m7795183717874518080s5;}
span.m-526573182846331489m7795183717874518080s6
{mso-style-name:m_-526573182846331489m7795183717874518080s6;}
span.m-526573182846331489m7795183717874518080s7
{mso-style-name:m_-526573182846331489m7795183717874518080s7;}
span.m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318gmailsignatureprefix
{mso-style-name:m_-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318gmailsignatureprefix;}
span.m-526573182846331489m7795183717874518080m-968874379040273580gmailsignatureprefix
{mso-style-name:m_-526573182846331489m7795183717874518080m-968874379040273580gmailsignatureprefix;}
span.m-526573182846331489m7795183717874518080gmailsignatureprefix
{mso-style-name:m_-526573182846331489m7795183717874518080gmailsignatureprefix;}
span.m-526573182846331489gmailsignatureprefix
{mso-style-name:m_-526573182846331489gmailsignatureprefix;}
span.gmailsignatureprefix
{mso-style-name:gmail_signature_prefix;}
span.s1
{mso-style-name:s1;
color:#9B2393;}
span.s2
{mso-style-name:s2;
color:#1C00CF;}
span.s3
{mso-style-name:s3;
color:#3900A0;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.s5
{mso-style-name:s5;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1370764767;
mso-list-type:hybrid;
mso-list-template-ids:1119497532 2132828800 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
{mso-level-number-format:roman-lower;
mso-level-text:"\(%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:54.0pt;
text-indent:-36.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Thank you for your response. I will come back to the error later (for now I have it working with
</span>-pc_fieldsplit_detect_saddle_point.)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I would like to understand how I need to index while running in parallel.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">(Q1)<b> Index set (IS) for the ISLocalToGlobalMapping.</b><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="p2"><span class="apple-converted-space"> </span></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1"><b>for</b></span> (<span class="s1"><b>int</b></span> i =
<span class="s2">0</span>; i < N; i++)</p>
<p class="p1"><span class="apple-converted-space"> </span>vec_col_index[i] = i;</p>
<p class="p1"><o:p> </o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1"><b>for</b></span> (<span class="s1"><b>int</b></span> i =
<span class="s2">0</span>; i < C; i++)</p>
<p class="p1"><span class="apple-converted-space"> </span>vec_shifted_row_index[i] = i + N;<span class="apple-converted-space"> </span></p>
<p class="p1"><o:p> </o:p></p>
<p class="p2"><span class="apple-converted-space"> </span></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s3">ISLocalToGlobalMapping</span> phi_mapping, lamda_mapping;</p>
<p class="p2"><span class="apple-converted-space"> </span></p>
<p class="p4"><span class="apple-converted-space"> </span>ISLocalToGlobalMappingCreate<span class="s5">(</span>PETSC_COMM_WORLD<span class="s5">,
</span><span class="s2">1</span><span class="s5">, C, vec_shifted_row_index, </span>
PETSC_COPY_VALUES<span class="s5">, &lamda_mapping);</span></p>
<p class="p4"><span class="apple-converted-space"> </span>ISLocalToGlobalMappingCreate<span class="s5">(</span>PETSC_COMM_WORLD<span class="s5">,
</span><span class="s2">1</span><span class="s5">, N, vec_col_index, </span>PETSC_COPY_VALUES<span class="s5">, &phi_mapping);</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="margin-left:54.0pt;text-indent:-36.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="font-size:11.0pt;mso-fareast-language:EN-US"><span style="mso-list:Ignore">(i)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;mso-fareast-language:EN-US">I believe the above index set is created by all parallel processes – why then I would have to offset it with the first index of this process?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Since the mapping will always hold true and we would only use a
<u>subset</u> of this index set while populating the submatrices. I can see that I might have an over-allocated index set than necessary but I can’t see why it can be wrong.
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:54.0pt;text-indent:-36.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="font-size:11.0pt;mso-fareast-language:EN-US"><span style="mso-list:Ignore">(ii)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;mso-fareast-language:EN-US">What would be the first index of this process anyway, since at this point I haven’t declared any parallel sub-matrix or sub-vector?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">(Q2)<b> Index set (IS) while creating the submatrix</b><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1"><b>for</b></span> (<span class="s1"><b>int</b></span> i =
<span class="s2">0</span>; i < C; i++)</p>
<p class="p1"><span class="apple-converted-space"> </span>vec_row_index[i] = i;</p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">Mat</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> SubP;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">IS</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> row_isx,
col_isx;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9"> ISCreateGeneral(PETSC_COMM_WORLD, C, vec_row_index, PETSC_COPY_VALUES, &row_isx);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9"> ISCreateGeneral(PETSC_COMM_WORLD, N, vec_col_index, PETSC_COPY_VALUES, &col_isx);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9"> MatSetOption(</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">A</span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">[level],
MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">MatSetLocalToGlobalMapping</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">A</span><span style="font-size:8.5pt;font-family:Menlo;color:black">,
lamda_mapping, phi_mapping);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">MatGetLocalSubMatrix</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">A</span><span style="font-size:8.5pt;font-family:Menlo;color:black">,
row_isx, col_isx, &SubP);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I believe I will have to request a submatrix SubP of global size C x N on all processes – right? Or do you think I can still break row_isx and col_isx into parallel parts?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">(Q3)<b> Populating the submatrix<o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="background:white"><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393"> const</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">PetscInt</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> *nindices;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">PetscInt</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> count;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">ISGetIndices</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">isout</span><span style="font-size:8.5pt;font-family:Menlo;color:black">[level],
&nindices);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"> //isout is the global index of the nodes to be constrained.
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">PetscScalar</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> val =
</span><span style="font-size:8.5pt;font-family:Menlo;color:#1C00CF">1</span><span style="font-size:8.5pt;font-family:Menlo;color:black">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">for</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black"> (</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">int</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black">
irow=</span><span style="font-size:8.5pt;font-family:Menlo;color:#1C00CF">0</span><span style="font-size:8.5pt;font-family:Menlo;color:black">; irow < n; irow++)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">int</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black"> icol = nindices[irow];<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black">
</span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">MatSetValuesLocal</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(SubP,</span><span style="font-size:8.5pt;font-family:Menlo;color:#1C00CF">1</span><span style="font-size:8.5pt;font-family:Menlo;color:black">,&irow,</span><span style="font-size:8.5pt;font-family:Menlo;color:#1C00CF">1</span><span style="font-size:8.5pt;font-family:Menlo;color:black">,&icol,&val,</span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">ADD_VALUES</span><span style="font-size:8.5pt;font-family:Menlo;color:black">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:Menlo;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I do think if I have the MatGetOwnerShipRange of SubP; I will be able to parallelize the loop. Is MatGetOwnerShipRange also available for submatrices as well?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">If I have to parallelize the index sets maybe I have to reorder the above steps, can you please make a suggestion?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Karthik.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Matthew Knepley <knepley@gmail.com><br>
<b>Date: </b>Monday, 24 April 2023 at 19:24<br>
<b>To: </b>Chockalingam, Karthikeyan (STFC,DL,HC) <karthikeyan.chockalingam@stfc.ac.uk><br>
<b>Cc: </b>petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject: </b>Re: [petsc-users] Setting up a matrix for Lagrange multiplier<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">On Mon, Apr 24, 2023 at 1:58 PM Karthikeyan Chockalingam - STFC UKRI <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk"><span style="font-size:11.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:11.0pt">>
wrote:<o:p></o:p></span></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Changing the names to NULL produced the same error.
<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">This is just to make the code simpler.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Don’t I have to give the fields a name?<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">They get the default name, which is the numbering you used.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">The problem solution didn’t change from one time step to the next.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="m-526573182846331489p1"><b>[1;31m[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</b></p>
<p class="m-526573182846331489p1"><b>[0;39m[0;49m[0]PETSC ERROR: No support for this operation for this object type</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Unsupported viewer gmres</b></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">You are not completely catching the error, because it should print out the entire options database on termination.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Here it says you gave "gmres" as a Viewer, which is incorrect, but I cannot see all the options you used.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> Matt<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spelling mistake, etc!</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Option left: name:-fieldsplit_1_ksp_type value: preonly source: code</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Option left: name:-fieldsplit_1_ksp_view value: gmres source: code</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Option left: name:-fieldsplit_1_pc_type value: lu source: code</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Option left: name:-options_left (no value) source: code</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: See </b><a href="https://petsc.org/release/faq/" target="_blank"><b>https://petsc.org/release/faq/</b></a><b> for trouble shooting.</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Petsc Development GIT revision: v3.18.4-529-g995ec06f92<span class="m-526573182846331489apple-converted-space">
</span>GIT Date: 2023-02-03 18:41:48 +0000</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: /Users/karthikeyan.chockalingam/AMReX/amrFEM/build/Debug/amrFEM on a<span class="m-526573182846331489apple-converted-space">
</span>named HC20210312 by karthikeyan.chockalingam Mon Apr 24 18:51:25 2023</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: Configure options --with-debugging=0 --prefix=/Users/karthikeyan.chockalingam/AMReX/petsc --download-fblaslapack=yes --download-scalapack=yes --download-mumps=yes --with-hypre-dir=/Users/karthikeyan.chockalingam/AMReX/hypre/src/hypre</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #1 PetscOptionsGetViewer() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/sys/classes/viewer/interface/viewreg.c:309</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #2 KSPSetFromOptions() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/ksp/ksp/interface/itcl.c:522</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #3 PCSetUp_FieldSplit() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c:1054</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #4 PCSetUp() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/ksp/pc/interface/precon.c:994</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #5 KSPSetUp() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/ksp/ksp/interface/itfunc.c:405</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #6 KSPSolve_Private() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/ksp/ksp/interface/itfunc.c:824</b></p>
<p class="m-526573182846331489p1"><b>[0]PETSC ERROR: #7 KSPSolve() at /Users/karthikeyan.chockalingam/AMReX/SRC_PKG/petsc/src/ksp/ksp/interface/itfunc.c:1070</b></p>
<p class="m-526573182846331489p1"><b>End of program<span class="m-526573182846331489apple-converted-space"> </span></b></p>
<p class="m-526573182846331489p1"><span class="m-526573182846331489apple-converted-space"><b> </b></span><b>solve time 0.03416619 seconds<span class="m-526573182846331489apple-converted-space"> </span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">It will be a bit difficult for me to produce a stand-alone code.
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Thank you for your help.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"><br>
Best,<br>
Karthik.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Matthew Knepley <</span><a href="mailto:knepley@gmail.com" target="_blank"><span style="font-size:12.0pt">knepley@gmail.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Monday, 24 April 2023 at 18:42<br>
<b>To: </b>Chockalingam, Karthikeyan (STFC,DL,HC) <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:12.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Cc: </b></span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black"> <</span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>Re: [petsc-users] Setting up a matrix for Lagrange multiplier</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">On Mon, Apr 24, 2023 at 1:37 PM Karthikeyan Chockalingam - STFC UKRI <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:11.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:11.0pt">>
wrote:<o:p></o:p></span></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Great to know there is an example now.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Yes, -pc_fieldsplit_defect_saddle_point worked.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">But I would like to understand what I did wrong (and why it didn’t work).<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Can you show the error? Or give something self-contained that I can run.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">After reading many posted posts, I needed to create PCFieldSplitSetIS to split the fields.<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Yes. I would give NULL for the name here.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I set the first N indices to the field phi and the next C indices (starting from N) to the field lambda.<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">This looks fine. However, these are global indices, so this would not work in parallel. You would have to offset by<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">the first index on this process.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Matt<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Please tell me what I did wrong and how I can fix the lines which are now commented?<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:#3900A0"> PetscErrorCode ierr;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">KSP</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> ksp;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">PC</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> pc;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9"> KSPCreate(PETSC_COMM_WORLD, &ksp);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">KSPSetType</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(ksp,
</span><span style="font-size:8.5pt;font-family:Menlo;color:#643820">KSPGMRES</span><span style="font-size:8.5pt;font-family:Menlo;color:black">);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">KSPSetOperators</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(ksp,
</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">A</span><span style="font-size:8.5pt;font-family:Menlo;color:black">[level],
</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">A</span><span style="font-size:8.5pt;font-family:Menlo;color:black">[level]);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> ierr = </span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">KSPGetPC</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(ksp,&pc);</span><span style="font-size:8.5pt;font-family:Menlo;color:#643820">CHKERRQ</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(ierr);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> ierr = </span><span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9">PCSetType</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(pc,</span><span style="font-size:8.5pt;font-family:Menlo;color:#643820">PCFIELDSPLIT</span><span style="font-size:8.5pt;font-family:Menlo;color:black">);</span><span style="font-size:8.5pt;font-family:Menlo;color:#643820">CHKERRQ</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(ierr);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="m-526573182846331489m7795183717874518080p1"> </p>
<p class="m-526573182846331489m7795183717874518080p1"> ……..</p>
<p class="m-526573182846331489m7795183717874518080p1"> </p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393"> for</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black"> (</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">int</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black">
i = </span><span style="font-size:8.5pt;font-family:Menlo;color:#1C00CF">0</span><span style="font-size:8.5pt;font-family:Menlo;color:black">; i < N; i++)</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> vec_zero_field_index[i] = i;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">PetscInt</span><span style="font-size:8.5pt;font-family:Menlo;color:black"> * vec_first_field_index =
</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">NULL</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black">;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:8.5pt;font-family:Menlo;color:#643820">PetscMalloc</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(n *
</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">sizeof</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black">(</span><span style="font-size:8.5pt;font-family:Menlo;color:#3900A0">PetscInt</span><span style="font-size:8.5pt;font-family:Menlo;color:black">),
&vec_first_field_index);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> </span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">for</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black"> (</span><b><span style="font-size:8.5pt;font-family:Menlo;color:#9B2393">int</span></b><span style="font-size:8.5pt;font-family:Menlo;color:black">
i = </span><span style="font-size:8.5pt;font-family:Menlo;color:#1C00CF">0</span><span style="font-size:8.5pt;font-family:Menlo;color:black">; i < C; i++)</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:black"> vec_first_field_index[i] = N + i;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="m-526573182846331489m7795183717874518080p1"> </p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080s1"> IS</span> zero_field_isx, first_field_isx;</p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span><span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span>(<span class="m-526573182846331489m7795183717874518080s3">ISCreateGeneral</span>(<span class="m-526573182846331489m7795183717874518080s3">PETSC_COMM_WORLD</span>, N, vec_zero_field_index,
<span class="m-526573182846331489m7795183717874518080s3">PETSC_COPY_VALUES</span>, &zero_field_isx));</p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span><span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span>(<span class="m-526573182846331489m7795183717874518080s3">ISCreateGeneral</span>(<span class="m-526573182846331489m7795183717874518080s3">PETSC_COMM_WORLD</span>, C, vec_first_field_index,
<span class="m-526573182846331489m7795183717874518080s3">PETSC_COPY_VALUES</span>, &first_field_isx));</p>
<p class="m-526573182846331489m7795183717874518080p2"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span></p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = <span class="m-526573182846331489m7795183717874518080s3">PCFieldSplitSetIS</span>(pc,<span class="m-526573182846331489m7795183717874518080s4">"0"</span>,zero_field_isx);<span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span><span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span>(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = <span class="m-526573182846331489m7795183717874518080s3">PCFieldSplitSetIS</span>(pc,<span class="m-526573182846331489m7795183717874518080s4">"1"</span>,first_field_isx);<span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span><span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span>(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p2"><span class="m-526573182846331489m7795183717874518080apple-converted-space"> </span></p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = <span class="m-526573182846331489m7795183717874518080s3">PetscOptionsSetValue</span>(<span class="m-526573182846331489m7795183717874518080s5"><b>NULL</b></span>,<span class="m-526573182846331489m7795183717874518080s4">"-ksp_type"</span>,
<span class="m-526573182846331489m7795183717874518080s4">"fgmres"</span>); <span class="m-526573182846331489m7795183717874518080s2">
CHKERRQ</span>(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = <span class="m-526573182846331489m7795183717874518080s3">PetscOptionsSetValue</span>(<span class="m-526573182846331489m7795183717874518080s5"><b>NULL</b></span>,<span class="m-526573182846331489m7795183717874518080s4">"-pc_type"</span>,
<span class="m-526573182846331489m7795183717874518080s4">"fieldsplit"</span>); <span class="m-526573182846331489m7795183717874518080s2">
CHKERRQ</span>(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p1"> </p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span><span class="m-526573182846331489m7795183717874518080s6">/*</span></p>
<p class="m-526573182846331489m7795183717874518080p3"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = PetscOptionsSetValue(NULL,"-fieldsplit_0_ksp_type", "gmres"); CHKERRQ(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p3"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = PetscOptionsSetValue(NULL,"-fieldsplit_0_pc_type", "jacobi"); CHKERRQ(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p3"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = PetscOptionsSetValue(NULL,"-fieldsplit_1_ksp_type", "preonly"); CHKERRQ(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p3"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = PetscOptionsSetValue(NULL,"-fieldsplit_1_pc_type", "lu"); CHKERRQ(ierr);*/</p>
<p class="m-526573182846331489m7795183717874518080p3"> </p>
<p class="m-526573182846331489m7795183717874518080p4"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span><span class="m-526573182846331489m7795183717874518080s7">ierr = </span><span class="m-526573182846331489m7795183717874518080s3">PetscOptionsSetValue</span><span class="m-526573182846331489m7795183717874518080s7">(</span><span class="m-526573182846331489m7795183717874518080s5"><b>NULL</b></span><span class="m-526573182846331489m7795183717874518080s7">,
</span>"-pc_fieldsplit_detect_saddle_point"<span class="m-526573182846331489m7795183717874518080s7">,
</span><span class="m-526573182846331489m7795183717874518080s5"><b>NULL</b></span><span class="m-526573182846331489m7795183717874518080s7">);</span><span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span><span class="m-526573182846331489m7795183717874518080s7">(ierr);</span></p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = <span class="m-526573182846331489m7795183717874518080s3">PetscOptionsSetValue</span>(<span class="m-526573182846331489m7795183717874518080s5"><b>NULL</b></span>,
<span class="m-526573182846331489m7795183717874518080s4">"-options_left"</span>, <span class="m-526573182846331489m7795183717874518080s5">
<b>NULL</b></span>);<span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span>(ierr);</p>
<p class="m-526573182846331489m7795183717874518080p1"><span class="m-526573182846331489m7795183717874518080apple-converted-space">
</span>ierr = <span class="m-526573182846331489m7795183717874518080s3">KSPSetFromOptions</span>(ksp);
<span class="m-526573182846331489m7795183717874518080s2">CHKERRQ</span>(ierr);</p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:8.5pt;font-family:Menlo;color:#6C36A9"> KSPSolve</span><span style="font-size:8.5pt;font-family:Menlo;color:black">(ksp,
</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">b</span><span style="font-size:8.5pt;font-family:Menlo;color:black">,
</span><span style="font-size:8.5pt;font-family:Menlo;color:#326D74">x</span><span style="font-size:8.5pt;font-family:Menlo;color:black">);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="m-526573182846331489m7795183717874518080p1"> </p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Best,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Karthik.<o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Matthew Knepley <</span><a href="mailto:knepley@gmail.com" target="_blank"><span style="font-size:12.0pt">knepley@gmail.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Monday, 24 April 2023 at 17:57<br>
<b>To: </b>Chockalingam, Karthikeyan (STFC,DL,HC) <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:12.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Cc: </b></span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black"> <</span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>Re: [petsc-users] Setting up a matrix for Lagrange multiplier</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">On Mon, Apr 24, 2023 at 10:22 AM Karthikeyan Chockalingam - STFC UKRI <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:11.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:11.0pt">>
wrote:<o:p></o:p></span></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Hello,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I was able to construct the below K matrix (using submatrices P and P^T), which is of type MATAIJ
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black">K = [A P^T</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black"> P 0]</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">and solved them using a direct solver.<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I modified your example to create either AIJ or Nest matrices, but use the same assembly code:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> </span><a href="https://gitlab.com/petsc/petsc/-/merge_requests/6368" target="_blank"><span style="font-size:11.0pt">https://gitlab.com/petsc/petsc/-/merge_requests/6368</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">However, I was reading online that this is a saddle point problem and I should be employing PCFIELDSPLIT.
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Since I have one monolithic matrix K, I was not sure how to split the fields.<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">With this particular matrix, you can use<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> -pc_fieldsplit_detect_saddle_point<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">and it will split it automatically.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Matt<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Karthik.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Chockalingam, Karthikeyan (STFC,DL,HC) <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:12.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Wednesday, 19 April 2023 at 17:52<br>
<b>To: </b>Matthew Knepley <</span><a href="mailto:knepley@gmail.com" target="_blank"><span style="font-size:12.0pt">knepley@gmail.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Cc: </b></span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black"> <</span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>Re: [petsc-users] Setting up a matrix for Lagrange multiplier</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> I have declared the mapping </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> ISLocalToGlobalMapping mapping;</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, 1, n, nindices, PETSC_COPY_VALUES, &mapping);</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black">But when I use MatSetValuesLocal(), how do I know the above mapping is employed because it is not one of the parameters passed to the function?</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black">Thank you.</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black">Kind regards,</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:11.0pt;color:black">Karthik.</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Matthew Knepley <</span><a href="mailto:knepley@gmail.com" target="_blank"><span style="font-size:12.0pt">knepley@gmail.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Tuesday, 18 April 2023 at 16:21<br>
<b>To: </b>Chockalingam, Karthikeyan (STFC,DL,HC) <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:12.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Cc: </b></span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black"> <</span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>Re: [petsc-users] Setting up a matrix for Lagrange multiplier</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">On Tue, Apr 18, 2023 at 11:16 AM Karthikeyan Chockalingam - STFC UKRI <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:11.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:11.0pt">>
wrote:<o:p></o:p></span></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318p1">
Thank you for your response. I spend some time understanding how</p>
<p class="m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318p1">
MatSetValuesLocal and ISLocalToGlobalMappingCreate work.</p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">You can look at SNES ex28 where we do this with DMCOMPOSITE.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Q1) Will the matrix K be of type MATMPIAIJ or MATIS?<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black">K = [A P^T</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black"> P 0]</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I assume MPIAIJ since IS is only used for Neumann-Neumann decompositions.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Q2) Can I use both MatSetValues() to MatSetValuesLocal() to populate K? Since I have already used MatSetValues() to construct A.<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">You can, and there would be no changes in serial if K is exactly the upper left block, but in parallel global indices would change.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Q3) What are the advantages of using MatSetValuesLocal()? Is it that I can construct P directly using local indies and map the entrees to the global
index in K?<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">You have a monolithic K, so that you can use sparse direct solvers to check things. THis is impossible with separate storage.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Q4) I probably don’t have to construct an independent P matrix<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">You wouldn't in this case.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Matt<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Karthik.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Matthew Knepley <</span><a href="mailto:knepley@gmail.com" target="_blank"><span style="font-size:12.0pt">knepley@gmail.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Tuesday, 18 April 2023 at 11:08<br>
<b>To: </b>Chockalingam, Karthikeyan (STFC,DL,HC) <</span><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="font-size:12.0pt">karthikeyan.chockalingam@stfc.ac.uk</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Cc: </b></span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black"> <</span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:12.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>Re: [petsc-users] Setting up a matrix for Lagrange multiplier</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">On Tue, Apr 18, 2023 at 5:24 AM Karthikeyan Chockalingam - STFC UKRI via petsc-users <</span><a href="mailto:petsc-users@mcs.anl.gov" target="_blank"><span style="font-size:11.0pt">petsc-users@mcs.anl.gov</span></a><span style="font-size:11.0pt">>
wrote:<o:p></o:p></span></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black">Hello,</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black">I'm solving a problem using the Lagrange multiplier, the matrix has the form</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black">K = [A P^T</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black"> P 0]</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I am familiar with constructing K using MATMPIAIJ. However, I would like to know if had [A], can I augment it with [P], [P^T] and [0] of type MATMPIAIJ?
Likewise for vectors as well.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Can you please point me to the right resource, if it is a common operation in PETSc?<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">You can do this at least 2 ways:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> 1) Assemble you submatrices directly into the larger matrix by constructing local-to-global maps for the emplacement. so that you do<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> not change your assembly code, except to change MatSetValues() to MatSetValuesLocal(). This is usually preferable.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> 2) Use MATNEST and VecNEST to put pointers to submatrices and subvectors directly in.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> Matt<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Many thanks.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Karthik.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"><br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="m-526573182846331489m7795183717874518080m-968874379040273580m-4128250693350498318gmailsignatureprefix"><span style="font-size:11.0pt">--
</span></span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments
lead.<br>
-- Norbert Wiener<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank"><span style="font-size:11.0pt">https://www.cse.buffalo.edu/~knepley/</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"><br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="m-526573182846331489m7795183717874518080m-968874379040273580gmailsignatureprefix"><span style="font-size:11.0pt">--
</span></span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments
lead.<br>
-- Norbert Wiener<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank"><span style="font-size:11.0pt">https://www.cse.buffalo.edu/~knepley/</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"><br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="m-526573182846331489m7795183717874518080gmailsignatureprefix"><span style="font-size:11.0pt">--
</span></span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments
lead.<br>
-- Norbert Wiener<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank"><span style="font-size:11.0pt">https://www.cse.buffalo.edu/~knepley/</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"><br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="m-526573182846331489gmailsignatureprefix"><span style="font-size:11.0pt">--
</span></span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments
lead.<br>
-- Norbert Wiener<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank"><span style="font-size:11.0pt">https://www.cse.buffalo.edu/~knepley/</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span class="gmailsignatureprefix"><span style="font-size:11.0pt">--
</span></span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank"><span style="font-size:11.0pt">https://www.cse.buffalo.edu/~knepley/</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>