[petsc-users] PetscMalloc with Fortran

Jonas Mairhofer mairhofer at itt.uni-stuttgart.de
Thu May 15 09:39:00 CDT 2014


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)

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.

Thanks,
Jonas


More information about the petsc-users mailing list