Re: [petsc-users] 3D multi-dof DMDA and Poisson equation

2014-10-15 Thread Håkon Strandenes
Thanks for the reply, both Jed and Matthew. However, I am still a bit unsure on a small detail: I have created a 3D DMDA with ndof = 4, one for each velocity component (u,v,w) and one for the pressure (p). I only solve a Poisson equation to correct p, the velocities are solved explicitly.

Re: [petsc-users] 3D multi-dof DMDA and Poisson equation

2014-10-15 Thread Dave May
For your pressue Poisson solve, you can use DMDAGetReducedDMDA to generate a DMDA with only 1 dof. This reduced DMDA will have the same parallel layout as your DMDA with 4 dofs. See http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMDAGetReducedDMDA.html Cheers, Dave On 15

[petsc-users] 3D multi-dof DMDA and Poisson equation

2014-10-08 Thread Håkon Strandenes
Hi, I am making a new, simple incompressible CFD code. I have created a grid as a 3D DMDA, with ndof=4, one dof for each velocity component (u,v,w) and one for the pressure (p). Currently I am creating a forward Euler step, where the velocities are updated based on the velocities and

Re: [petsc-users] 3D multi-dof DMDA and Poisson equation

2014-10-08 Thread Matthew Knepley
On Wed, Oct 8, 2014 at 3:00 PM, Håkon Strandenes haa...@hakostra.net wrote: Hi, I am making a new, simple incompressible CFD code. I have created a grid as a 3D DMDA, with ndof=4, one dof for each velocity component (u,v,w) and one for the pressure (p). Currently I am creating a forward

Re: [petsc-users] 3D multi-dof DMDA and Poisson equation

2014-10-08 Thread Jed Brown
Håkon Strandenes haa...@hakostra.net writes: Hi, I am making a new, simple incompressible CFD code. I have created a grid as a 3D DMDA, with ndof=4, one dof for each velocity component (u,v,w) and one for the pressure (p). Currently I am creating a forward Euler step, where the