<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 26, 2017 at 11:49 PM, Adrian Croucher <span dir="ltr"><<a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>hi Matt,<br>
    </p>
    <br>
    <div class="m_-7839243264287290777moz-cite-prefix">On 25/09/17 23:12, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote"><br>
            <div>If you truly need the exact same SF for your grid, you
              should be able to use DMGet/SetPointSF() since it will
              just reference count it for you. Then</div>
            <div>the default SF is created automatically from the point
              SF. Does this work?</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    It doesn't seem to work, unfortunately. If I run in parallel I get
    an error on each processor like this:<br>
    <br>
    [0]PETSC ERROR: Nonconforming object sizes<br>
    [0]PETSC ERROR: SF roots 447 < pEnd 543<br>
    [0]PETSC ERROR: See
    <a class="m_-7839243264287290777moz-txt-link-freetext" href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/faq.html</a> for trouble
    shooting.<br>
    [0]PETSC ERROR: Petsc Development GIT revision:
    v3.7.6-5886-gc423942  GIT Date: 2017-06-28 18:43:52 -0500<br>
    [0]PETSC ERROR: test_all on a linux-gnu-c-opt named en-354401 by
    acro018 Wed Sep 27 16:31:28 2017<br>
    [0]PETSC ERROR: Configure options --with-x --download-hdf5
    --download-netcdf --download-exodusii --downloa<br>
    d-triangle --download-ptscotch --download-chaco
    --download-hypre              <wbr>                           <br>
    [0]PETSC ERROR: #1 PetscSectionCreateGlobalSectio<wbr>n() line 929 in
    /home/acro018/software/PETSc/<wbr>code/src/vec<br>
/is/utils/vsectionis.c        <wbr>                              <wbr>                              <wbr>              
    <br>
    [0]PETSC ERROR: #2 DMGetDefaultGlobalSection() line 3458 in
    /home/acro018/software/PETSc/<wbr>code/src/dm/inter<br>
face/dm.c                     <wbr>                              <wbr>                              <wbr>              
    <br>
    [0]PETSC ERROR: #3 User provided function() line 0 in User file<br>
    <br>
    The reason I thought just copying the SF across might work is that
    the partition ghost cells in my modified DMPlex should be in the
    same locations (DMPlex points) as they were in the original DMPlex.
    My understanding was that the SF just stores the root corresponding
    to a leaf (ghost point?) on the current processor, so those ought to
    be unchanged. But maybe there are subtleties about the SF stuff that
    I don't yet understand.<br>
    <br>
    What I am doing is adding new points for the dual-porosity mesh into
    my modified DMPlex. I have added the new cells after the partition
    ghost cells, and before the boundary ghost cells (and similarly for
    other depth strata). So I have shifted the locations of the boundary
    ghost cells, but not the partition ghost cells. I give the new
    points the appropriate depth label values so that the depth stratum
    bounds are updated correctly. I also shift the end_interior value
    for each depth stratum, so that code relying on
    DMPlexGetHybridBounds() should still work.<br>
    <br>
    Would you expect copying the SF to work in this case?</div></blockquote><div><br></div><div>Okay, I think this should be easy to solve.</div><div><br></div><div>First a little bit about SF. There are two parts to the specification. You have the communication part, which maps</div><div>a certain location p on this process to another location q on another process. This might not change for you. The</div><div>second part just tells it how big the data array is (numRoots), which is the thing that the locations in the communication</div><div>part index into.</div><div><br></div><div>So my question is, where did you put the numbers for the points you added? Are they after all points, or only after the old cells?</div><div>I think you can easily create the new SF using the info from SFGetGraph().</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><span class="HOEnZb"><font color="#888888"><br>
    - Adrian<br>
    <pre class="m_-7839243264287290777moz-signature" cols="72">-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: <a class="m_-7839243264287290777moz-txt-link-abbreviated" href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>
tel: <a href="tel:+64%209-923%204611" value="+6499234611" target="_blank">+64 (0)9 923 4611</a>
</pre>
  </font></span></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>