<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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.)<br>
      <br>
      --Richard<br>
      <br>
      <br>
      On 2/21/13 1:42 PM, Jed Brown wrote:<br>
    </div>
    <blockquote
cite="mid:CAM9tzS=HUp2X+9ONiiRRN=rTiXJyDhwisUwLmLSRHDEJpciguQ@mail.gmail.com"
      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
              moz-do-not-send="true" 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 class="HOEnZb"><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 moz-do-not-send="true"
                  href="mailto:rmills@ornl.gov" target="_blank">rmills@ornl.gov</a>
                 V: <a moz-do-not-send="true" href="tel:865-241-3198"
                  value="+18652413198" target="_blank">865-241-3198</a>
                <a moz-do-not-send="true"
                  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 class="moz-signature" 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 class="moz-txt-link-abbreviated" href="mailto:rmills@ornl.gov">rmills@ornl.gov</a>  V: 865-241-3198 <a class="moz-txt-link-freetext" href="http://climate.ornl.gov/~rmills">http://climate.ornl.gov/~rmills</a>
</pre>
  </body>
</html>