<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hello, I have some concerns about the multigrid framework in PETSc.<BR>
&nbsp;<BR>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>We are trying to solve a two dimensional problem with a large variety in length scales.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The length of computational domain is in order of 1e3 m, and the width is in 1 m, nevertheless, there is a tiny object with 1e-3 m in a corner of the domain. </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>As a first thinking, we tried to solve the problem with a larger number of uniform or non-uniform grids. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>However, the error of the numerical solution increases when the number of the grid is too large.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>In order to test the effect of the grid size on the solution, a domain with regular scale of 1m by 1m was tried to solve. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>It is found that the extreme small grid size might lead to large variation to the exact solution.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>For example, the exact solution is a linear distribution in the domain. The numerical solution is linear as similar as the exact solution when the grid number is nx=1000 by ny=1000.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>However, if the grid number is nx=10000 by ny=10000, the numerical solution varies to nonlinear distribution which boundary is the only same as the exact solution.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The solver I used is a KSP solver in PETSc, which is set by calling :</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN,ierr).<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Whether this solver is not suitable to the system with small size grid? Or, whether the problem crossing 6 orders of length scale is solvable with only one level grid system when the memory is enough for large matrix? Since there is less coding work for one level grid size, it would be easy to implement the solver.</SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>I did some research work on the website and found the slides by Barry on</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman" size=3>&nbsp;</FONT></SPAN><A href="http://www.mcs.anl.gov/petsc/petsc-2/documentation/tutorials/Columbia04/DDandMultigrid.pdf"><FONT face="Times New Roman" color=#000080 size=3>http://www.mcs.anl.gov/petsc/petsc-2/documentation/tutorials/Columbia04/DDandMultigrid.pdf</FONT></A></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>It seems that the multigrid framework in PETSc is a possible approach to our problem. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>We are thinking to turn to the multigrid framework in PETSc to solve the problem.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>However, before we dig into it, there are some issues confusing us.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>It would be great if we can get any suggestion from you:</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Whether the multigrid framework can handle the problem with a large variety in length scales (up to 6 orders)? Is DMMG is the best tool for our problem? </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The coefficient matrix A and the right hand side vector b were created for the finite difference scheme of the domain and solved by KSP solver (call </FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN,ierr)</SPAN><SPAN lang=EN-US><FONT face="Times New Roman" size=3>).<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Is it easy to immigrate the created Matrix A and Vector b to the multigrid framework?</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face="Times New Roman">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>How many levels of the subgrid are needed to obtain a solution close enough to the exact solution for a problem with 6 orders in length scale?<o:p></o:p></FONT></FONT></SPAN></P>
&nbsp;<BR>                                               </body>
</html>