Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Mathis Friesdorf
Thanks for the helpful comments. Apparently my first mail was a bit unclear. I have already implemented it as a matrix-free method using MatShell, but currently it is written with a bunch of for loops and is horribly inefficient and in fact a lot slower than my python implementation with numpy. I

[petsc-users] MatView and complex matrices

2014-04-01 Thread Torquil Macdonald Sørensen
Hi! Using Petsc 3.4.4, compiled to support complex numbers, I'm getting a completely white figure when plotting a matrix with purely imaginary elements, using MatView(mat, PETSC_VIEWER_DRAW_WORLD). So I cannot see the nonzero structure from the plot. For real matrices (still using the

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Jed Brown
Mathis Friesdorf mathisfriesd...@gmail.com writes: Thanks for the helpful comments. Apparently my first mail was a bit unclear. I have already implemented it as a matrix-free method using MatShell, but currently it is written with a bunch of for loops and is horribly inefficient and in fact a

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Mathis Friesdorf
Thanks Jed! The libaries you are pointing to look very interesting indeed. For the particular implementation I have in mind, I was hoping to get away with something easier, as my time to work on this is a bit limited. All I really need is a way to construct a block-diagonal matrix where each block

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Jed Brown
Mathis Friesdorf mathisfriesd...@gmail.com writes: Thanks Jed! The libaries you are pointing to look very interesting indeed. For the particular implementation I have in mind, I was hoping to get away with something easier, as my time to work on this is a bit limited. All I really need is a

Re: [petsc-users] MatView and complex matrices

2014-04-01 Thread Jed Brown
Torquil Macdonald Sørensen torq...@gmail.com writes: Hi! Using Petsc 3.4.4, compiled to support complex numbers, I'm getting a completely white figure when plotting a matrix with purely imaginary elements, using MatView(mat, PETSC_VIEWER_DRAW_WORLD). So I cannot see the nonzero structure

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Mathis Friesdorf
Thanks Jed, this is great. I was trying to implement what was proposed in http://lists.mcs.anl.gov/pipermail/petsc-users/2011-September/009991.html, by you as I just realised. For this the matrices would be of varying size, so for three local systems, I would need: S \otimes Id \otimes Id ; Id

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Mathis Friesdorf
P.S. the individual matrix S is usually rather small, say 3x3 or 6x6 On Tue, Apr 1, 2014 at 4:47 PM, Mathis Friesdorf mathisfriesd...@gmail.comwrote: Thanks Jed, this is great. I was trying to implement what was proposed in

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Mathis Friesdorf
Alright, so your point is that while this construction is in principal possible, it will not be efficient. Thanks for clearing this up! On Tue, Apr 1, 2014 at 4:57 PM, Jed Brown j...@jedbrown.org wrote: Mathis Friesdorf mathisfriesd...@gmail.com writes: Thanks Jed, this is great. I was

Re: [petsc-users] Tensor product as matrix free method

2014-04-01 Thread Jed Brown
Mathis Friesdorf mathisfriesd...@gmail.com writes: Alright, so your point is that while this construction is in principal possible, it will not be efficient. Thanks for clearing this up! Yes, TAIJ chooses a specific order for simplicity. A general tensor library is a big problem that has

Re: [petsc-users] gamg failure with petsc-dev

2014-04-01 Thread Mark Adams
Stephan, I have pushed a pull request to fix this but for now you can just use -mg_levels_ksp_type chebyshev -mg_levels_pc_type jacobi. This used to be the default be we move to SOR recently. Mark On Sat, Mar 29, 2014 at 5:52 PM, Mark Adams mfad...@lbl.gov wrote: Sorry for getting to this

Re: [petsc-users] MatView and complex matrices

2014-04-01 Thread Torquil Macdonald Sørensen
On 01/04/14 16:41, Jed Brown wrote: Torquil Macdonald Sørensen torq...@gmail.com writes: Hi! Using Petsc 3.4.4, compiled to support complex numbers, I'm getting a completely white figure when plotting a matrix with purely imaginary elements, using MatView(mat, PETSC_VIEWER_DRAW_WORLD). So I

Re: [petsc-users] gamg failure with petsc-dev

2014-04-01 Thread Stephan Kramer
On 01/04/14 16:07, Mark Adams wrote: Stephan, I have pushed a pull request to fix this but for now you can just use -mg_levels_ksp_type chebyshev -mg_levels_pc_type jacobi. This used to be the default be we move to SOR recently. Mark Ah, that's great news. Thanks a lot for the effort. You're

Re: [petsc-users] gamg failure with petsc-dev

2014-04-01 Thread Jed Brown
Stephan Kramer s.kra...@imperial.ac.uk writes: Yes indeed. I've come to realize this now by looking into how smoothed aggregation with a near null space actually works. We currently have our dofs numbered the wrong way around (vertices on the inside, velocity component on the outside - which

Re: [petsc-users] MatView and complex matrices

2014-04-01 Thread Jed Brown
Torquil Macdonald Sørensen torq...@gmail.com writes: On 01/04/14 16:41, Jed Brown wrote: Torquil Macdonald Sørensen torq...@gmail.com writes: The complex version could make two plots. Yes, that would be very useful. Hmm, this would be nicer if PETSc plotting had subfig capability.

Re: [petsc-users] MatView and complex matrices

2014-04-01 Thread Barry Smith
On Apr 1, 2014, at 1:28 PM, Jed Brown j...@jedbrown.org wrote: Torquil Macdonald Sørensen torq...@gmail.com writes: On 01/04/14 16:41, Jed Brown wrote: Torquil Macdonald Sørensen torq...@gmail.com writes: The complex version could make two plots. Yes, that would be very useful.

Re: [petsc-users] Problem with TS and PCMG

2014-04-01 Thread Torquil Macdonald Sørensen
On 19/12/13 00:50, Jed Brown wrote: I'm using PCMG. My minimal testcase program has everything hardcoded. I'm not providing any runtime options other than -start_in_debugger, so everything can be seen from the code. I've since made a couple of small changes that might influence line number

Re: [petsc-users] SNESSetConvergenceTest

2014-04-01 Thread Dharmendar Reddy
Hello Jed, Can you please help me fix this issue. Thanks Reddy On Thu, Mar 20, 2014 at 3:52 PM, Dharmendar Reddy dharmaredd...@gmail.com wrote: Hello Jed, Were you able to look into this issue ? Thanks Reddy On Tue, Feb 25, 2014 at 9:36 PM, Jed Brown

Re: [petsc-users] [Bitbucket] Pull request #161: GAMG: shift coarse grids to avoid zero diags from low rank coarse grid space (petsc/petsc)

2014-04-01 Thread Mark Adams
Jed: get a thesaurus! I am getting sick of 'elide' :) The fix would be to eliminate the rotation mode(s) (or any of the modes for that matter) for that vertex of P. It just happens on the first coarse grid where the number of equation per vertex goes up (2--3 in 2D elasticity). This would be

Re: [petsc-users] [Bitbucket] Pull request #161: GAMG: shift coarse grids to avoid zero diags from low rank coarse grid space (petsc/petsc)

2014-04-01 Thread Peter Brune
On Tue, Apr 1, 2014 at 5:21 PM, Mark Adams mfad...@lbl.gov wrote: Jed: get a thesaurus! I am getting sick of 'elide' :) The thesaurus is the problem, man! The thesaurus is the problem! - Peter The fix would be to eliminate the rotation mode(s) (or any of the modes for that matter) for