[petsc-users] Discretized fields at quadrature points

2016-04-06 Thread Sander Arens
Hi, I'd like to be able to represent some discretized fields at the quadrature points of a finite element, so I can easily use them with the plex residual/function evaluations. Is it possible to do this with PetscFECreateDefault and some command line options? I think what I need is PETSCSPACEDG

Re: [petsc-users] VecMTDot vs MatMult

2016-04-06 Thread Barry Smith
They should be pretty similar. So use whatever makes sense for the rest of the code with respect to the "rectangular dense matrix" or collection of vectors. Barry > On Apr 6, 2016, at 12:07 PM, Phanisri Pradeep Pratapa > wrote: > > Hi, > > I am trying to find out

[petsc-users] VecMTDot vs MatMult

2016-04-06 Thread Phanisri Pradeep Pratapa
Hi, I am trying to find out the product of a rectangular dense matrix and a vector. Could you please let me know if forming the rectangular matrix as an array of Vecs and then using VecMTDot is better (or worse/similar) than doing MatMult? (In both cases the matrix and the vectors are parallely

Re: [petsc-users] Prelloc: Get coordinates of local diagonal submatrix

2016-04-06 Thread Matthew Knepley
On Wed, Apr 6, 2016 at 10:12 AM, Florian Lindner wrote: > Hello, > > in order to preallocate I have to know whether a non-zero will be in the > local diagonal submatrix or not. > > >

[petsc-users] Prelloc: Get coordinates of local diagonal submatrix

2016-04-06 Thread Florian Lindner
Hello, in order to preallocate I have to know whether a non-zero will be in the local diagonal submatrix or not. http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html says: The DIAGONAL portion of the local submatrix of a processor can be defined as

Re: [petsc-users] How to extract array portions

2016-04-06 Thread FRANCAVILLA MATTEO ALESSANDRO
Fantastic, it definitely solved my problem! Thank you! Should I always create the vectors with MatCreateVecs when I use them for matrix-vector multiplications? I used to create vectors with VecCreate, and it has always worked fine with "standard" matrices (matrices not created with MATNEST

Re: [petsc-users] How to extract array portions

2016-04-06 Thread Dave May
On 6 April 2016 at 16:20, FRANCAVILLA MATTEO ALESSANDRO wrote: > Fantastic, it definitely solved my problem! Thank you! > > Should I always create the vectors with MatCreateVecs when I use them for > matrix-vector multiplications? I used to create vectors with VecCreate, and >

Re: [petsc-users] SLEPc eigenpairs relative error

2016-04-06 Thread Jose E. Roman
> El 6 abr 2016, a las 14:43, Thibault Chevret > escribió: > > Dear all, > > I am interested in computing the eigenpairs of a sparse real non-symmetric > matrix (~8000x8000). I use SLEPc for this purpose, specifying only nev, ncv > and tol as options. > > My

[petsc-users] SLEPc eigenpairs relative error

2016-04-06 Thread Thibault Chevret
Dear all, I am interested in computing the eigenpairs of a sparse real non-symmetric matrix (~8000x8000). I use SLEPc for this purpose, specifying only nev, ncv and tol as options. My problem is, I guess, that I would like to compute the whole spectra, and I've got some issues regarding the

Re: [petsc-users] How to extract array portions

2016-04-06 Thread FRANCAVILLA MATTEO ALESSANDRO
Thanks Dave, that's exactly what I was looking for, and it (partially) solved my problem. The MatMult operation now works fine, unfortunately not for every number of MPI processes (while the MatMult involving each submatrix works fine for any number of processes): matArray(1) =

[petsc-users] Correct syntax for DMDA ownership ranges in petsc4py

2016-04-06 Thread Chris Eldred
Hey All, Does anyone know the correct syntax for setting ownership ranges for DMDAs in petsc4py? For example, if I have a 1D DMDA with 20 vertices and 3 processes, and I want to distribute the vertices as [8,8,4], should the correct create call be: da =

Re: [petsc-users] How to extract array portions

2016-04-06 Thread Dave May
On 6 April 2016 at 11:08, FRANCAVILLA MATTEO ALESSANDRO wrote: > Hi, > > I'm trying to set a linear problem with a 2x2 block matrix (say A=[A11 > A12; A21 A22] in matlab notation). Obviously I could generate a single > matrix, but I would like to keep it as a 2x2 block matrix

[petsc-users] How to extract array portions

2016-04-06 Thread FRANCAVILLA MATTEO ALESSANDRO
Hi, I'm trying to set a linear problem with a 2x2 block matrix (say A=[A11 A12; A21 A22] in matlab notation). Obviously I could generate a single matrix, but I would like to keep it as a 2x2 block matrix with the 4 blocks generated and used independently (e.g., because at some point I need to