Re: [petsc-users] Help with petsc4py and PC Python type

2019-01-22 Thread Jed Brown via petsc-users
My preference is to put this auxiliary information on the Mat (or the Mat's DM; see MatGetDM()). It's really declarative information about the operator, not algorithmic parameters for the PC (like a threshold in AMG, number of smoothing iterations, etc.). Justin Chang writes: > As of right now,

Re: [petsc-users] Help with petsc4py and PC Python type

2019-01-22 Thread Lawrence Mitchell via petsc-users
> On 22 Jan 2019, at 22:30, Justin Chang via petsc-users > wrote: > > As of right now, the dict() is something the user constructs inside > mycode.py. It would contain things like the viscosity, boundary conditions, > function space, etc which are needed to construct the PC operators in MyP

Re: [petsc-users] Help with petsc4py and PC Python type

2019-01-22 Thread Jed Brown via petsc-users
Justin Chang via petsc-users writes: > Hi all, > > I am attempting to write my own scour preconditioner for a FEniCS/petsc4py. > I managed to attach a DMShell to the KSP so that I can employ command-line > options for field splitting. Suppose I want to solve the Navier-Stokes > equation and have

Re: [petsc-users] Accessing the elements of a Matrix

2019-01-22 Thread Smith, Barry F. via petsc-users
MatGetArrayF90 is an out-dated routine. For dense matrices you can use MatDenseGetArrayF90() For sparse matrices you can use MatGetValues() or MatGetRow() Barry > On Jan 22, 2019, at 3:15 PM, Maahi Talukder via petsc-users > wrote: > > Hello All, > > I was trying to use ' MatGetA

Re: [petsc-users] Error in DMFieldComputeFaceData_DS with hex elements

2019-01-22 Thread rickcha--- via petsc-users
> On 18. Jan 2019, at 18:19, rick...@googlemail.com wrote: > > > >> On 18. Jan 2019, at 16:09, Matthew Knepley wrote: >> >> On Fri, Jan 18, 2019 at 7:54 AM rickcha--- via petsc-users >> wrote: >> Dear petsc-team, >> >> I ran into an error when using petscFE in combination with a hex mesh

[petsc-users] Create 2 matrix with the same OwnershipRanges

2019-01-22 Thread NENNIG Benoit via petsc-users
Hi, I would like to create a matrix aij with the same OwnershipRanges as an other existing matrix with petsc4py. The two matrices have not the same non zeros patern. Any ideas ? Regards, Benoit