[petsc-dev] MatFDColoringGetPerturbedColumns() in fortran

Adrian Croucher a.croucher at auckland.ac.nz
Tue May 9 22:59:30 CDT 2017



On 10/05/17 15:53, Barry Smith wrote:
>    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?
The F90 style would be great. That would be consistent with other 
routines I use which return arrays like this, e.g. ISGetIndicesF90().

- 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