Re: [petsc-users] Fortran interface of MatNullSpaceCreate

2018-02-26 Thread Smith, Barry F.
> On Feb 26, 2018, at 5:38 PM, Sanjay Govindjee wrote: > > If PETSc is expecting an integer, I presume it is fine to pass > PETSC_NULL_INTEGER(1)? Not if the function has an interface definition. Fortran interfaces distinguish between passing an integer a and an

Re: [petsc-users] Fortran interface of MatNullSpaceCreate

2018-02-26 Thread Sanjay Govindjee
If PETSc is expecting an integer, I presume it is fine to pass PETSC_NULL_INTEGER(1)? On 2/26/18 11:53 PM, Smith, Barry F. wrote: PETSC_NULL_INTEGER is actually declared as an array of size 1 (this is why you get the confusing message about no specific subroutine that matches).

Re: [petsc-users] Fortran interface of MatNullSpaceCreate

2018-02-26 Thread Smith, Barry F.
> On Feb 26, 2018, at 4:47 PM, frank wrote: > > Hello, > > It works after changing PETSC_NULL_INTEGER to 0. Thank you so much. > > Does this mean the 3rd argument is a Fortran integer rather than PestcInt? No it is actually a PetscInt so technically you should declare

Re: [petsc-users] Fortran interface of MatNullSpaceCreate

2018-02-26 Thread Smith, Barry F.
It should be > call MatNullSpaceCreate( PETSC_COMM_WORLD, PETSC_TRUE, 0, dummyVecs, > nullspace, ierr) If this doesn't work please send your test code that I can compile myself and figure out what is going on. Barry > On Feb 26, 2018, at 4:18 PM, frank wrote: >

[petsc-users] Fortran interface of MatNullSpaceCreate

2018-02-26 Thread frank
Hello, I have a question of the Fortran interface of subroutine MatNullSpaceCreate. I tried to call the subroutine in the following form: Vec :: dummyVec, dummyVecs(1) MatNullSpace :: nullspace INTEGER :: ierr (a) call MatNullSpaceCreate( PETSC_COMM_WORLD, PETSC_TRUE,