[petsc-users] Accessing Global Vector Data with

2019-08-15 Thread Daniel Mckinnell via petsc-users
Hi,Attached is a way I came up with to access data in a global vector, is this the best way to do this or are there other ways? It would seem intuitive to use the global PetscSection and VecGetValuesSection but this doesn't seem to work on global vectors. Instead I have used VecGetValues and

Re: [petsc-users] How to choose mat_mffd_err in JFNK

2019-08-15 Thread Smith, Barry F. via petsc-users
> On Aug 15, 2019, at 12:36 AM, Tang, Qi wrote: > > Thanks, it works. snes_mf_jorge works for me. Great. > It appears to compute h in every ksp. Each matrix vector product or each KSPSolve()? From the code looks like each matrix-vector product. > > Without -snes_mf_jorge, it is

Re: [petsc-users] different dof in DMDA creating

2019-08-15 Thread Danyang Su via petsc-users
Hi Barry and Matt, Would you please give me some advice on the functions I need to use to set different dof to the specified nodes. For now, I use DMPlexCreateSection that dof is uniform throughout the domain. I am a bit lost in choosing the right DMPlex functions, unfortunately. Thanks and

[petsc-users] Fwd: Accessing Global Vector Data with

2019-08-15 Thread Daniel Mckinnell via petsc-users
-Original Message- From: Daniel Mckinnell To: knepley Sent: Thu, 15 Aug 2019 17:05 Subject: Re: [petsc-users] Accessing Global Vector Data with Thank you, it seemed to work nicely for the fields associated with cells but I'm having problems with the field on vertices. The code