create reference simplex in 2d (triangle) based on three vertices

19 views
Skip to first unread message

Mathieu

unread,
Jul 18, 2023, 5:07:06 AM7/18/23
to deal.II User Group
Hello everyone,

I read the simplex support documentation and was wondering 
whether it is possible to create a triangle in 2d based on three vertices?

The quadrilateral pendant is GridGenerator::general_cell().
Contrary to what one might think, GridGenerator::simplex()
transforms the reference simplex into three quadrilaterals,
which is also not what I am looking for.

So is there a way to create a mesh consisting of one triangle (using three vertices)?
I have deal.II 9.3.2 installed, but can upgrade if necessary.

Thank you,
Math

Daniel Arndt

unread,
Jul 18, 2023, 11:14:14 AM7/18/23
to dea...@googlegroups.com
Mathieu,

and then move the vertices to your liking, e.g. by using GridTools::transform (https://www.dealii.org/current/doxygen/deal.II/namespaceGridTools.html#a212e99cf0d923cebfa04f1d23fa60b04).

Best,
Daniel

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/1b0cefaa-24fe-4e7c-8f9a-aaaf72d8ee2cn%40googlegroups.com.

Mathieu

unread,
Jul 18, 2023, 1:49:31 PM7/18/23
to deal.II User Group
Thank you Daniel!

I have one follow-up (I apologize for this basic question):
-The ReferenceCall that I have to pass to GridGenerator::reference_cell
only has a default constructor.
So how can I create a simplex using this constructor?

Best,
Math

Daniel Arndt

unread,
Jul 18, 2023, 2:56:38 PM7/18/23
to dea...@googlegroups.com
Math,

to create a ReferenceCell object describing the reference simplex.

Best,
Daniel

Reply all
Reply to author
Forward
0 new messages