[petsc-users] DMDA objects while distributing 3d arrays

Manuel Valera mvalera at mail.sdsu.edu
Thu Jan 19 16:01:37 CST 2017


Hello all,

I'm currently pushing forward on the parallelization of my model, next step
would be to parallelize all the grids (pressure, temperature, velocities,
and such), and they are stored as 3d arrays in fortran.

I'm following ex11f90.f and is a good start, i have a couple questions from
it:

   1. in the example a dummy vector g is made and the array values are
   loaded into it, the dimensions of this vector are variable? the same dummy
   vector is used for 1d,2d,3d so i guess it is. i was planning to use matrix
   objects for 3d arrays but i guess a vector of this kind would be better
   suited?
   2. I notice also that a stride is used from the corners of the DMDA, im
   looking for a way to operate over the global indices of the array instead,
   can this be done? any good example to follow on this? this would save us
   lots of effort if we can just extend the actual operations from global
   indices into the DMDA objects.
   3. next, im concerned about the degrees of freedom, how can i know how
   many dof my model has? we are following an arakawa c-type grid. Same for
   the type of stencil which i guess is star type in my case, we use a 9 point
   stencil.


that is it for now, thanks for your time,

Manuel Valera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170119/d3e303cc/attachment.html>


More information about the petsc-users mailing list