[petsc-users] Back to struct in Fortran to represent field with dof > 1
Barry Smith
bsmith at mcs.anl.gov
Tue Oct 1 08:05:53 CDT 2013
I doubt very much that the ISO C bindings allow one to pass a Fortran pointer through a C function which is what we need to do so I'd be surprised if the ISO C bindings will save the day. But you are welcome to try.
Barry
On Oct 1, 2013, at 7:01 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Barry Smith <bsmith at mcs.anl.gov> writes:
>> I put the example with VecGetArray() into petsc-dev and if you send
>> me one with DMDAVecGetArray() I'll add that as well. Since the
>> derived type has to appear explicitly in the code I can't put
>> something in the library only in examples that people can copy and
>> change.
>
> This is the sad state of Fortran. Alternatively, it should be possible
> to call the C DMDAVecGetArray via the ISO C bindings in Fortran 2003.
>
> Yet another example that the best way to call Fortran libraries from
> Fortran is to use the ISO C bindings.
More information about the petsc-users
mailing list