Hi Josef,<br><br>The answers to your questions are inlined<br><br><div class="gmail_quote">On Wed, May 14, 2008 at 3:25 AM, Josef Stöckl <<a href="mailto:josef.stoeckl@uibk.ac.at">josef.stoeckl@uibk.ac.at</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>
<br>
I'm having a small problem with the Multigrid solver or the Gravity Multigrid unit respectively. According to the manual, the supported boundary conditions for the Multigrid gravity unit are "periodic, Dirichlet, given-value, and isolated". However, when I try to use any value other than periodic or isolated for the "grav_boundary_type", I get the following error message: </blockquote>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Gravity_init: unrecognized or unsupported gravity boundary type<br>
<br>
Looking at Gravity_init.F90 one can see that the routine only allows isolated or periodic at the moment. So I'm wondering if the other boundary conditions are still to be implemented or if there is any version with those enabled available?</blockquote>
<div>There is implementation for Dirichlet and Neumann boundary conditions, but they have never been used by any setup in FLASH,<br>so they haven't been tested as thoroughly as we'd like. You can enable them by modifying the Gravity_init routine.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
I also wonder, if it is possible to have independent boundary conditions for the Hydro, Gravity and Particles units? So far I have found that the [xyz][lr]_boundary_type controls the overall boundary conditions for the Hydro, but the gravity part of the Hydro is controlled by grav_boundary_type (which makes a lot of sense). In gr_hgMapBcType.F90 of the Multigrid solver however only very few of the possible combinations of these two settings are handled. So I'm wondering, if it would be possible to extend this to handle those settings more independently/generally or if there were some problems arising when adapting this routine to accept more cases?<br>

<br>
Would it require a great change in the MG solver to e.g. combine a Hydro "outflow" (or inflow) condition, so that material with low density and temperature can come in and out of the computational domain, with a gravity "periodic" condition?</blockquote>
<div><br>Gravity and Hydro first; you can combine all available Hydro boundaries with Gravity boundaries as long as neither is periodic. <br>This is a current paramesh limitation where  if boundary conditions for the mesh are specified as periodic, control is never<br>
passed to the user. And there is no way of specifying different boundary conditions for different data structures. You can extend<br>the possible combinations of other boundary types by getting rid of the test for the mesh boundary conditions in gr_hgMapBcType.<br>
Specifically the outer case statement that checks for bcTypeFromGrid. We are looking at the possibility of enabling periodic <br>boundary conditions in multigrid even when the mesh has some other boundary conditions. That may take a little time because<br>
it is non-trivial. <br><br>As for the particles, it will be relatively easy to do in terms of the code since they are not moved by paramesh at all. We can <br>modify the code where by default particles get the boundary conditions from the grid, but have a combination of runtime<br>
parameters, one that specifies that grid boundaries should be overridden, and then six more to specify the actual conditions.<br>Please let me know how urgently you need this capability, we will respond accordingly.<br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Thanks in advance and best regards,<br><font color="#888888">
<br>
Josef<br>
</font></blockquote></div><br>Anshu<br>