[petsc-users] KSPComputeOperator Fortran API
Jose E. Roman
jroman at dsic.upv.es
Thu Jun 18 05:40:15 CDT 2026
I would suggest upgrading to the most recent version (3.25) since the new Fortran bindings cover most of the functionality, including this one.
Jose
> El 18 jun 2026, a las 10:14, Edoardo Centofanti <edoardo.centofanti01 at universitadipavia.it> escribió:
>
> Dear users,
>
> I am working on a finite element Fortran code and I would like to extract the preconditioned operator to explore its spectral properties. I know that the KSPComputeOperator routine exists in C.
> How can I call it from Fortran? I am currently using PETSc 3.20.2.
>
> So far I have tried
> call KSPComputeOperator(ksp,MATMPIAIJ,AAprec,ierr)
>
> and also its old/deprecated version
> call KSPComputeExplicitOperator(ksp,AAprec,ierr)
>
> But in both cases I got
> undefined reference to `kspcomputeoperator_'/`kspcomputeexplicitoperator_'
> when compiling
>
> Thanks in advance,
> Edoardo
More information about the petsc-users
mailing list