[petsc-dev] FW: More Fortran Interfaces
Matthew Knepley
knepley at gmail.com
Tue Jan 20 15:26:08 CST 2015
On Wed, Jan 14, 2015 at 2:55 AM, John O'Sullivan <
jp.osullivan at auckland.ac.nz> wrote:
> Hi guys,
>
>
>
> I’m having trouble working out how to use the fortran interfaces for
> DMPlexGetFaceFields, DMPlexGefFaceGeometry that Matt sorted out.
>
>
>
> From Matt’s email I understand I’m supposed to use a PetscScalar array
> with an extra dimension for the fgeom structure but I not really sure how
> this should look?
>
>
>
> Any help would be greatly appreciated!
>
Sorry this took me so long. These are 1D arrays that come in, you just have
to know how many entries are
in the struct:
https://bitbucket.org/petsc/petsc/src/d6f1362f6cb5b06161d69865c85ac643bdb6c5ac/include/petscfvtypes.h?at=master
which looks like 12 for the face geometry. Does that make sense?
Thanks,
Matt
> Cheers
>
> John
>
>
>
>
>
> --
>
> Dr John O'Sullivan
>
> Lecturer
>
> Department of Engineering Science
>
> University of Auckland, New Zealand
>
> email: jp.osullivan at auckland.ac.nz
> <https://lists.mcs.anl.gov/mailman/listinfo/petsc-dev>
>
> tel: +64 (0)9 923 85353
>
>
>
>
>
>
> ------------------------------
>
>
>
> Sorry, this is a really bad time of year for me with family and work
> travel. I can put in the Fortran bindings this week I think.
>
> I do not know how to handle structs in Fortran (will ask Fortran gurus).
> Right now, I am just going to make a PetscScalar
>
> array with one more dimension since the struct is a bunch of Scalars, and
> you will have to index into it treating the struct
>
> as another dim.
>
>
>
> Thanks,
>
>
>
> Matt
>
>
>
> Thanks very much!
>
> Cheers
> John
>
> *--*
>
> *Dr John O'Sullivan*
>
> *Lecturer*
>
> *Department of Engineering Science*
>
> *University of Auckland, New Zealand*
>
> *email: jp.osullivan at auckland.ac.nz <https://lists.mcs.anl.gov/mailman/listinfo/petsc-dev>*
>
> *tel: +64 (0)9 923 85353*
>
>
>
>
>
>
> --
>
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
>
>
>
> --
>
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150120/4a350784/attachment.html>
More information about the petsc-dev
mailing list