<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 8, 2014 at 12:18 AM, 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">
<br>
<div>On 08/04/14 06:52, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>I got your code running. There were a few code problems
(fixed in my attached version), but the</div>
<div>problem you are seeing above is a bug in our system for
generating Fortran wrappers. The fix</div>
<div>will be pushed out soon, but I am attaching dmf.c which
you can put in src/dm/interface/ftn-auto</div>
<div>and rebuild and things should work for you.</div>
</div>
</div>
</div>
</blockquote>
<br>
Thanks very much. That did fix the error I was getting yesterday
(once I also removed the call to DMSetPointSF()).<br>
<br>
Next I am trying to visualize the partition vector via VTK, using
the subroutine below (again modelled on what is done in TS ex 33):<br></div></blockquote><div><br></div><div>1) ex33 will probably get eliminated. It is mostly a copy of ex11 which does work. Use that.</div><div><br>
</div><div>2) Are you solving something using FVM?</div><div><br></div><div>3) The VTK/HDF5 output now relies on being able to set the boundary values automatically. Here is it trying</div><div> to do it for FVM. Right now, it assumes that you have told it about the face geometry, which happens in ex11.</div>
<div> If you do not want this, I need to understand what you want to do.</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">
-------<br>
subroutine VTK_output(filename, v)<br>
<br>
! Writes the vector v to a VTK file<br>
implicit none<br>
<br>
#include <finclude/petsc.h90><br>
<br>
character(*), intent(in) :: filename<br>
Vec, intent(in) :: v<br>
! Locals:<br>
PetscErrorCode :: ierr<br>
PetscViewer :: viewer<br>
<br>
call PetscViewerCreate(PETSC_COMM_WORLD, viewer, ierr);
CHKERRQ(ierr)<br>
call PetscViewerSetType(viewer, PETSCVIEWERVTK, ierr);
CHKERRQ(ierr)<br>
call PetscViewerFileSetName(viewer, filename, ierr); CHKERRQ(ierr)<br>
call VecView(v, viewer, ierr); CHKERRQ(ierr)<br>
call PetscViewerDestroy(viewer, ierr); CHKERRQ(ierr)<br>
<br>
end subroutine VTK_output<br>
------------<br>
<br>
However it crashes with this error message:<br>
<br>
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------<br>
[0]PETSC ERROR: Null argument, when expecting valid pointer<br>
[0]PETSC ERROR: Null Object: Parameter # 1<br>
[0]PETSC ERROR: See
<a href="http://http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for
trouble shooting.<br>
[0]PETSC ERROR: Petsc Development GIT revision:
v3.4.4-5339-g8a3122f GIT Date: 2014-04-07 17:35:29 -0500<br>
[0]PETSC ERROR: testplex on a linux-gnu-c-opt named des108 by
acro018 Tue Apr 8 17:12:35 2014<br>
[0]PETSC ERROR: Configure options --download-netcdf
--download-exodusii --with-hdf5-dir=/usr/lib
--with-numpy-dir=/usr/lib/pymodul<br>
es/python2.7/numpy
--with-scientificpython-dir=/usr/lib/python2.7/dist-packages/scipy
--with-petsc4py-dir=/usr/local/lib/python2.7<br>
/dist-packages/petsc4py --download-triangle
--with-fortran-interfaces=1 --download-ptscotch --download-chaco
--download-ctetgen <br>
[0]PETSC ERROR: #1 VecGetDM() line 200 in
/home/acro018/software/PETSc/code/src/dm/interface/dm.c<br>
[0]PETSC ERROR: #2 DMPlexInsertBoundaryValuesFVM() line 403 in
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexfem.c<br>
[0]PETSC ERROR: #3 VecView_Plex_Local() line 235 in
/home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c<br>
[0]PETSC ERROR: #4 VecView() line 666 in
/home/acro018/software/PETSc/code/src/vec/vec/interface/vector.c<br>
<br>
Would this be expected to work in fortran at the moment? Or have I
just messed it up?<br>
<br>
I also came across another function that seems to be lacking a
fortran interface: DMPlexConstructGhostCells(). Not totally sure if
I need that, but again was just trying to follow what is done in TS
ex 33.<br>
<br>
Cheers, Adrian<span class="HOEnZb"><font color="#888888"><br>
<pre cols="72">--
Dr Adrian Croucher
Department of Engineering Science
University of Auckland
New Zealand
tel 64-9-373-7599 ext 84611
</pre>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>