Node duplication in deal.ii

38 views
Skip to first unread message

Behrooz Karami

unread,
Oct 2, 2020, 5:51:50 AM10/2/20
to deal.II User Group
Dear All,

Is it possible to duplicate nodes/vertices in deal.ii?
I want to duplicate nodes at the interface of two domains so that the could get fully separated.
Any ideas are appreciated.

Best,
Behrooz




simon...@gmail.com

unread,
Oct 2, 2020, 8:30:58 AM10/2/20
to deal.II User Group
Hi,
if you have a single triangulation, you can put the solution to the "left" and "right" of the interface into different components of a vector valued element. For example:

FESystem<dim> left_element(FE_Q<dim>(1), FE_Nothing<dim>());
FESystem<dim> right_element(FE_Nothing<dim>(), FE_Q<dim>(1));

hp::FECollection<dim> fe_collection(left_element, right_element);

Then you can select which cells should use which element as in step-46:
www.dealii.org/current/doxygen/deal.II/step_46.html

Best,
Simon

Jean-Paul Pelteret

unread,
Oct 2, 2020, 4:44:12 PM10/2/20
to dea...@googlegroups.com
Hi Behrooz,

To complement Simon’s suggestion, I can think of two more ways to achieve what you’re wanting but will affect the mesh itself. Whether or the second suggestion is a reasonable approach for you depends on the complexity of the geometry that you’re creating.
1. Use an external mesh generator. Generating disconnected regions in the domain is normally a near trivial thing to do with these tools.
2. You can use the deal.II mesh tools to create a mesh that has a obvious  physical disconnect between the surfaces of interest. Maybe you’d do this by creating the coarse triangulation by hand, or two triangulations that you "merge together" (watch for the merge tolerance, which defines how close vertices must be to one another to be considered coincident). You can then use the mesh movement functions (see step-49) to move the grid such that you make the surfaces that you want coincident. When you move the mesh, the cell connectivity remains as is and so you’ll end up with two boundaries at this interface with no connection between the two.

Best,
Jean-Paul

-- 
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/7affe3d6-fd0e-4986-96a6-ee5d67420072n%40googlegroups.com.

Behrooz Karami

unread,
Oct 5, 2020, 6:32:31 AM10/5/20
to deal.II User Group
Dear Simon and Jean-Paul,

Thanks very much for your responses.Though I believe proposed solutions would work I just wanted to reduce the ambiguity in my question.

I would have a single triangulation and  we are aiming at a complex geometry such as particles. I mean it wouldn't remain just a surface.The reason I am into such an effort is that I want to handle jump conditions along the interface without going through the DG method.

I am able to extract nodal interfaces in dealii but I am curious to know how may I create a connectivity for (newly) duplicated nodes? Assuming two nodes along an edge become 4; and assuming that the elemental connectivity at left (material_id =0) remains untouched, how can I create or retrieve connectivity for the right side (material_id =1) with two new nodes (with new indexes/IDs but the same coordinates)?

Best,
Behrooz

Wolfgang Bangerth

unread,
Oct 5, 2020, 11:09:16 AM10/5/20
to dea...@googlegroups.com
On 10/5/20 4:32 AM, Behrooz Karami wrote:
> Dear Simon and Jean-Paul,
>
> Thanks very much for your responses.Though I believe proposed solutions would
> work I just wanted to reduce the ambiguity in my question.
>
> I would have a single triangulation and  we are aiming at a complex geometry
> such as particles. I mean it wouldn't remain just a surface.The reason I am
> into such an effort is that I want to handle jump conditions along the
> interface without going through the DG method.
>
> I am able to extract nodal interfaces in dealii but I am curious to know how
> may I create a connectivity for (newly) duplicated nodes? Assuming two nodes
> along an edge become 4; and assuming that the elemental connectivity at left
> (material_id =0) remains untouched, how can I create or retrieve connectivity
> for the right side (material_id =1) with two new nodes (with new indexes/IDs
> but the same coordinates)?

You will want to take a look at the implementation of this function and see
whether you can understand it if you draw a little picture:
https://github.com/dealii/dealii/blob/master/source/grid/grid_generator.cc#L3990-L4021
The function's documentation is here:
https://dealii.org/developer/doxygen/deal.II/namespaceGridGenerator.html#a5114625911496e4f51758fe00562a14a

Best
W.

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

Reply all
Reply to author
Forward
0 new messages