<div dir="ltr">On Tue, Mar 19, 2013 at 9:54 PM, Richard Tran Mills <span dir="ltr"><<a href="mailto:rtm@eecs.utk.edu" target="_blank">rtm@eecs.utk.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Barry,<br>
<br>
What we call the "natural" ordering in PFLOTRAN is what is referred to as the "application" ordering in PETSc parlance. In the structured grid case this "application" ordering is the natural ordering used by the DMDA routines like DMDANaturalToGlobalBegin()/<u></u>End(), and in the unstructured case it is whatever ordering was used to assign cell IDs when the unstructured grid was created. Rather than having code for two cases, I would prefer to be able to just call DMNaturalToGlobalBegin()/End() for either case. I do realize, of course, that for the DMDA case there is always a default meaning for the "natural" ordering, whereas for the case of a general DM the notion of "natural" will be application dependent and will have to be specified by user code (which I'd like to do in this case by having a DMShellSetNaturalToGlobalVecSc<u></u>atter()).<br>
<br>
Obviously, there may be subtypes of DM for which no "natural to global" operation makes sense. </blockquote><div><br></div><div style>At the type level, adding something to base DM is an assertion that it makes sense with all DMs. Even a local space does not strictly make sense in DM (some problems are dense, in which case the "local" space would be everything, which is likely a poor representation for the operator).</div>
<div style><br></div><div style>So I would be reluctant to add the Natural concept since it does not make sense with all DMs. What do you do with the natural vector coming out of here? Why is it easier to implement dispatch in DM rather than in your code?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> What I'm saying is that I nonetheless would like to have a general DMNaturalToGlobalBegin()/End() that will do the appropriate thing if it makes sense for that DM and complain otherwise. I guess this is a question of what the PETSc philosophy is regarding such things. I note that there is at least one example of a current DMDA method that ought to just be a DM one: I don't see why we should have DMDALocalToLocalBegin()/End() and not just DMLocalToLocalBegin()/End(), and I'd like to go ahead and change this. But LocalToLocal makes sense for lots of DMs, and NaturalToGlobal may not.<span class="HOEnZb"><font color="#888888"><br>
<br>
--Richard</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 3/7/13 10:51 PM, Barry Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mar 7, 2013, at 9:46 PM, Richard Tran Mills <<a href="mailto:rtm@eecs.utk.edu" target="_blank">rtm@eecs.utk.edu</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Continuing on my quest to be able to wrap all of the unstructured grid operations in PFLOTRAN inside a DM: Would it be OK to add DMGlobalToNaturalBegin()/End() and DMNatualToGlobalBegin()/End()? These are currently DMDA routines, not DM ones. We do something that we call natural-to-global and global-to-natural operations with our unstructured grid cases in PFLOTRAN (though I'm not sure if "natural" is quite the thing to call it... I always think of that in terms of a structured grid layout). I would like to just call DMGlobalToNaturalBegin()/End()<u></u>, etc., on our DM, whether it is a DMDA or a DMShell.<br>
<br>
I had already mentioned that I plan to add DM interface routines for local-to-local operations. I am thinking that global-to-natural, etc., also ought to be added, though I'm not sure if the concept of "natural" ordering necessarily makes sense in some cases.<br>
</blockquote>
What does natural mean for you on anything but a DA in what you do with pflotran? Once we all understand than we can come up with ideas on how that fits with DM.<br>
<br>
Barry<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--Richard<br>
<br>
-- <br>
Richard Tran Mills, Ph.D.<br>
Computational Earth Scientist | Joint Assistant Professor<br>
Hydrogeochemical Dynamics Team | EECS and Earth & Planetary Sciences<br>
Oak Ridge National Laboratory | University of Tennessee, Knoxville<br>
E-mail: <a href="mailto:rmills@ornl.gov" target="_blank">rmills@ornl.gov</a> V: <a href="tel:865-241-3198" value="+18652413198" target="_blank">865-241-3198</a> <a href="http://climate.ornl.gov/~rmills" target="_blank">http://climate.ornl.gov/~<u></u>rmills</a><br>
<br>
</blockquote></blockquote>
<br>
<br>
-- <br>
Richard Tran Mills, Ph.D.<br>
Computational Earth Scientist | Joint Assistant Professor<br>
Hydrogeochemical Dynamics Team | EECS and Earth & Planetary Sciences<br>
Oak Ridge National Laboratory | University of Tennessee, Knoxville<br>
E-mail: <a href="mailto:rmills@ornl.gov" target="_blank">rmills@ornl.gov</a> V: <a href="tel:865-241-3198" value="+18652413198" target="_blank">865-241-3198</a> <a href="http://climate.ornl.gov/~rmills" target="_blank">http://climate.ornl.gov/~<u></u>rmills</a><br>
<br>
</div></div></blockquote></div><br></div></div>