[petsc-users] What's the point of DMDA_BOUNDARY_GHOSTED?

Abraham Taicher ataicher at ices.utexas.edu
Sat Nov 26 17:07:53 CST 2011


Hi,

It seems like you're implying that there are better ways to include
Dirichlet (and Neumann) data that is distributed according to the DMDA
object.  How would you include Dirichlet BC?

It would be really helpful to see an implementation of ghosted
boundary.  I could not find one on the website.  Is there one out there?

Thanks,
Abraham Taicher

On 11/23/2011 05:14 PM, Barry Smith wrote:
> 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



More information about the petsc-users mailing list