Triangulation of one dimensional curves in three dimensional space

30 views
Skip to first unread message

Ludwig H

unread,
Jul 17, 2018, 8:42:04 AM7/17/18
to deal.II User Group
Hello,

I am currently working on an elastic model of one-dimensional Cosserat-rods. Applying different loads onto the rod it can deform in space. Thus, dim=1, spacedim=3.

Now I'm struggling with a quite basic problem:

Currently I make the triangulation of the straight rod with: 

   Triangulation<dim,spacedim> triangulation;
   GridGenerator::hyper_cube(triangulation,0,length_of_rod);
   triangulation.refine_global(n);

The triangulation takes the shape of a straight line with expansion direction x and the length "length_of_rod".
Now I would like to obtain a triangulation with a different shape than the straight line. Is there a possibility to make triangulations of one dimensional curves in three dimensional space? In my special case, I would like the curve to be a quarter circle.

If you have any ideas please let me know.

Thank you in advance,

Ludwig

Wolfgang Bangerth

unread,
Jul 17, 2018, 12:52:08 PM7/17/18
to dea...@googlegroups.com
On 07/17/2018 06:42 AM, 'Ludwig H' via deal.II User Group wrote:
>
> Now I'm struggling with a quite basic problem:
>
> Currently I make the triangulation of the straight rod with:
>
>    Triangulation<dim,spacedim> triangulation;
>    GridGenerator::hyper_cube(triangulation,0,length_of_rod);
>    triangulation.refine_global(n);
>
> The triangulation takes the shape of a straight line with expansion direction
> x and the length "length_of_rod".
> Now I would like to obtain a triangulation with a different shape than the
> straight line. Is there a possibility to make triangulations of one
> dimensional curves in three dimensional space? In my special case, I would
> like the curve to be a quarter circle.

Yes, take a look at step-49. In particular, you want to consider
GridTools::transform(), which moves each vertex of a mesh to a different
location :-)

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Ludwig H

unread,
Jul 18, 2018, 5:06:51 AM7/18/18
to deal.II User Group
Hi,
thank you for your quick answer.
I will give it a try with transform().
Ludwig
Reply all
Reply to author
Forward
0 new messages