On Fri, Oct 11, 2013 at 8:09 AM, Bishesh Khanal <[email protected]> wrote:

> Dear all,
> By default, dmda puts all dof at a given node logically in consecutive
> order. The corresponding vectors and matrices created also follow this
> order. What should I do to change it so that it puts all the grid nodes for
> a 1st dof consecutively, then do the same for 2nd dof and so on. I also
> want the same behavior for the matrix it creates so that the rows
> corresponding to a particular dof are put in a consecutive manner instead
> of interleaving different dofs.
>

What do you really want to accomplish? This ordering is disastrous for
cache architectures.

1) If you want segregated solves, use PCFIELDSPLIT.

2) If you want to mess around with a single field, use
VecStrideGather/Scatter():
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecStrideGather.html

  Thanks,

     Matt

Thanks,
> Bishesh
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

Reply via email to