Code covered by the BSD License  

Highlights from
Edges generation

5.0 | 1 rating Rate this file 18 Downloads (last 30 days) File Size: 2.97 MB File ID: #22299
image thumbnail

Edges generation



03 Dec 2008 (Updated )

Algorithm generates edges of a conforming 2D/3D triangulation.

| Watch this File

File Information

Given a conforming triangulation as as matrix of vertices numbers corresponding to each triangular element , the algorithm generates and numbers edges of triangulation, so that edges shared by two elements are counted only once. It also generates list of edges belonging to each triangle a list of elements sharing the same edge.

Knowledge of edges is useful e.g. for the implementation of adaptive mesh refinements and edge-based finite elements such as Raviart-Thomas, Crouzeix-Raviart or Nedelec elements.

To test the functionality of the algorithm, run "test.m".

Performance of my notebook:
2D triangulation: 524288 elements, 263169 nodes --> 787456 edges numbered. Time= 1.23 seconds.
3D triangulation: 196608 elements, 35937 nodes --> 238688 edges numbered. Time= 1.12 seconds.


This file inspired Double Porosity Model.

Required Products MATLAB Compiler
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
06 Jun 2010 Immanuel Anjam

Works nicely and very fast for 3D also. The updated code is even more short and elegant than before. Nice.

Comment only
05 May 2009 Jan Valdman

I am still working on extension to 3D, I already know one way, how to do it. Hope to provide the code soon.

Comment only
05 May 2009 Immanuel Anjam  
05 May 2009 Immanuel Anjam

Greetings from Finland!

Thanks for sharing this code. I have been using it alongside a 2D Nedelec-FEM implementation.

This kind of code could be useful in 3D also. It seems that mesh generators always provide elements in terms of nodes, but for edge-based finite elements it is necessary to have the information in terms of edges.

Comment only
04 Dec 2008

updated description

05 Dec 2008

better description, difference to other methods

05 Dec 2008


06 Dec 2008

function entryInWhichRows added

06 Dec 2008

better description

06 May 2009

Extended to 3D (many thanks to John D'Errico for his speed up advice)

Contact us