Académique Documents
Professionnel Documents
Culture Documents
DistMeshFunctionReference
DistMeshFunctionReference
Back
boundedges
e=boundedges(p,t)
Syntax:
Description: Findalltheboundaryedgeseintriangularmeshp,t.
Comments: UsefulforimplementationofboundaryconditionsforPDE
solvers.Seesurftrifor3Dversion.
circumcenter
[pc,r]=circumcenter(p,t)
Syntax:
Description: Computethecircumcenterspcandthecircumradiirforall
trianglesinthemeshp,t.
Comments: Notvectorized.
dcircle
d=dcircle(p,xc,yc,r)
Syntax:
Description: Computesigneddistancefunctionforcirclecenteredatxc,yc
withradiusr.
Comments:
ddiff
d=ddiff(d1,d2)
Syntax:
Description: Computesigneddistancefunctionforsetdifferenceoftwo
regionsdescribedbysigneddistancefunctionsd1,d2.
Comments: Notexactlythetruesigneddistancefunctionforthedifference,
forexamplearoundcorners.
dellipse
d=dellipse(p,axes)
Syntax:
Description: Computedistancefrompointsptotheellipsecenteredatthe
originwithaxes=[a,b].
Comments: C++code,usesLAPACKforeigenvalueproblem.
dellipsoid
d=dellipsoid(p,axes)
Syntax:
Description: Computedistancefrompointsptotheellipsoidcenteredatthe
originwithaxes=[a,b,c].
Comments: C++code,usesLAPACKforeigenvalueproblem.
dexpr
d=dexpr(p,fin,nit,alpha)
Syntax:
Description: Computesigneddistancefunctionforgeneralimplicitexpression
fin.Theparametersnitandalphahavethedefaultvalues20
and0.1.
Comments: RequirestheSymbolicToolbox,althougheasytorewriteto
acceptderivativesoffinasinputs.Theperformanceispoor,a
simpleCimplementationmakesabigdifference.
http://persson.berkeley.edu/distmesh/funcref.html
1/5
24/6/2016
DistMeshFunctionReference
dintersect
d=dintersect(d1,d2)
Syntax:
Description: Computesigneddistancefunctionforsetintersectionoftwo
regionsdescribedbysigneddistancefunctionsd1,d2.
Comments: Notexactlythetruesigneddistancefunctionforthe
intersection,forexamplearoundcorners.
distmesh2d
[p,t]=distmesh2d(fd,fh,h0,bbox,pfix,fparams)
Syntax:
Description: 2DMeshGenerator.Seeotherdocumentationfordetailson
usage.
Comments:
distmeshnd
[p,t]=distmeshnd(fd,fh,h0,bbox,pfix,fparams)
Syntax:
Description: 3DMeshGenerator.Seeotherdocumentationfordetailson
usage.
Comments:
distmeshsurface
[p,t]=distmeshsurface(fd,fh,h0,bbox,fparams)
Syntax:
Description: 3DSurfaceMeshGenerator.Seeotherdocumentationfor
detailsonusage.
Comments:
dmatrix
d=dmatrix(p,xx,yy,dd)
Syntax:
Description: Computesigneddistancefunctionbyinterpolationofthevalues
ddontheCartesiangridxx,yy.
Comments: xx,yycanbecreatedwithmeshgrid.
dmatrix3d
d=dmatrix3d(p,xx,yy,zz,dd)
Syntax:
Description: Computesigneddistancefunctionbyinterpolationofthevalues
ddontheCartesiangridxx,yy,zz.
Comments: xx,yy,zzcanbecreatedwithndgrid.
dpoly
d=dpoly(p,pv)
Syntax:
Description: Computesigneddistancefunctionforpolygonwithverticespv.
Comments: Usesdsegmentandinpolygon.Itisusuallygoodtoprovidepv
asfixpointstodistmesh2d.
drectangle
d=drectangle(p,x1,x2,y1,y2)
Syntax:
Description: Computesigneddistancefunctionforrectanglewithcorners
(x1,y1),(x2,y1),(x1,y2),(x2,y2).
Comments: Incorrectdistancetothefourcorners,seedrectangle0fora
truedistancefunction.
http://persson.berkeley.edu/distmesh/funcref.html
2/5
24/6/2016
DistMeshFunctionReference
drectangle0
d=drectangle0(p,x1,x2,y1,y2)
Syntax:
Description: Computesigneddistancefunctionforrectanglewithcorners
(x1,y1),(x2,y1),(x1,y2),(x2,y2).
Comments: Seedrectangleforsimplerversionignoringcorners.
dsegment
ds=dsegment(p,pv)
Syntax:
Description: Computedistancefrompointsptothelinesegmentsinpv.
Comments: C++code,usedbydpoly.
dsphere
d=dsphere(p,xc,yc,zc,r)
Syntax:
Description: Computesigneddistancefunctionforspherecenteredat
xc,yc,zcwithradiusr.
Comments:
dunion
d=dunion(d1,d2)
Syntax:
Description: Computesigneddistancefunctionforsetunionoftworegions
describedbysigneddistancefunctionsd1,d2.
Comments: Notexactlythetruesigneddistancefunctionfortheunion,for
examplearoundcorners.
fixmesh
[p,t]=fixmesh(p,t)
Syntax:
Description: Removeduplicatedandunusednodesfrompandupdatet
correspondingly.Alsomakeallelementsorientationsequal.
Comments:
hmatrix
h=hmatrix(p,xx,yy,dd,hh)
Syntax:
Description: Computemeshsizefunctionbyinterpolationofthevalueshhon
theCartesiangridxx,yy.
Comments: xx,yycanbecreatedwithmeshgrid.Theparameterddisnot
used,butincludedtogetasyntaxconsistentwithdmatrix.
hmatrix3d
h=hmatrix3d(p,xx,yy,zz,dd,hh)
Syntax:
Description: Computemeshsizefunctionbyinterpolationofthevalueshhon
theCartesiangridxx,yy,zz.
Comments: xx,yy,zzcanbecreatedwithndgrid.Theparameterddisnot
used,butincludedtogetasyntaxconsistentwithdmatrix.
huniform
h=huniform(p)
Syntax:
Description: Implementsthetrivialuniformmeshsizefunctionh=1.
Comments:
meshdemo2d
http://persson.berkeley.edu/distmesh/funcref.html
3/5
24/6/2016
DistMeshFunctionReference
meshdemo2d
Syntax:
Description: Demonstrationofdistmesh2d.
Comments:
meshdemond
meshdemond
Syntax:
Description: Demonstrationofdistmeshnd.
Comments:
mkt2t
[t2t,t2n]=mkt2t(t)
Syntax:
Description: Computeelementconnectivitiesfromelementindices.
Comments:
protate
p=protate(p,phi)
Syntax:
Description: Rotatepointsptheanglephiaroundorigin.
Comments:
pshift
p=pshift(p,x0,y0)
Syntax:
Description: Movepointspby(x0,y0).
Comments:
simpplot
simpplot(p,t,expr,bcol,icol)
Syntax:
Description: Plot2Dor3Dmeshp,t.Theparametersexpr,bcol,icolare
onlyusedin3Dandtheyhavedefaultvalues.
Comments:
simpqual
q=simpqual(p,t,type)
Syntax:
Description: Computequalitiesoftriangularortetrahedralelementsinthe
meshp,t.Iftype==1(default)theinradius/outradius
expressionisused.Iftype==2aslightlydifferentexpressionis
used.
Comments:
simpvol
v=simpvol(p,t)
Syntax:
Description: Computethesignedvolumesofthesimplexelementsinthe
meshp,t.
Comments:
surftri
tri=surftri(p,t)
Syntax:
Description: Findallthesurfacetrianglestriintetrahedralmeshp,t.
Comments: Usedbysimpplot.Alsousefulforimplementationofboundary
conditionsforPDEsolvers.Seeboundedgesfor2Dversion.
http://persson.berkeley.edu/distmesh/funcref.html
4/5
24/6/2016
DistMeshFunctionReference
uniformity
u=uniformity(p,t,fh,fparams)
Syntax:
Description: Computes"uniformitymeasure",thatis,howclosetheelement
sizesinthemeshp,taretothedesiredmeshsizefunctionfh.
Comments:
PerOlofPersson
DepartmentofMathematics,MIT
"lastname"@math.mit.edu
http://persson.berkeley.edu/distmesh/funcref.html
5/5