[petsc-users] MatZeroRowsColumns

Jed Brown jed at jedbrown.org
Fri Nov 24 08:51:18 CST 2017


Matthew Knepley <knepley at gmail.com> writes:

> On Fri, Nov 24, 2017 at 6:42 AM, Samuel Lanthaler <s.lanthaler at gmail.com>
> wrote:
>
>> Ah, great. I didn't understand that "optional" arguments are not optional
>> in the fortran sense of the word. After setting up two vectors to pass to
>> the routine, the program works. Thank you very much!
>>
>> One additional question: In the documentation, it is written that I can
>> pass PETSC_NULL for these two vectors, if I don't actually need them. That
>> probably only works in C, but not in fortran. Is there a corresponding
>> argument I can pass to the routine in fortran? It seems, that
>> PETSC_NULL_REAL doesn't work; is there some other PETSC_NULL_XXX that
>> should be passed in this case from fortran? If not, then I'll just stick to
>> creating vectors and distroying them afterwards, which is fine for me as
>> well.
>>
>
> You can use PETSC_NULL_VEC

Matt is right; PETSC_NULL_OBJECT is gone in petsc-3.8.


More information about the petsc-users mailing list