Re: [petsc-users] ex12 with Neumann BC

2013-10-03 Thread Olivier Bonnefon
Hello, Thank you for your answer, I'm now able to run the ex12.c with Neumann BC (options -bc_type neumann -interpolate 1). I have adapted the ex12.c for the 2D-system: -\Delta u +u =0 It consists in adapting the fem-f0Funcs[0] function and adding the jacobian function fem-g0Funcs[0].

[petsc-users] huge sparse structured block matrix

2013-10-03 Thread mary sweat
Hi all I am very new to petsc and to c programming. I need to build a huge sparse matrix with a block structure. The problem is that my matrx may be huge (20*20) so i Need a way to define it through the kronecker product or memorizing just the overdiagonal, diagonal and subdiagonal

Re: [petsc-users] huge sparse structured block matrix

2013-10-03 Thread Matthew Knepley
On Thu, Oct 3, 2013 at 8:04 AM, mary sweat mary.swea...@yahoo.it wrote: Hi all I am very new to petsc and to c programming. I need to build a huge sparse matrix with a block structure. The problem is that my matrx may be huge (20*20) so i Need a way to define it through the kronecker

Re: [petsc-users] huge sparse structured block matrix

2013-10-03 Thread Jed Brown
... in debug mode. (Optimized is much faster.) And note that this example is the nonlinear Bratu problem, which while very similar to a Laplacian, is not the same and performs multiple linear solves. On Oct 3, 2013 8:21 AM, Matthew Knepley knep...@gmail.com wrote: On Thu, Oct 3, 2013 at 8:04

Re: [petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7

2013-10-03 Thread Mengda Wu
Hi Satis, I've tried to use mingw distributed with cygwin. And it worked well for static libraries. Another problem I am facing is I cannot build shared libraries with it even I supplied with --with-shared-libraries=1. Only .a libs are generated and there are no dlls. There was a message

Re: [petsc-users] VecScatter from slice of global vector to sequential vector + AO errors

2013-10-03 Thread Matthew Knepley
On Thu, Oct 3, 2013 at 2:07 PM, Randall Mackie rlmackie...@gmail.comwrote: I am trying to create a VecScatter that will scatter all the values from a horizontal slice of a 3D DMDA global vector (with dof=3) to a sequential vector on every processor. So far I have been unsuccessful, most likely

Re: [petsc-users] VecScatter from slice of global vector to sequential vector + AO errors

2013-10-03 Thread Barry Smith
Randy, Take a look at DMDAGetRay() in src/dm/impls/da/dasub.c (now called DMDACreateRay()) this takes a row or column from a 2d DADM. You can use the same kind of approach to get a slice from a 3d DMDA. Barry On Oct 3, 2013, at 2:07 PM, Randall Mackie rlmackie...@gmail.com

Re: [petsc-users] How to speed up geometric multigrid

2013-10-03 Thread Michele Rosso
Barry, thank you, I hope to be able to fix this bug. On a side note, I took a look at ex34.c and I noticed that the nullspace is removed not only from the matrix but from the rhs as well. Why is this done? Thank you. Michele On 10/02/2013 06:22 PM, Barry Smith wrote: You will need

Re: [petsc-users] How to speed up geometric multigrid

2013-10-03 Thread Jed Brown
Michele Rosso mro...@uci.edu writes: Barry, thank you, I hope to be able to fix this bug. On a side note, I took a look at ex34.c and I noticed that the nullspace is removed not only from the matrix but from the rhs as well. Why is this done? You need the right hand side to be consistent

[petsc-users] Strong and weak scaling, solver robustness [was Re: reference]

2013-10-03 Thread Jed Brown
Cc'ing petsc-users since this may be of interest there. Alexander Grayver agray...@gfz-potsdam.de writes: Jed, thanks. I actually realized that I don't quite understand the definition of scalable as if its performance is independent of resolution and parallelism. Could you shortly

Re: [petsc-users] VecScatter from slice of global vector to sequential vector + AO errors

2013-10-03 Thread Randall Mackie
On Oct 3, 2013, at 12:24 PM, Matthew Knepley knep...@gmail.com wrote: On Thu, Oct 3, 2013 at 2:07 PM, Randall Mackie rlmackie...@gmail.com wrote: I am trying to create a VecScatter that will scatter all the values from a horizontal slice of a 3D DMDA global vector (with dof=3) to a

[petsc-users] Condition number of a matrix

2013-10-03 Thread Qiyue Lu
Dear All: I am solving a linear system Ax=b with about 40 millions DOF in PETSc. The solver is CR/Bjacobi. The driver is modified from source code : petsc-3.3-p6/src/ksp/ksp/examples/tutorials/ex10.c I am expecting the condition number of matrix A can be included in the output file but it

Re: [petsc-users] Condition number of a matrix

2013-10-03 Thread Jed Brown
Qiyue Lu luqi...@hotmail.com writes: Dear All: I am solving a linear system Ax=b with about 40 millions DOF in PETSc. The solver is CR/Bjacobi. The driver is modified from source code : petsc-3.3-p6/src/ksp/ksp/examples/tutorials/ex10.c I am expecting the condition number of matrix A can

[petsc-users] _pc_type

2013-10-03 Thread Qiyue Lu
Dear All: When I am solving a linear system. in command line I use: -ksp_type=cr then in the output file: I have : job75557 7959 5e+00 2.8e+02 1.0e-01 2.8e+02 bjacobi blks=128 ilu lvls=0,order=natural When I am using: -ksp_type cr _pc_type bjacobi the output file looks the same. From

Re: [petsc-users] _pc_type

2013-10-03 Thread Hong Zhang
Qiyue: For linear solvers, bjacobi/ilu(0) is the default PETSc preconditioner. You can change it with option '-pc_type ', and use '-ksp_view' to check what solver is being used. Hong Dear All: When I am solving a linear system. in command line I use: -ksp_type=cr then in the output file: I