Re: [petsc-users] MatCreateShell with VecCreateGhost

2015-12-01 Thread Barry Smith
> On Dec 1, 2015, at 5:18 PM, Bikash Kanungo wrote: > > Hi, > > I want to implement a matrix-free KSP solve using user-defined MATOP_MULT and > MATOP_MULT_TRANSPOSE. Each of these user-defined functions take in Mat A, > Vec x and Vec y as arguments and store A*x in y. To

[petsc-users] Error reported by MUMPS in numerical factorization phase

2015-12-01 Thread Danyang Su
Hi All, My code fails due to the error in external library. It works fine for the previous 2000+ timesteps but then crashes. [4]PETSC ERROR: Error in external library [4]PETSC ERROR: Error reported by MUMPS in numerical factorization phase: INFO(1)=-1, INFO(2)=0 The full error message is

[petsc-users] MatCreateShell with VecCreateGhost

2015-12-01 Thread Bikash Kanungo
Hi, I want to implement a matrix-free KSP solve using user-defined MATOP_MULT and MATOP_MULT_TRANSPOSE. Each of these user-defined functions take in Mat A, Vec x and Vec y as arguments and store A*x in y. To perform A*x in the user defined fashion, each processor requires access to some

Re: [petsc-users] MatCreateShell with VecCreateGhost

2015-12-01 Thread Barry Smith
This is a pretty different thing. DMGetLocalVector(da,localX,ierr) gives a vector back with the correct amount of space for local ghosts and if you use DMDA it this the correct way to go. VecCreateGhost() creates a special vector that actually stores both the ghosted and nonghosted values in

Re: [petsc-users] MatCreateShell with VecCreateGhost

2015-12-01 Thread Bikash Kanungo
Hi Barry, These vectors are internal to the KSP solve. How do I access the creation of these vectors? Regards, Bikash On Dec 1, 2015 7:47 PM, "Barry Smith" wrote: > > > On Dec 1, 2015, at 5:18 PM, Bikash Kanungo wrote: > > > > Hi, > > > > I want to

Re: [petsc-users] MatCreateShell with VecCreateGhost

2015-12-01 Thread Timothée Nicolas
Btw, If the vector X is created via a DMDA, then the vector localX and the pointer lx obtained via call DMGetLocalVector(da,localX,ierr) call DMGlobalToLocalBegin(da,X,INSERT_VALUES,localX,ierr) call DMGlobalToLocalEnd(da,X,INSERT_VALUES,localX,ierr) call VecGetArrayReadF90(localX,lx,ierr) are

Re: [petsc-users] MatCreateShell with VecCreateGhost

2015-12-01 Thread Barry Smith
Sorry, I could not control myself. So long as you pass vectors created with VecCreateGhost() to KSPSolve() the vectors passed to the multiply inside the solver will also be ghosted vectors. Send all output messages etc if it doesn't work for you Barry > On Dec 1, 2015, at 6:47 PM,

Re: [petsc-users] Issues with the Variational Inequality solver

2015-12-01 Thread Barry Smith
> On Dec 1, 2015, at 5:13 PM, Justin Chang wrote: > > Hi all, > > So I am running into some issues with the SNESVINEWTONRSLS solver. I > originally had this done in firedrake, but have ported it to petsc4py. > Attached is the code as well as the two required input files.

Re: [petsc-users] DMPlex: Ghost points after DMRefine

2015-12-01 Thread Morten Nobel-Jørgensen
I found a solution to my problem by using the global section instead. I still don’t quite understand what my problem ISLocalToGlobalMapping was. > Yes, that is the solution I use. Thanks – good to hear that I’m on the right track :) > I think I ignore nonlocal indices in the l2g mapping

Re: [petsc-users] PETSC error: Caught signal number 8 FPE

2015-12-01 Thread Matthew Knepley
On Mon, Nov 30, 2015 at 2:43 PM, Soumya Mukherjee wrote: > Thanks for the reply. > > The error message shows > [0]PETSC ERROR: Invalid argument > [0]PETSC ERROR: Scalar value must be same on all processes, argument # 3 > This is a common error when you calculate a

Re: [petsc-users] Output newton step

2015-12-01 Thread Alex Lindsay
Thanks Barry that helps a lot. It looks like the defaults for me (PetSc 3.6.0 release) are stdout for -ksp_view_solution and draw for -snes_monitor_solution_update. I don't see any binary files generated with the defaults. On 11/30/2015 05:56 PM, Barry Smith wrote: On Nov 30, 2015, at 2:19

Re: [petsc-users] Output newton step

2015-12-01 Thread Barry Smith
> On Dec 1, 2015, at 1:22 PM, Alex Lindsay wrote: > > Thanks Barry that helps a lot. It looks like the defaults for me (PetSc 3.6.0 > release) are stdout for -ksp_view_solution and draw for > -snes_monitor_solution_update. I don't see any binary files generated with > the

Re: [petsc-users] Weighted Jacobi

2015-12-01 Thread Jed Brown
Timothée Nicolas writes: > I meant > > X^{k+1} = omega*D^{-1}*(b - (A-D)*X^k) + (1-omega)*X^k Let's rearrange: X^{k+1} = omega*D^{-1}*(b - A*X^k) + omega*D^{-1}*D*X^k + (1-omega)*X^k = omega*D^{-1}*(b - A*X^k) + omega*X^k - omega*X^k + X^k =

Re: [petsc-users] Weighted Jacobi

2015-12-01 Thread Dave May
I believe what you are looking for is defined by the following options -ksp_type richardson -ksp_richardson_scale -pc_type jacobi Thanks, Dave On 1 December 2015 at 08:57, Timothée Nicolas wrote: > Hi all, > > Is weighted Jacobi available as a

Re: [petsc-users] Weighted Jacobi

2015-12-01 Thread Timothée Nicolas
OK, I'll look at that, thanks Timothee 2015-12-01 18:02 GMT+09:00 Dave May : > I believe what you are looking for is defined by the following options > -ksp_type richardson > -ksp_richardson_scale > -pc_type jacobi > > Thanks, > Dave > > On 1 December 2015 at

Re: [petsc-users] DMPlex: Ghost points after DMRefine

2015-12-01 Thread Morten Nobel-Jørgensen
I found a solution to my problem by using the global section instead. I still don’t quite understand what my problem ISLocalToGlobalMapping was. // New code bool isGhost(DM dm, PetscInt point){ PetscSection globalSection; DMGetDefaultGlobalSection(dm, ); PetscInt offset;

[petsc-users] Matt, a new email address was added to your account

2015-12-01 Thread LinkedIn Security
Hi Matt, The email address matthias.f...@sap.com was recently added to your LinkedIn account. If you dont want that email associated with your account after all, heres how to remove it: Type

Re: [petsc-users] Weighted Jacobi

2015-12-01 Thread Matthew Knepley
Or do you mean *-pc_jacobi_type rowsum* * Thanks,* *Matt* On Tue, Dec 1, 2015 at 3:26 AM, Timothée Nicolas wrote: > OK, I'll look at that, thanks > > Timothee > > 2015-12-01 18:02 GMT+09:00 Dave May : > >> I believe what you are

Re: [petsc-users] Weighted Jacobi

2015-12-01 Thread Timothée Nicolas
I meant X^{k+1} = omega*D^{-1}*(b - (A-D)*X^k) + (1-omega)*X^k This is what the wikipedia page says about weighted Jacobi : https://en.wikipedia.org/wiki/Jacobi_method#Weighted_Jacobi_method. It is easy to hard code anyway. Thx Timothée 2015-12-01 23:10 GMT+09:00 Matthew Knepley