登 录
註 冊
论坛
微波仿真网
注册
登录论坛可查看更多信息
微波仿真论坛
>
程序
>
DistMesh - A Simple Mesh Generator in MATLAB
发帖
回复
6621
阅读
0
回复
[
资料共享
]
DistMesh - A Simple Mesh Generator in MATLAB
离线
febi
UID :2537
注册:
2007-05-11
登录:
2016-05-05
发帖:
123
等级:
退休版主
0楼
发表于: 2008-03-11 00:17:21
,;_+o]
DistMesh - A Simple Mesh Generator in MATLAB
T1]?E]m{
*!%lBt{2
http://www-math.mit.edu/%7Epersson/mesh/
s{-gsSmE
IdQ./@?
News (Mar 16, 2005)
7~ PL8
A new function "fixmesh" removes duplicated and unused nodes from a mesh generated by DistMesh. It also makes the element orientations equal. This might be necessary when the mesh is used in, for example, a finite element code. Please download updated zip/tar files from below.
EHk\Q\
Note that the current version of DistMesh requires true signed distance functions for the geometries. For example, an ellipse can not be modeled by scaling the x- and y-coordinates in the circle distance function. Instead, compute real distances (for the ellipse, see "dellipse"), or use the approximate projections that I proposed in Section 3.2 of my thesis (a very simple modification to DistMesh).
`&M,B=E
Description
DMM<,1
DistMesh is a simple MATLAB code for generation of unstructured triangular and tetrahedral meshes. It was developed by Per-Olof Persson and Gilbert Strang in the Department of Mathematics at MIT. A detailed description of the program is provided in our SIAM Review paper, see documentation below.
Zge(UhZ
@eJCr)#}
One reason that the code is short and simple is that the geometries are specified by Signed Distance Functions. These give the shortest distance from any point in space to the boundary of the domain. The sign is negative inside the region and positive outside. A simple example is the unit circle in 2-D, which has the distance function d=r-1, where r is the distance from the origin. For more complicated geometries the distance function can be computed by interpolation between values on a grid, a common representation for level set methods.
H/c (m|KK
qx t0Jr8
For the actual mesh generation, DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimize the node locations by a force-based smoothing procedure. The topology is regularly updated by Delaunay. The boundary points are only allowed to move tangentially to the boundary by projections using the distance function. This iterative procedure typically results in very well-shaped meshes.
J#zr50@@
G18w3BFx
Our aim with this code is simplicity, so that everyone can understand the code and modify it according to their needs. The code is not entirely robust (that is, it might not terminate and return a well-shaped mesh), and it is relatively slow. However, our current research shows that these issues can be resolved in an optimized C++ code, and we believe our simple MATLAB code is important for demonstration of the underlying principles.
` y\)X C7
N% 4"9K
To use the code, simply download it from below and run it from MATLAB. For a quick demonstration, type "meshdemo2d" or "meshdemond". For more details see the documentation.
'v"=
V5w1ET
Download
/]_ t->
Download one of the following archives and unpack it to a directory. Add this directory to your MATLAB path, or make it the current directory. The code contains one C++ file (for polygon distance functions). Binaries for PC Windows and Linux compiled on MATLAB 6.5 are provided, as well as the source code.
M2O_kOeZ
} o%^ Mu B
distmesh.zip Complete source code (ZIP archive)
TIWR[r1!
distmesh.tar Complete source code (TAR archive)
|^6{3a
If you are using MATLAB 6.1, download the following patch as well.
X H-_tvB
}(oeNPM8
distmesh_ml61patch.zip MATLAB 6.1 patch (ZIP archive)
q`VL i
distmesh_ml61patch.tar MATLAB 6.1 patch (TAR archive)
b6bs .
DistMesh is distributed under the GNU GPL; see the License and Copyright notice for more information.
z3Q&O$5\
5&ku]l+
Documentation
mHxR4%i5
P.-O. Persson, G. Strang, A Simple Mesh Generator in MATLAB.
$-iEcxsi
SIAM Review, Volume 46 (2), pp. 329 ..
l4>^79* *
@1MnJP
未注册仅能浏览
部分内容
,查看
全部内容及附件
请先
登录
或
注册
共
条评分
磁砖
发帖
回复