<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 18-11-29 06:13 PM, Matthew Knepley
wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4Gn9+1R8zGBcs01Rt0TJOUU2CpYpwBbKw7OxQf3dXZ82mA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Thu, Nov 29, 2018 at 7:40 PM Danyang Su via
petsc-maint <<a moz-do-not-send="true"
href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Dear PETSc
developers & users,<br>
<br>
Sorry to bother you again. I just encounter some
difficulties in DMPlex <br>
global to natural order. This is not the very necessary
function in my <br>
code. But it's best to have it in case someone wants to feed
code with <br>
initial conditions or parameters from external file using
natural ordering.<br>
<br>
First I tried to use DmPlexGetVertexNumbering which seems
pretty <br>
straightforward, but I always get error saying "You need a
ISO C <br>
conforming compiler to use the glibc headers". I use
Gfortran on Linux.<br>
<br>
Then I switched to use Label to save global-natural order
before <br>
distributing the mesh, everything works fine. The only
problem is that <br>
it takes a very long time during mesh distribution when the
size of mesh <br>
is very big.<br>
<br>
Finally I tried to use GlobalToNatural ordering. Set Natural
order to <br>
TRUE before calling DMPlexDistribute and then call
DMPlexSetMigrationSF. <br>
However, the function DMPlexGlobalToNaturalEnd seems doing
nothing as <br>
the returned vector is always unchanged. I got some help
from Josh who <br>
has done similar work before. But I still cannot figure out
what is <br>
wrong in the code.<br>
</blockquote>
<div><br>
</div>
<div>Can you run the example that Blaise recommended?
Sometimes its easiest to start</div>
<div>with an example and change it into your code.</div>
</div>
</div>
</blockquote>
I cannot compile ex26 due to missing exodusII.h file. Error
information is<br>
make ex26<br>
/home/dsu/Soft/PETSc/petsc-3.10.2/linux-gnu-dbg/bin/mpicc -o ex26.o
-c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas
-fstack-protector -fvisibility=hidden -g3
-I/home/dsu/Soft/PETSc/petsc-3.10.2/include
-I/home/dsu/Soft/PETSc/petsc-3.10.2/linux-gnu-dbg/include
`pwd`/ex26.c<br>
/home/dsu/Soft/PETSc/petsc-3.10.2/src/dm/impls/plex/examples/tests/ex26.c:10:22:
fatal error: exodusII.h: No such file or directory<br>
compilation terminated.<br>
/home/dsu/Soft/PETSc/petsc-3.10.2/lib/petsc/conf/rules:359: recipe
for target 'ex26.o' failed<br>
<br>
Anyway, I will look at this example to get familiar with
GlobalToNatural related functions.<br>
<br>
Thanks,<br>
<br>
Danyang<br>
<br>
<blockquote
cite="mid:CAMYG4Gn9+1R8zGBcs01Rt0TJOUU2CpYpwBbKw7OxQf3dXZ82mA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div> Thanks,</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">
Attached is the code section with related functions
included, together <br>
with a mesh and output of global vector and natural vector.
If something <br>
is wrong in the code, it should be in these four functions.
The related <br>
functions are called in the following order.<br>
<br>
call solver_dd_create_dmplex<br>
<br>
call solver_dd_mapping_set_dmplex<br>
<br>
call solver_dd_DMDACreate_flow<br>
<br>
!call solver_dd_DMDACreate_react Not used in current
testing<br>
<br>
call solver_dd_mapping_global_natural<br>
<br>
I really appreciate your help.<br>
<br>
Regards,<br>
<br>
Danyang<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="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 moz-do-not-send="true"
href="http://www.cse.buffalo.edu/%7Eknepley/"
target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>