<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 12:58 PM, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div class="im">On Thu, Feb 21, 2013 at 12: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>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi Jed,<br>
      <br>
      The reason is that in the PFLOTRAN code we currently have some
      code like this:<br>
      <blockquote type="cite">  select case(discretization%itype)<br>
            case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)<br>
              call
DMLocalToGlobalBegin(dm_ptr%sgdm,local_vec,INSERT_VALUES,global_vec,ierr)<br>
              call
        DMLocalToGlobalEnd(dm_ptr%sgdm,local_vec,INSERT_VALUES,global_vec,ierr)<br>
           case(UNSTRUCTURED_GRID)<br>
              call
        VecScatterBegin(dm_ptr%ugdm%scatter_ltog,local_vec,global_vec,
        &<br>
                                   INSERT_VALUES,SCATTER_FORWARD,ierr)<br>
              call
        VecScatterEnd(dm_ptr%ugdm%scatter_ltog,local_vec,global_vec,
        &<br>
                                 INSERT_VALUES,SCATTER_FORWARD,ierr)<br>
          end select<br>
      </blockquote>
      where in the STRUCTURED_GRID case we have a DMDA.  In the
      UNSTRUCTURED_GRID case we have no DM, and I want to pack things
      into a DMShell so that have a DM and the various DM calls work
      (and then I can eliminate these 'select case' statements).<br>
      <br>
      (Eventually I'd like to be using more of the PETSc infrastructure
      and not even calling DMLocalToGlobalBegin(), etc., in the PFLOTRAN
      code, but that can wait a bit.)</div></div></blockquote></div><div>I would vote for DMGetLocalToGlobalMapping() etc.</div><div>That has the flexibility to be used with  DM-impl-oblivious codes.</div></div></blockquote>
<div><br></div><div>The Set is the issue at hand; and it probably belongs in DMShell as a Set/SetCreate pair like everything else in DMShell.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div>Dmitry. </div></font></span><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div bgcolor="#FFFFFF" text="#000000"><div><span><font color="#888888"><br>
      <br>
      --Richard</font></span><div><div><br>
      <br>
      <br>
      On 2/21/13 1:42 PM, Jed Brown wrote:<br>
    </div></div></div><div><div>
    <blockquote type="cite">
      <div dir="ltr">It would be natural to have a matching interface,
        but why do you need it? You're in charge of making the matrices
        and vectors so you can give them local-to-global mappings. The
        only solver that calls DMGetLocalToGlobalMapping is PCEXOTIC,
        which only works with DMDA anyway.<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Feb 21, 2013 at 12:35 PM,
          Richard Tran Mills <span dir="ltr"><<a href="mailto:rtm@eecs.utk.edu" target="_blank">rtm@eecs.utk.edu</a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Folks,<br>
            <br>
            I want to set a LocalToGlobal mapping in a DMShell object.
             Should we add a DMShell routine to do this, or just add a
            DMSetLocalToGlobalMapping() routine?<br>
            <br>
            Thanks,<br>
            Richard<span><font color="#888888"><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/%7Ermills" target="_blank">http://climate.ornl.gov/~rmills</a><br>
                <br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre cols="72">-- 
Richard Tran Mills, Ph.D.
Computational Earth Scientist      | Joint Assistant Professor
Hydrogeochemical Dynamics Team     | EECS and Earth & Planetary Sciences
Oak Ridge National Laboratory      | University of Tennessee, Knoxville
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/~rmills</a>
</pre>
  </div></div></div>

</blockquote></div></div><br><br>
</blockquote></div><br></div></div>