Re: [petsc-users] Verifying matching PetscFunctionBeginUser() and PetscFunctionReturn()

2023-07-12 Thread Barry Smith
Ok, I don't understand the logic behind this but if you use PetscFunctionBeginUser (not PetscFunctionBegin) the check on the exit to the function is not done. PetscCheckAbort(!stack__.check || stack__.petscroutine[stack__.currentsize] != 1 || stack__.function[stack__.currentsize] == (const

Re: [petsc-users] Near null space for a fieldsplit in petsc4py

2023-07-12 Thread Pierre Jolivet
> On 12 Jul 2023, at 6:04 PM, TARDIEU Nicolas via petsc-users > wrote: > > Dear PETSc team, > > In the attached example, I set up a block pc for a saddle-point problem in > petsc4py. The IS define the unknowns, namely some physical quantity (phys) > and a Lagrange multiplier (lags). > I wou

Re: [petsc-users] Verifying matching PetscFunctionBeginUser() and PetscFunctionReturn()

2023-07-12 Thread Aagaard, Brad T via petsc-users
I created a small toy example (attached) that suggests that the verification of matching PetscFunctionBeginUser() and PetscFunctionReturn() fails when PetscFunctionReturn() is missing or in some cases when different functions are missing PetscFunctionBeginUser() or PetscFunctionReturn(). The cas

Re: [petsc-users] Matrix-free generalised eigenvalue problem

2023-07-12 Thread Jose E. Roman
By default, it is solving the problem as B^{-1}*A*x=lambda*x (see chapter on Spectral Transformation). That is why A can be a shell matrix without problem. But B needs to be an explicit matrix in order to compute an LU factorization. If B is also a shell matrix then you should set an iterative s

[petsc-users] Matrix-free generalised eigenvalue problem

2023-07-12 Thread Quentin Chevalier
Hello PETSc Users, I have a generalised eigenvalue problem : Ax= lambda Bx I used to have only A as a matrix-free method, I used mumps and an LU preconditioner, everything worked fine. Now B is matrix-free as well, and my solver is returning an error : "MatSolverType mumps does not support matrix

[petsc-users] Near null space for a fieldsplit in petsc4py

2023-07-12 Thread TARDIEU Nicolas via petsc-users
Dear PETSc team, In the attached example, I set up a block pc for a saddle-point problem in petsc4py. The IS define the unknowns, namely some physical quantity (phys) and a Lagrange multiplier (lags). I would like to attach a near null space to the physical block, in order to get the best perfo

Re: [petsc-users] [SLEPc] With the increasing of processors, result change in 1e-5 and solving time increase. krylovschur for MATSBAIJ matrix's smallest eigenvalue

2023-07-12 Thread Jose E. Roman
The computed eigenvalue has 7 matching digits, which agrees with the used tolerance. If you want more matching digits you have to reduce the tolerance. The performance seems reasonable for up to 64 processes, so yes the problem may be too small for more processes. But performance depends also a

[petsc-users] [SLEPc] With the increasing of processors, result change in 1e-5 and solving time increase. krylovschur for MATSBAIJ matrix's smallest eigenvalue

2023-07-12 Thread Runfeng Jin
Hi, When I try to increase the number of processors to solve the same matrix(to acquire the smallest eigenvalue) , I find all the results differ from each other within the 1e-5 scope (Though the ||Ax-kx||/||kx|| are all achieve 1e-8) . And the solve time are first decreasing then increasing. my