Re: [petsc-dev] Fortran binding for VecGetValuesSection

2022-06-29 Thread Blaise Bourdin
Hi Jed, I pushed my attempts in https://gitlab.com/petsc/petsc/-/merge_requests/5385  I thought that they would be similar to VecGetArrayF90, but evidently they are not... Strangely, valgrind reports a problem in VecSetValues, but not in VecGetValues. There are a few occurrences

Re: [petsc-dev] Fortran binding for VecGetValuesSection

2022-06-25 Thread Jed Brown
Sorry about our late reply. Isn't VecGetValues similar? Note that VecGetValuesSection currently leaks a mutable pointer and really shouldn't exist like this without a matching VecRestoreValuesSection. PetscCall(VecGetArray(v, )); *values = [s->atlasOff[p]]; PetscCall(VecRestoreArray(v,

[petsc-dev] Fortran binding for VecGetValuesSection

2022-06-14 Thread Blaise Bourdin
Hi, I’ve been trying to add a fortran90 binding for VecGetValuesSection, without success, and could not find any function with a similar prototype to learn from. Can anybody help? Regards, Blaise -- Professor, Department of Mathematics & Statistics Hamilton Hall room 409A, McMaster