During the programming of my finite element code, I was in need of a mesh generator in order to not be constrained to only rectangular plates. The variety of the different code available is quite impressive. After testing several codes, my personal choice is DistMesh, a generator able to produce triangles and tetrahedrons.

DistMesh author's website : http://persson.berkeley.edu/distmesh/
The only issue I had with DistMesh is that it is unable to produce 6 node triangles. My quick fix consisted in modifying the function triangulation_l2q from John Burkardt. It is now possible to feed the node connectivity matrix and the node list to the function to obtain a new node connectivity matrix and a new node list.
Here is my modified version of the function
Here is my modified version of the function
function [p t]=triangulation_l2q (p,t)
%
%% MAIN is the main program for TRIANGULATION_L2Q.
%
% Discussion:
%
% TRIANGULATION_L2Q makes a quadratic triangulation from a linear one.
%
% Usage:
%
% triangulation_l2q ( p, t )
%
% where p is nodelist and t is the node element connection matrix.
...
This solution is not as good as if distmesh was able to handle 6 node triangles since it doesn't follow the exact contour given to DistMesh.
Thanks for sharing this article, it has really been a interesting read. I've personally never dealt much with mesh generation before. It's still new to me, but I'd love to learn some more about all of it.
ReplyDelete