<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Matt,</p>
    <p>Thanks for the rapid response.  The reason I want to ensure I
      have a DMDA is that this is a custom gradient function, the
      results of which are meaningless for anything but a regular grid.
      I would rather raise an exception upfront with the user than allow
      the program to continue with garbage data.</p>
    <p>Phil<br>
    </p>
    <div class="moz-cite-prefix">On 25/09/18 11:55, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4Gn9xBC=PmBLy4mfqwc-YmaWiZXA7wop9Pr52JYq=EwhEA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div dir="ltr">
          <div class="gmail_quote">
            <div dir="ltr">On Tue, Sep 25, 2018 at 6:49 AM Phil Tooley
              <<a href="mailto:phil.tooley@sheffield.ac.uk"
                moz-do-not-send="true">phil.tooley@sheffield.ac.uk</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">Hi all,<br>
              <br>
              Given a vector I know I can get an associated DM (if there
              is one) by<br>
              calling VecGetDM, but I need to also be able to check that<br>
              <br>
              a) the vector is the localvector of that DM rather than
              the global<br>
            </blockquote>
            <div><br>
            </div>
            <div>Get a local vector from the DM and check the sizes.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              b) the DM is a DMDA rather than some other subclass<br>
            </blockquote>
            <div><br>
            </div>
            <div>You can do this (PetscObjectTypeCompare), but it is not
              recommended. Why would</div>
            <div>you want to do that?</div>
            <div><br>
            </div>
            <div>  Thanks,</div>
            <div><br>
            </div>
            <div>     Matt</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              I can't immediately see routines that do what I need, but
              I am likely<br>
              missing something obvious. Is there a way to achieve the
              above?<br>
              <br>
              Thanks<br>
              <br>
              Phil<br>
              <br>
              -- <br>
              Phil Tooley<br>
              Research Software Engineering<br>
              University of Sheffield<br>
              <br>
            </blockquote>
          </div>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div dir="ltr" class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>What most experimenters take for granted
                        before they begin their experiments is
                        infinitely more interesting than any results to
                        which their experiments lead.<br>
                        -- Norbert Wiener</div>
                      <div><br>
                      </div>
                      <div><a
                          href="http://www.cse.buffalo.edu/%7Eknepley/"
                          target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Phil Tooley
Research Software Engineering
University of Sheffield</pre>
  </body>
</html>