[petsc-users] Question about DMDA BOUNDARY_CONDITION set

Matthew Knepley knepley at gmail.com
Mon Mar 20 10:14:38 CDT 2017


On Mon, Mar 20, 2017 at 2:39 PM, Wenbo Zhao <zhaowenbo.npic at gmail.com>
wrote:

> Hi all.
>
> I have a mesh is like below
>
> 1  2  3
> 4  5  6
> 7  8  9
>
> I use DACreate2d to create mesh partition.
>
> In my case, I have an rotation boundary condition. The whole mesh is like
> below
>
> 9 8 7   3 6 9
> 6 5 4   2 5 8
> 3 2 1   1 4 7
>
> 7 4 1   1 2 3
> 8 5 2   4 5 6
> 9 6 3   7 8 9
>
> It means that cell 2 near the top boundary are connected with cell 4 near
> the left boundary, cell 3 with cell 7.
>

It looks like the above is the best way to do this right now, namely
replicate your grid four times, and use
periodic boundary conditions. Otherwise, you would be stuck writing the
routine for local-to-global mappings
enforcing these conditions by hand.

  Thanks,

     Matt


> How can I set boundary condition or set my matrix?
>
> I am looking forward for your help!
>
> BEST,
>
> Wenbo
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170320/05b0c654/attachment.html>


More information about the petsc-users mailing list