<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>hi Matt,<br>
</p>
<br>
<div class="moz-cite-prefix">On 25/09/17 23:12, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4GkB9Sgtn9ho=JiT0Vxn9GN_5n6sDaoP8n4gXfy-ndzA6w@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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="moz-txt-link-freetext" href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/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 <br>
[0]PETSC ERROR: #1 PetscSectionCreateGlobalSection() line 929 in
/home/acro018/software/PETSc/code/src/vec<br>
/is/utils/vsectionis.c
<br>
[0]PETSC ERROR: #2 DMGetDefaultGlobalSection() line 3458 in
/home/acro018/software/PETSc/code/src/dm/inter<br>
face/dm.c
<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?<br>
<br>
- Adrian<br>
<pre class="moz-signature" cols="72">--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: <a class="moz-txt-link-abbreviated" href="mailto:a.croucher@auckland.ac.nz">a.croucher@auckland.ac.nz</a>
tel: +64 (0)9 923 4611
</pre>
</body>
</html>