[petsc-users] [petsc-maint] How to impose boundary conditions using DMDA

Matthew Knepley knepley at gmail.com
Mon Oct 29 05:09:16 CDT 2018


On Mon, Oct 29, 2018 at 5:39 AM Fengwen Wang <fwan at mek.dtu.dk> wrote:

> Hi Matt and Barry,
>
> I only have  a regular 2D  square domain of a unit cell.
>
The boundary condition implies some sort of topology. For example, if you
condition was

  u, v (x = 0) = u, v (x = 1)

you are on a cylinder. And if you add

  u, v (y = 0) = u, v (y = 1)

you are on a torus. However, you are hooking the right edge to the top edge
and also transforming the basis. I cannot understand what is meant.

  Thanks,

     Matt

> How can I use DMPlex to apply such a boundary condition?
>
>
> Thanks a lot.
>
>
> Best regards
>
> Fengwen
>
>
>
> ____________________________________________________
> Senior Researcher
> Department of Mechanical Engineering, DTU
> Nils Koppels Allé
> Building 404
> 2800  Kgs. Lyngby
> fwan at mek.dtu.dk
> ------------------------------
> *From:* Matthew Knepley <knepley at gmail.com>
> *Sent:* Monday, October 29, 2018 10:24:36 AM
> *To:* Barry Smith
> *Cc:* Fengwen Wang; PETSc; PETSc
> *Subject:* Re: [petsc-maint] How to impose boundary conditions using DMDA
>
>
> On Sun, Oct 28, 2018 at 12:18 PM Smith, Barry F. <bsmith at mcs.anl.gov>
> wrote
>
>>     Matt,
>>
>>        How difficult would it be to impose such boundary conditions with
>> DMPlex? Presumably you just connect the mesh up "properly" and it is
>> straightforward?
>>
>
> If you figure out what topology is meant by this, it should not be hard.
> However, I
> cannot figure out what they mean right now.
>
>   Thanks,
>
>     Matt
>
>
>>    Barry
>>
>>
>> > On Oct 27, 2018, at 10:23 AM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>> >
>> > On Sat, Oct 27, 2018 at 2:02 AM Fengwen Wang <fwan at mek.dtu.dk> wrote:
>> > Dear Colleagues,
>> >
>> >
>> >
>> > I use the finite element method to solve my problem in Petsc.
>> >
>> >
>> >
>> > Mesh is defined as a  regular mesh using DMDA.  I have a special
>> boundary condition which I  do not know how to impose it in Petsc.
>> >
>> >
>> >
>> > In a 2D problem, the domain is unit size, two degrees of freedom per
>> node (u, v). I would like impose the following boundary condition:
>> >
>> >
>> >
>> > u(x=1) = -v ( y=1) and v(x=1 )= -u (y=1) .
>> >
>> >
>> >
>> > How can I impose such a boundary condition in Petsc?
>> >
>> > In a serial code, you could do this just by equating those variables,
>> but in parallel we have no support for such a boundary condition.
>> >
>> >   Thanks,
>> >
>> >      Matt
>> > Thanks a lot.
>> >
>> >
>> >
>> > Best regards
>> >
>> > Fengwen
>> >
>> >
>> >
>> >
>> >
>> > ____________________________________________________
>> > Senior Researcher
>> > Department of Mechanical Engineering, DTU
>> > Nils Koppels Allé
>> > Building 404
>> > 2800  Kgs. Lyngby
>> > fwan at mek.dtu.dk
>> >
>> >
>> > --
>> > 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
>> >
>> > https://www.cse.buffalo.edu/~knepley/
>>
>>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181029/41cf7c80/attachment.html>


More information about the petsc-users mailing list