Jonas Mairhofer <[email protected]> writes:

> Hi, I'm trying to set the coloring of a matrix using ISColoringCreate. 
> Therefore I need an array 'colors' which in C can be creates as (from 
> example ex5s.c)
>
> int *colors
> PetscMalloc(...,&colors)

There is no PetscMalloc in Fortran, due to language "deficiencies".

> colors(i) = ....
>
> ISColoringCreate(...)
>
> How do I have to define the array colors in Fortran?
>
> I tried:
>
> Integer, allocatable :: colors(:)    and    allocate() instead of 
> PetscMalloc
>
> and
>
> Integer, pointer :: colors
>
> but neither worked.

The ISColoringCreate Fortran binding copies from the array you pass into
one allocated using PetscMalloc.  You should pass a normal Fortran array
(statically or dynamically allocated).

Attachment: pgpdW_IjtnMVm.pgp
Description: PGP signature

Reply via email to