Good morning,
Sorry for picking this back up such a long time after the initial response,
but I am now in a good place to implement this change after thoroughly
testing the preconditioner shell alone.
I have been looking for resources but it is still not clear to me how to
use the MATSHELL for
You should run with -options_left to check that your options are being
used. It may be -mat_type hypre.
I have tested this:
petsc/src/ksp/ksp/tutorials$ *srun -n2 ./ex4 -ksp_type cg -mat_type hypre
-ksp_view -pc_type hypre*
You can add -log_view and that will print performance data for each
it is very possible there is a bug in the Fortran interface for this
function. It looks like whoever wrote the Fortran interface did not think
through the special case of contiguous entries.
PETSC_EXTERN void petscsfgetgraph_(PetscSF *sf,PetscInt *nroots,PetscInt
*nleaves, F90Array1d
Yes, spectrum slicing needs computing the inertia, and also it uses the
KSPSolve interface. Furthermore, the current implementation is single vector
only, no blocks.
The only part of SLEPc that uses PCApply directly are Davidson solvers. I could
try to adapt them to use PCMatApply(). Thanks for
Oh, I see the stack trace now. This requires to compute the inertia?
> On Nov 19, 2021, at 3:45 PM, Stefano Zampini
> wrote:
>
> Jose
>
> Now that we have the PCMatApply interface, you could switch to use that
> inside SLEPc. I guess you are using MatSolve, right?
> If not, the alternative
Jose
Now that we have the PCMatApply interface, you could switch to use that inside
SLEPc. I guess you are using MatSolve, right?
If not, the alternative is to have a PCFactorGetMatrix with creates on the fly
an object that behaves like it. The problem is that we do not have a matching
You could try this:
integer :: i real :: r i = loc(r) print *, i
On Fri, Nov 19, 2021 at 12:34 AM 袁煕 wrote:
> Dear PETSc-team,
>
> I am using function PetscSFGetGraph in my program like
> ---
> call PetscSFGetGraph(sf,gnroots,gnleaves,gmine,gremote,ierr)
>
It is trying to call PCFactorGetMatrix() on your PC, but this operation is not
supported by PCSHELL and it is not possible to set it via
PetscObjectComposeFunction(). PCSHELL uses the PCShellSet* interface, that is
restricted to a limited number of operations.
Jose
> El 19 nov 2021, a las