[petsc-users] Problem Setup / Multiple DAs
Barry Smith
bsmith at mcs.anl.gov
Tue Jun 9 19:51:07 CDT 2015
> On Jun 9, 2015, at 7:25 PM, Paul Urbanczyk <gomer at stanford.edu> wrote:
>
> Hello,
>
> I'm relatively new to PETSc, so please forgive me if this is an obvious question.
>
> For context, I am working on a single-block, structured, parallel CFD solver using sixth-order compact Pade schemes.
>
> As I read through the manual and materials, it seems that using a "distributed array" (DA) would be extremely helpful in this case.
>
> When I set up the DA for solution of the Navier-Stokes equations, it makes sense to set it up with five degrees of freedom (DoFs) to handle the five conservation equations.
>
> However, there are a number of other calculations that need to be made (calculation of non-uniform mesh metrics, for example) that do not involve five DoFs.
>
> Is there a way to handle varying numbers of DoFs with the same distributed array, or would it be better to use multiple DAs (one with five DoFs, one with a single DoF, etc) for different aspects of the problem?
It is better just to use multiple DAs. Note that if the only difference between them is the dof (and stencil width, stencil type can be different also) then they will all have the same parallel layout so thus be compatible with each other. Each individual DA object now doesn't take much memory so it is ok to have several.
Barry
>
> Thanks for any/all advice on this matter!
>
> -Paul
>
More information about the petsc-users
mailing list