<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 29/05/14 14:48, Matthew Knepley
wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4G=yW00LvFnd_WxEQOHyBZbTGQbubYdLC6owYmetbMbCDA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> OK. There are a few
other things missing or broken in the Fortran interfaces
that I will need at some point- e.g.
DMPlexConstructGhostCells(), PetscFVCreate(). At present
I'm writing my test code in C to avoid this issue, but
will need to get it going in fortran eventually.<br>
</div>
</blockquote>
<div><br>
</div>
<div>Okay, I pushed those fixes to next.</div>
</div>
</div>
</div>
</blockquote>
<br>
Oh great, thanks very much :-)<br>
<br>
Is there a trick to calling PetscFVCreate() from fortran though? The
test code snippet below errors out when I run it:<br>
<br>
program main<br>
<br>
! testing PetscFVM from fortran<br>
<br>
implicit none<br>
#include <finclude/petsc.h90><br>
PetscFV :: fvm<br>
PetscErrorCode :: ierr<br>
<br>
call PetscInitialize(PETSC_NULL_CHARACTER,ierr); CHKERRQ(ierr)<br>
call PetscFVCreate(PETSC_COMM_WORLD, fvm, ierr); CHKERRQ(ierr)<br>
call PetscFVDestroy(fvm, ierr); CHKERRQ(ierr)<br>
call PetscFinalize(ierr); CHKERRQ(ierr)<br>
<br>
end program main<br>
<br>
The error is:<br>
<br>
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------<br>
[0]PETSC ERROR: Null argument, when expecting valid pointer<br>
[0]PETSC ERROR: Null Pointer: Parameter # 2<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.4.4-5833-g396e404 GIT Date: 2014-05-28 21:50:40 -0500<br>
[0]PETSC ERROR: ./testfvm on a linux-gnu-c-opt named des108 by
acro018 Thu May 29 15:01:42 2014<br>
[0]PETSC ERROR: Configure options --download-netcdf
--download-exodusii --with-hdf5-dir=/usr/lib
--with-numpy-dir=/usr/lib/pymodules/p<br>
ython2.7/numpy
--with-scientificpython-dir=/usr/lib/python2.7/dist-packages/scipy
--with-petsc4py-dir=/usr/local/lib/python2.7/dist-pa<br>
ckages/petsc4py --download-triangle --with-fortran-interfaces=1
--download-ptscotch --download-chaco --download-ctetgen
<br>
[0]PETSC ERROR: #1 PetscFVCreate() line 1356 in
/home/acro018/software/PETSc/code/src/dm/dt/interface/dtfv.c<br>
--------------------------------------------------------------------------<br>
<br>
Cheers, 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>