[petsc-dev] MatFDColoringGetPerturbedColumns() in fortran

Barry Smith bsmith at mcs.anl.gov
Tue May 9 22:53:45 CDT 2017


  Adrian,

  This is because the second argument, the array of columns is of variable length, making things a bit more complicated from Fortran.

  We can provide a "f77" style interface where you provide an empty array with enough entries that we fill up for you. You can call the routine twice the first time to get the number of columns only and the second time with the array available to us to fill up.

   Or we can provide an "f90" style interface where you provide a 1 dimensional array pointer and we "point it to the correct values". With this interface you will also have to call a MatFDColoringRestorePerturbedColumns() when you no longer need the array so we may free the f90 array object.

   Which would you like?

   Barry

> On May 9, 2017, at 10:30 PM, Adrian Croucher <a.croucher at auckland.ac.nz> wrote:
> 
> hi
> 
> Currently the function MatFDColoringGetPerturbedColumns() doesn't apear to be accessible from Fortran. I get an 'undefined reference' error when I try to compile.
> 
> Is there just a missing interface?
> 
> Cheers, Adrian
> 
> -- 
> Dr Adrian Croucher
> Senior Research Fellow
> Department of Engineering Science
> University of Auckland, New Zealand
> email: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 4611
> 




More information about the petsc-dev mailing list