Re: [petsc-users] Searching for a suitable example case for parallel linear solver

2018-10-22 Thread Jed Brown
If you have a stored matrix (strongly discouraged as a workflow, but handy for tests), you can run ksp/ksp/examples/tutorials/ex10.c (no need to edit code). If you have a structured grid and want a fast solver, you should consider using geometric multigrid; see

[petsc-users] Searching for a suitable example case for parallel linear solver

2018-10-22 Thread SONG Pengyang
Hi all, I am a new user of PETSC, and I am trying to use KSP to solve a 3D Poisson problem. The 3D Poisson problem is differenced by myself, which means that matrix A is given already. I have found several examples in KSP tutorials but I want to know which one is suitable for me in “ex2f; ex6f;

Re: [petsc-users] Shell Matrix Operations required for KSP solvers?

2018-10-22 Thread Matthew Knepley
On Mon, Oct 22, 2018 at 7:44 PM Andrew Ho wrote: > I have a specialized matrix structure I'm trying to take advantage of for > solving large scale (non)linear systems. I think for this purpose using a > Shell matrix is sufficient for interfacing with PETSc's KSP linear solvers. > > Looking at

[petsc-users] Shell Matrix Operations required for KSP solvers?

2018-10-22 Thread Andrew Ho
I have a specialized matrix structure I'm trying to take advantage of for solving large scale (non)linear systems. I think for this purpose using a Shell matrix is sufficient for interfacing with PETSc's KSP linear solvers. Looking at the examples which use shell matrices, it seems most only

Re: [petsc-users] Increasing norm with finer mesh

2018-10-22 Thread Weizhuo Wang
Amazing, right preconditioning fixes the problem. Thanks a lot! On Tue, Oct 16, 2018 at 8:31 PM Dave May wrote: > > > On Wed, 17 Oct 2018 at 03:15, Weizhuo Wang wrote: > >> I just tried both, neither of them make a difference. I got exactly the >> same curve with either combination. >> > >

Re: [petsc-users] Slepc: Nonlinear eigenvalue problem

2018-10-22 Thread Jose E. Roman
It depends on the solver. For instance, NEPRII builds the matrix T(lambda) and then uses it for matrix-vector multiplications and also for linear solves. So the required operations depend on which preconditioner you use for the linear solves. This example can use Jacobi preconditioner:

Re: [petsc-users] Slepc: Nonlinear eigenvalue problem

2018-10-22 Thread Manav Bhatia
As a followup to this, if I am using a shell matrix for eigensolution (linear or nonlinear eigenproblems), what operations should be defined for the shell matrix? -Manav > On Oct 22, 2018, at 2:05 PM, Manav Bhatia wrote: > > Hi, > > I am exploring the nonlinear eigenvalue problem solver

Re: [petsc-users] Slepc: Nonlinear eigenvalue problem

2018-10-22 Thread Jose E. Roman
> El 22 oct 2018, a las 21:05, Manav Bhatia escribió: > > Hi, > > I am exploring the nonlinear eigenvalue problem solver in Slepc. > > From the notes in "Sec 6.4: Retrieving the Solution”, it appears that if I > expect to find complex eigenpairs then I must compile the library (and

[petsc-users] Slepc: Nonlinear eigenvalue problem

2018-10-22 Thread Manav Bhatia
Hi, I am exploring the nonlinear eigenvalue problem solver in Slepc. From the notes in "Sec 6.4: Retrieving the Solution”, it appears that if I expect to find complex eigenpairs then I must compile the library (and Petsc) with complex scalars. Is that correct? Is there a way to

Re: [petsc-users] fortran INTENT with petsc object gives segfault after upgrade from 3.8.4 to 3.10.2

2018-10-22 Thread Smith, Barry F.
> On Oct 22, 2018, at 4:33 AM, Klaij, Christiaan wrote: > > Thanks Barry and Matt, it makes sense if rr is a pointer instead > of an allocatable. So: > > Vec, POINTER, INTENT(in) :: rr_system > > would be the proper way, right? Yes > > And out of curiosity, why did petsc-3.8.4

Re: [petsc-users] fortran INTENT with petsc object gives segfault after upgrade from 3.8.4 to 3.10.2

2018-10-22 Thread Klaij, Christiaan
Thanks Barry and Matt, it makes sense if rr is a pointer instead of an allocatable. So: Vec, POINTER, INTENT(in) :: rr_system would be the proper way, right? And out of curiosity, why did petsc-3.8.4 tolerate my wrong INTENT(out)? Chris dr. ir. Christiaan Klaij | Senior Researcher |