Subject: CGAL users discussion list
List archive
- From: Matthew Russell <>
- To:
- Subject: Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss
- Date: Wed, 17 Mar 2021 00:19:39 +0000
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-hdrordr: A9a23:qFqBmqiINzlIHtW7h25tNocOb3BQX3dw3DAbvn1ZSRFFG/Gwv/uF2NwGyB75jysQUnk8mdaGfJKNW2/Y6IQd2+QsFJ+Ydk3DtHGzJI9vqbHjzTrpBjHk+odmv5tIW5NVTOf9BV0St63HySGzGdo43Z2j+Kenme/Rwx5WPHpXQotn6Bp0DRveN0VwShVPC5ZRLuvn2uNsoT28dXMLKvmhDn4eUOTZ4/HNnpTqYRkJbiRXpTWmpzWu9bL8Dlykzg4TOgk/i4sK3Erkt0jC5qulu+ym0RO07QPuxrlfhdeJ8KokOOWikc4QQw+Mti+JYJ1mQKCLuzo4ydvfjGoCtPnpj1MeM99o63XXF1vF7SfF/wX7yj4h5zvD5Daj8ALeiPf0Tj47FMZN7LgxGnS212MasMh4wOZ32QuixuJqJCndlyfw7cWgbWAIqmOIoGEvmeNWr3tTXZp2Us41kaUj/VhYGJpFISTi6IpPKpgNMOjg4p9tEW+yXjT8hC1C0dasVnM8ElOtWU4ZoPGY1DBQgTRQ01YY7NZ3pAZPyLsND71/o8jUOKVhk79DCuUMa7hmOesHScyrTkTQXBP3Nn6IK1iPLtBHB1v977rMpJkl7uCjf5IFiLEono7abV9evWkuP2XjFNOJx58O1hzWWm2yUXDMx6hllthEk4y5YICuHTyISVgoncflie4YGNfnV/G6P48TDOTkKWfoBIZVzwzzU5RfMhAlIY8ok+d+f2jLjtPAK4XsuOCeWu3UPqDRHTEtXX66AnZrZkm3GOxwqmSQHlPoihnYXH3gPmbl+4hrLaTc9+8PjIwENohGtBkJmU20j/v7bQFqg+gTRg9TMbnnmqS0qS2d5mDT9VhkPRJbEwJS+7XvU3RDoAcQKEPqebMfu9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El0H5CujwvIwjGxUIITjKGBOJEk7vfcw2TpPJQ6jG3X0bEoyVggWMpGc2O8wbVu8hDaQI/PnULenKmjceEQ3TXG6XyYnlaJ6UpXWQo1XaTeVm0EfWPXq8747wXMVeyAE7MiZy5I1dKCJ7QCUMDyllhCQL+3Pd3Cf2K8hGW3BRCS26iXYY7uU2oY1STZTkMDllZArj69KQEiC3L58CrlBzt0GAezMivEwaxFsHq+C3QM4USPZkxl2aCy/3Y9ivmVSvdV1bUB6n5JgwUxJ0602pftM/TFpwdle810ZNo85BJD2zucuVEheJOnKK9mixgVdAEl5yvG51BMEoxF1PMSgjYy1gMaAa2d2VJFMTif2MKoUoA=
Dear Iordan,
Thanks for this, and, as far as I'm concerned, no need to apologise.
It's an interesting way to look at the the problem and it makes a lot
of sense conceptually. However, in my experience, it is not how PBCs
are usually implemented in finite element solvers. Do you know of any
examples describing how to reformulate a periodic problem as a problem
on a torus or it's numerical implementation? The problem I'm solving
is Stokes flow in a periodic unit cell, with no-slip on the
non-periodic part of the boundary (the part that's kind-of
"inward-facing"; see `gmsh.jpg` in my first post).
Thanks,
Matt
On Tue, 16 Mar 2021 at 23:30, Iordan Iordanov <> wrote:
>
> Dear Matthew, Monique, all,
>
> Sorry to appear out of nowhere like this, but I would like to offer another
> perspective, perhaps.
>
> Matthew, you mention that in your FEM problem you want to define periodic
> boundary conditions.
> The need for specifying periodic boundary conditions in FEM problems comes
> from the fact that
> traditional meshes do not have a way to represent the periodic medium over
> which the equation
> to be solved is defined. In other words, you need to discretize your domain
> so that the vertices and
> faces coincide neatly, so that you know how to compute interactions and
> value propagations
> periodically, from one side to the other.
>
> The thing is, with a periodic mesh, you don't need to specify any boundary
> conditions, because there
> is no boundary. The CGAL periodic 3D mesh package represents a domain that
> "wraps around" in
> 3 dimensions, as the name implies, so the only things you need to define
> are the equation itself and the
> initial conditions. In this setting, boundary conditions actually do not
> make sense -- if you try to apply
> boundary conditions, you would end up splitting a torus only to glue it
> back together.
>
> Why not just use the torus? :)
>
> I am guessing it will require some re-formulating of your problem, but you
> will get much better results
> in the end, and your computation will be more efficient. The reason is
> that, when you define a traditional
> mesh, you need to store the boundary elements (vertices/faces) twice.
> Moreover, you need to keep track
> of which vertices coincide and when not to count interactions twice, so it
> is a bit messy. With the periodic
> mesh, you really don't save anything extra, and all the elements are
> unique. Every element knows its
> neighbors so computations are much more straightforward conceptually.
>
> I hope this has some meaning for you, and, once more, sorry for butting in
> like this.
>
> Best of luck and best regards,
> - Iordan
>
> On Wed, Mar 17, 2021 at 3:29 AM Matthew Russell <>
> wrote:
>>
>> Dear Monique,
>>
>> Thanks - I saw that example and have tried using a unit cube (defined
>> implicitly) as the second function in the vector but I don't think it
>> solves my problem. Is this what you had in mind? The resulting mesh is
>> similar to the example attached to my original email, except that it
>> can also include the region with the opposite sign (which I don't
>> require), depending on the chosen sign vectors.
>>
>> Apologies if I described the problem poorly! I would like to create a
>> collection of different meshes, one for each of a collection of
>> implicitly-defined regions, so I don't think it's a multiple domains
>> problem. On each mesh I will run a separate finite element simulation
>> with periodic boundary conditions. We can ignore the multiple meshes
>> here and consider just one. To make it easy to identify the periodic
>> boundaries in the FEM code, my first thought was to try to create
>> meshes where the cells at the boundaries lie on the facets of the
>> bounding cube as I mentioned earlier. It seems this isn't possible
>> with the periodic mesh package, but there may be a workaround using
>> the regular 3D mesh package as Mael suggested. I was wondering if
>> someone had any further hints on how to achieve this? It seems like a
>> difficult problem to manually place vertices on the intersection
>> between the bound cube's facets and the implicit region. I really
>> appreciate all your help with this!
>>
>> Thanks,
>> Matt
>>
>> On Tue, 16 Mar 2021 at 15:44, Monique Teillaud
>>
>>
>>
>> On Tue, 16 Mar 2021 at 15:44, Monique Teillaud
>>
>> <> wrote:
>> >
>> > Dear Matthew,
>> >
>> > If I understand correctly (I am not sure) you would like to mesh
>> > multiple domains.
>> > Does this example help you?
>> > https://doc.cgal.org/latest/Periodic_3_mesh_3/index.html#title19
>> >
>> > Best,
>> > --
>> > Monique Teillaud
>> > https://members.loria.fr/Monique.Teillaud/
>> > INRIA Nancy - Grand Est, LORIA
>> > Institut National de Recherche en Informatique et Automatique
>> >
>> > ----- Le 16 Mar 21, à 15:48, cgal-discuss a écrit :
>> >
>> > > Dear Monique,
>> > >
>> > > I agree that adding points on the facets of the bounding cube in the
>> > > right places would be a way to solve this. But this technique requires
>> > > a description of the regions on each facet that should be
>> > > triangulated. This is difficult because many of the surfaces I am
>> > > dealing with are defined implicitly and do not cover the entirety of
>> > > the cube's facets. Is there something in CGAL that would help do this?
>> > >
>> > > However, I suppose my actual issue is being able to accurately specify
>> > > boundary conditions. I was trying to make this easy by forcing the
>> > > boundaries of the mesh to align with bounding cube.
>> > >
>> > > With a triangulation generated by the periodic mesh package, is there
>> > > a way to colour or otherwise somehow mark the cell faces on each
>> > > boundary? I'm not sure this is a meaningful question given the
>> > > irregular nature of the boundaries!
>> > >
>> > > Sorry for the basic questions - I'm new to CGAL and still finding my
>> > > way around!
>> > >
>> > > Many thanks,
>> > > Matt
>> > >
>> > >
>> > > On Tue, 16 Mar 2021 at 10:54, Monique Teillaud
>> > > <> wrote:
>> > >>
>> > >> Dear Matthew,
>> > >>
>> > >> In fact, if you add points on the facets of the cube and you ensure
>> > >> that the
>> > >> facets are triangulated as mael suggests, then you are enforcing the
>> > >> periodicity through these points. You are not using the functionality
>> > >> that is
>> > >> offered by the periodic mesh package.
>> > >> In other words, this should rather be done with the non-periodic
>> > >> meshing
>> > >> package.
>> > >>
>> > >> (In fact I would be curious why you need the facets to be
>> > >> triangulated... Our
>> > >> algorithm is precisely designed to avoid adding such artificial
>> > >> points...)
>> > >>
>> > >> Best regards,
>> > >> --
>> > >> Monique Teillaud
>> > >> https://members.loria.fr/Monique.Teillaud/
>> > >> INRIA Nancy - Grand Est, LORIA
>> > >> Institut National de Recherche en Informatique et Automatique
>> > >>
>> > >> ----- Le 15 Mar 21, à 17:21, cgal-discuss <> a
>> > >> écrit :
>> > >>
>> > >> Hi Mael,
>> > >>
>> > >> Thanks for your reply.
>> > >>
>> > >> It's a shame the periodic mesher can't do this currently. Would you
>> > >> be able to
>> > >> give some hints on how to implement your idea of using the standard
>> > >> 3D mesh
>> > >> package? I'm slightly wary about manually moving vertices around -
>> > >> won't this
>> > >> reduce the quality of the resulting mesh?
>> > >>
>> > >> Thanks,
>> > >> Matt
>> > >>
>> > >> On Mon, 15 Mar 2021, 08:04 Mael Rouxel-Labbé,
>> > >> <> wrote:
>> > >>>
>> > >>> Hello,
>> > >>>
>> > >>> This is not currently possible in a straightforward manner in the
>> > >>> periodic mesh generator, as there is no 3D constrained Delaunay
>> > >>> triangulations in CGAL yet.
>> > >>>
>> > >>> In a less straight forward manner, if you wish your elements to lie
>> > >>> exactly on the boundary of the periodic domain, you might be able to
>> > >>> do
>> > >>> away with the periodic mesh generation algorithm: generate a 3D mesh
>> > >>> of
>> > >>> the implicit function clipped by the periodic domain, and then ensure
>> > >>> that the vertices are identical on both sides.
>> > >>>
>> > >>> Best,
>> > >>> Mael
>> > >>>
>> > >>> On 15/03/2021 02:05, Matthew Russell (
>> > >>> via
>> > >>> cgal-discuss Mailing List) wrote:
>> > >>> > Dear all,
>> > >>> >
>> > >>> > I would like to generate periodic 3D meshes of regions bounded by
>> > >>> > implicit functions and so I was pleased to find examples such as
>> > >>> > [1]
>> > >>> > that do almost exactly what I want. The problem that I'm having is
>> > >>> > that cells in the meshes generated from this example are able to
>> > >>> > lie
>> > >>> > across the bounding unit cube, but to use the meshes in finite
>> > >>> > element
>> > >>> > simulations I need the faces of the cells to align with the
>> > >>> > boundaries
>> > >>> > of the cube.
>> > >>> >
>> > >>> > For example, the CGAL example [1] (with a different implciit
>> > >>> > function)
>> > >>> > generates meshes like [cgal.jpg], but I would like one like
>> > >>> > [gmsh.jpg].
>> > >>> >
>> > >>> > I haven't been able to find a way to do this in CGAL. Is it
>> > >>> > possible?
>> > >>> >
>> > >>> > Many thanks,
>> > >>> > Matt
>> > >>> >
>> > >>> > [1]
>> > >>> > https://doc.cgal.org/latest/Periodic_3_mesh_3/Periodic_3_mesh_3_2mesh_implicit_shape_8cpp-example.html
>> > >>> >
>> > >>>
>> > >>> --
>> > >>> You are currently subscribed to cgal-discuss.
>> > >>> To unsubscribe or access the archives, go to
>> > >>> https://sympa.inria.fr/sympa/info/cgal-discuss
>> > >>>
>> > >>>
>> > >>
>> > >> --
>> > >> You are currently subscribed to cgal-discuss.
>> > >> To unsubscribe or access the archives, go to
>> > >> https://sympa.inria.fr/sympa/info/cgal-discuss
>> > >>
>> > >>
>> > >> --
>> > >> You are currently subscribed to cgal-discuss.
>> > >> To unsubscribe or access the archives, go to
>> > >> https://sympa.inria.fr/sympa/info/cgal-discuss
>> > >>
>> > >
>> > > --
>> > > You are currently subscribed to cgal-discuss.
>> > > To unsubscribe or access the archives, go to
>> > > https://sympa.inria.fr/sympa/info/cgal-discuss
>> >
>> > --
>> > You are currently subscribed to cgal-discuss.
>> > To unsubscribe or access the archives, go to
>> > https://sympa.inria.fr/sympa/info/cgal-discuss
>> >
>> >
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>
>>
>
>
> --
> Iordan Iordanov, PhD
> https://imiordanov.github.io/
>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
- [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/15/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Mael Rouxel-Labbé, 03/15/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/15/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Monique Teillaud, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Monique Teillaud, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Iordan Iordanov, 03/17/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/17/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Mael Rouxel-Labbé, 03/17/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/17/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Mael Rouxel-Labbé, 03/17/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Monique Teillaud, 03/16/2021
- [cgal-discuss] PRIVATE - Re: Periodic 3D mesh aligned with bounding cube cgal-discuss, Mael Rouxel-Labbé, 03/17/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Monique Teillaud, 03/16/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Matthew Russell, 03/15/2021
- Re: [cgal-discuss] Periodic 3D mesh aligned with bounding cube cgal-discuss, Mael Rouxel-Labbé, 03/15/2021
Archive powered by MHonArc 2.6.19+.