<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Matt, <div>The DM is created by the LibMesh code. The only thing I do directly with Petsc is set the solver prefixes which libmesh doesn't have an interface for at present . I have been able to set most options directly through command line options. this is the one case  where that is not helping, and it might just be that I don't know how. Let me see if I am able to get this working.</div><div> </div><div>Thanks, </div><div>Subramanya <br><br><div><hr id="stopSpelling">Date: Sat, 20 Jul 2013 06:07:47 -0500<br>Subject: Re: [petsc-users] Trying to set up a field-split preconditioner<br>From: knepley@gmail.com<br>To: potaman@outlook.com<br>CC: libmesh-users@lists.sourceforge.net; petsc-users@mcs.anl.gov<br><br><div dir="ltr">On Fri, Jul 19, 2013 at 11:50 PM, subramanya sadasiva <span dir="ltr"><<a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a>></span> wrote:<br><div class="ecxgmail_extra"><div class="ecxgmail_quote">
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">


<div><div dir="ltr"><br>Hi Matt, <div>I see that there is an implementation of the interface to <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateFieldDecomposition.html" target="_blank">DMCreateFieldDecomposition.html</a> .  </div>
<div>So does this sound right?</div></div></div></blockquote><div><br></div><div>Yes, that should automatically provide the field decomposition. Since this is not happening, something is</div><div>wrong in the code. Is the DM set in your solver?</div>
<div> </div><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr"><div>1. I get index sets ,and variable names from the dm create field decomposition </div>
<div>2. Once I have these , I create fieldsplits and name them using this.. </div><div>3. And I guess I should be ready to go.. </div><div>One question that remains is that the fieldsplit is created on a full matrix. However, an algorithm such as VIRS operates only on a subset of this full DM. Will the fieldsplit and preconditioner created on the full DM carry over to the subsidiary DMs?</div>
</div></div></blockquote><div><br></div><div>VI is still new, and I have not tested in this case, but it is supposed to work.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div> </div><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr"><div>Thanks for all the help!</div><div>Subramanya </div><div><br></div><div> </div><div><div><hr>Date: Fri, 19 Jul 2013 23:09:10 -0500<br>Subject: Re: [petsc-users] Trying to set up a field-split preconditioner<br>
From: <a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a><br>To: <a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a><br>CC: <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<br><div dir="ltr">On Fri, Jul 19, 2013 at 9:59 PM, subramanya sadasiva <span dir="ltr"><<a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a>></span> wrote:<br><div><div>
<blockquote style="border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">


