<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 08/04/14 06:52, Matthew Knepley
wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4G=3Lk+AeJwUtnE9ZvMKzUo5--oeGdW1wtRD1NKiosRGQg@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<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>
<br>
-------<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 class="moz-txt-link-freetext" href="http://http://www.mcs.anl.gov/petsc/documentation/faq.html">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<br>
<pre class="moz-signature" cols="72">--
Dr Adrian Croucher
Department of Engineering Science
University of Auckland
New Zealand
tel 64-9-373-7599 ext 84611
</pre>
</body>
</html>