On Nov 23, 2011, at 1:58 PM, Abraham Taicher wrote:

> Hi,
> 
> I'm trying to add a Dirichlet boundary condition to my finite element
> code.  I want the vector with the boundary data to split across
> processors.  I have a rectangular grid so I could just make 4 different
> 1D DA's and split them up according to the way the 2D DA is split.  Is
> that what DMDA_BOUNDARY_GHOSTED is for?

   Yes, it can be used for that purpose. You fill up the "extra" ghost 
locations with your Dirichlet values and then the stencil computations just use 
them at the edge of the array.

   There is really no way to use 1D DAs in this case to store Dirichlet 
boundary conditions. Just stick the values into the right locations in the 
ghost locations of the 2D DA.

   Barry


>  If not, what is it for?
> 
> thanks,
> 
> Abraham Taicher

Reply via email to