<div><div dir="ltr">Hi Matt, <br>The DM being created is here (this is from Libmesh code <br>(petscdmlibmesh.C <span style="font-size:12pt;">) </span><br><br>   01047 { <br>   01048 PetscErrorCode ierr;<br>   01049 PetscFunctionBegin;<br>

   01050 ierr = DMCreate(comm, dm); CHKERRQ(ierr);<br>   01051 ierr = DMSetType(*dm, DMLIBMESH); CHKERRQ(ierr);<br>   01052 ierr = DMLibMeshSetSystem(*dm, sys); CHKERRQ(ierr);<br>   01053 PetscFunctionReturn(0);<br>   01054 }<br>

<br><br>This file has methods to access the  variables assigned to the DM (this seems to be stored in a struct.) <div>So , I guess one should be able to add a bit of code to create sections as you mentioned somewhere around here. </div>

</div></div></blockquote><div><br></div><div>Okay, they have their own DM. It must implement one of the interfaces for field specification. They could provide</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateFieldDecomposition.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateFieldDecomposition.html</a></div>

<div><br></div><div>or at a lower level</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateSubDM.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateSubDM.html</a></div>

<div><br></div><div>which in turn can be constructed by specifying a default PetscSection</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMSetDefaultSection.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMSetDefaultSection.html</a></div>

<div><br></div><div>    Matt</div><div> </div><blockquote style="border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;"><div><div dir="ltr">
<div>Thanks, </div><div>Subramanya <br><br><br><br><br><br>Date: Fri, 19 Jul 2013 21:33:11 -0500<br>Subject: Re: [petsc-users] Trying to set up a field-split preconditioner<br>From: <a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a><br>

To: <a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a><br>CC: <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br><br>On Fri, Jul 19, 2013 at 9:17 PM, subramanya sadasiva <<a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a>> wrote:<br>

Hi Matt, <br>I am using Libmesh so the DM stuff is actually in the background, and unfortunately the matrix doesn't have a saddle point, <br>I thought that <br><br>  -ch_solve_fieldsplit_block_size 2<br>  -ch_solve_fieldsplit_0_fields 0<br>

  -ch_solve_fieldsplit_1_fields 1<br><br>The block_size argument presumes you are using a DA. Are you?<br><br>The other two options just say select the first DM field as field 0 in this PC, and the same with the second field. The<br>

DM must inform the PC about the initial field decomposition.<br> <br>would inform the solver of the structure. If this doesn't work owing to the fact that the problem is only being solved on a section of the mesh (because of the reduced space method), I guess I will have to use the PetscSection. Does that sound right?<br>

<br>First, I think the right people to do this are the Libmesh people (we will of course help them). Second, you have not said<br>whether you are using a structured or unstructured mesh. What DM class does the solver actually see?<br>

<br>  Thanks,<br><br>      Matt<br> <br>Thanks, <br>Subramanya <br>  <br><br>Subject: Re: [petsc-users] Trying to set up a field-split preconditioner<br>From: <a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a><br>

To: <a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a><br>CC: <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>; <a href="mailto:libmesh-users@lists.sourceforge.net" target="_blank">libmesh-users@lists.sourceforge.net</a><br>

<br>On Fri, Jul 19, 2013 at 7:56 PM, subramanya sadasiva <<a href="mailto:potaman@outlook.com" target="_blank">potaman@outlook.com</a>> wrote:<br>Hi, <br>I am trying to set up a fieldsplit preconditioner for my Cahn Hilliard solver and I get the following error, <br>

<br>You have to tell the PCFIELDSPLIT about the dofs in each field. So<br><br>1) You are probably not using a DA, since it would tell it automatically<br><br>2) If you have a saddle point, you can use -pc_fieldsplit_detect_saddle_point<br>

<br>3) If none of those apply, you can set a PetscSection describing your layout to the DM for the solver.<br>     Since this is new, I suspect you will need help, so mail back.<br><br>  Thanks,<br><br>     Matt<br> <br>
<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[0]PETSC ERROR: Petsc has generated inconsistent data!<br>[0]PETSC ERROR: Unhandled case, must have at least two fields, not 0!<br>

[0]PETSC ERROR: ------------------------------------------------------------------------<br><br>These are the options that I am using, <br>-ch_solve is just a prefix. <br><br><br><br>-ch_solve_pc_type fieldsplit<br>-ch_solve_pc_fieldsplit_type schur<br>

-ch_solve_fieldsplit_block_size 2<br>-ch_solve_fieldsplit_0_field 1<br>-ch_solve_fieldsplit_1_field 0<br>-ch_solve_fieldsplit_0_ksp_type cg <br>-ch_solve_fieldsplit_0_pc_type hypre<br>-ch_solve_fieldsplit_0_pc_type_hypre boomeramg <br>

-ch_solve_fieldsplit_1_ksp_type cg<br>-ch_solve_fieldsplit_1_pc_type hypre <br>-ch_solve_fieldsplit_1_pc_type_hypre boomeramg<br><br>Any ideas?<br><br>Thanks,<br>Subramanya <span><font color="#888888"><br><br><br>
<br><br>-- <br>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<br><br><br><span class="ecxHOEnZb"><font color="#888888"><br>
-- <br>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</font></span></font></span></div><span class="ecxHOEnZb"><font color="#888888">                                           </font></span></div></div><span class="ecxHOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="ecxHOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>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
</font></span></div></div></div></div>                                        </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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
</div></div></div></div>                                          </div></body>
</html>