[petsc-users] Missing Fortran interface for PetscFree?

Marco Tiberga M.Tiberga at tudelft.nl
Fri Feb 15 05:26:26 CST 2019


Dear PETSc developers,

Unfortunately, I need to continue the previous conversation (which I attached), because I am getting another compiler error.
I need to call PetscFree() after PCFieldSplitGetSubKSP (I am trying to implement what is described in lines 117—120 of this example<https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex70.c.html>), but the compiler complains that the reference to it is undefined, even if I “use petscsys”.

So, I was wondering whether the Fortran interface for PetscFree is missing as well, or if I am doing something wrong.

Thanks again for the help!

Best regards,

Marco Tiberga
PhD candidate
Delft University of Technology
Faculty of Applied Sciences
Radiation Science & Technology Department
Mekelweg 15, 2629 JB Delft, The Netherlands
E-Mail: m.tiberga at tudelft.nl<mailto:m.tiberga at tudelft.nl>
Website: http://www.nera.rst.tudelft.nl/



From: Marco Tiberga
Sent: donderdag 7 februari 2019 15:31
To: 'Smith, Barry F.'
Cc: petsc-users at mcs.anl.gov; Danny Lathouwers - TNW
Subject: RE: [petsc-users] Missing Fortran interface for PCFieldSplitSetIS and PCFieldSplitGetIS?

Dear Barry,

Thanks a lot for your fast reply, as usual.
The patch did work!

With kind regards,
Marco Tiberga
PhD candidate
Delft University of Technology
Faculty of Applied Sciences
Radiation Science & Technology Department
Mekelweg 15, 2629 JB Delft, The Netherlands
E-Mail: m.tiberga at tudelft.nl<mailto:m.tiberga at tudelft.nl>
Website: http://www.nera.rst.tudelft.nl/



From: Smith, Barry F. [mailto:bsmith at mcs.anl.gov]
Sent: donderdag 7 februari 2019 5:19
To: Marco Tiberga
Cc: petsc-users at mcs.anl.gov; Danny Lathouwers - TNW
Subject: Re: [petsc-users] Missing Fortran interface for PCFieldSplitSetIS and PCFieldSplitGetIS?


   Marco,
   We were missing a Fortran stub in the code. You can either apply the attached patch or use the git branch barry/add-pcfieldsplit-getis/maint for the missing functionality. The fix will also be in the next maintenance release of petsc-3.10

   Please let us know if there are any difficulties.

   Barry


> On Feb 6, 2019, at 9:56 AM, Marco Tiberga via petsc-users <petsc-users at mcs.anl.gov> wrote:
>
> Dear PETSc developers,
>
> I am developing a coupled solver for the incompressible Navier-Stokes equations, based on the PCFIELDSPLIT implemented in PETSc (I’m using version 3.10.1).
> My code is written in Fortran.
>
> I tried to follow as much as possible this example, but I am getting weird errors. I think the problem is in the call to PCFieldSplitSetIS.
> To debug the code, for each field I wanted to call PCFieldSplitGetIS (after setting it) and print the IS with ISView. However, the compiler says the reference to PCFieldSplitGetIS is undefined.
>
> So, I was wondering whether PCFieldSplitGetIS and PCFieldSplitSetIS are actually available for Fortran.
> I tried to had a look at petsc-3.10.1/src/ksp/f90-mod/ftn-auto-interfaces/petscpc.h90, but I cannot find the interfaces for these functions.
>
> Thanks for the clarification.
>
> Best regards,
>
> Marco Tiberga
> PhD candidate
> Delft University of Technology
> Faculty of Applied Sciences
> Radiation Science & Technology Department
> Mekelweg 15, 2629 JB Delft, The Netherlands
> E-Mail: m.tiberga at tudelft.nl
> Website: http://www.nera.rst.tudelft.nl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190215/5d00d710/attachment-0001.html>


More information about the petsc-users mailing list