[petsc-dev] MatFDColoringGetPerturbedColumns() in fortran

Barry Smith bsmith at mcs.anl.gov
Wed May 10 23:28:29 CDT 2017


  I have added this support in the branch barry/feature-matfdcoloringgetperturbedcolumns-f90

Barry

Due to the large changes in the Fortran interface I cannot provide a version that works with PETSc 3.7.x 


> On May 9, 2017, at 10:59 PM, Adrian Croucher <a.croucher at auckland.ac.nz> wrote:
> 
> 
> 
> 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