WOLFRAM NOTEBOOK

New in:
0.0
| Modified in:
| Obsolete in:
| Excised in:
Categorization
Keywords
Syntax Templates
Details
DistMesh
DistMesh[r]
generates an
ElementMesh
object from a region
r
.
The
DistMesh`
package provides a Wolfram Language port of DistMesh.
DistMesh
is free software under the GNU Public License 2.0 and so is this package.
DistMesh[r]
generates a high quality
ElementMesh
object that approximates a possibly symbolic region
r
.
The specification for regions
r
includes objects described by
geometric regions
and
ImplicitRegion
.
The region
r
should be a constant region for which
ConstantRegionQ
gives
True
.
DistMesh
has the same options as
ToElementMesh
, with the following additions:
"DistMeshRefinementFunction"
None
control element refinement
"ScaleDerivative"
True
improve derivative compuation
MaxIterations
150
number of improvement interations
If
DistMesh
cannot generate an
ElementMesh
, then
$Failed
is returned.
If
DistMesh
works in 2 dimensions.
Tutorials
Element Mesh Generation
Element Mesh Visualization
Finite Element Programming
Related Demonstrations
XXXX
Related Links
XXXX
See Also
ToElementMesh
ToNumericalRegion
ElementMesh
ImplicitRegion
More About
XXXX
Examples
MoreExamples
Load the package:
In[1]:=
Needs["DistMesh`"]
Generate an element mesh for a disk:
In[2]:=
DistMesh[Disk[]]
Out[2]=
ElementMesh[{{-0.997448,0.99868},{-0.99949,1.00001}},{TriangleElement[<270>]}]
Visualize the element mesh wireframe:
In[3]:=
%["Wireframe"]
Out[3]=
...........
Create a mesh from an
ImplicitRegion
:
In[1]:=
DistMesh[ImplicitRegion[Abs[0.7-Sqrt[x^2+y^2]]-0.30,{x,y}]];%["Wireframe"]
Out[2]=
More Examples
Scope
Create a mesh from a
RegionDifference
:
In[3]:=
Ω=RegionDifference[Rectangle[{-1,-1},{1,1}],Disk[{0,0},1/2]];DistMesh[Ω];
In[5]:=
%["Wireframe"]
Out[5]=
Create a mesh from the same region and fixate coordinates:
In[6]:=
DistMesh[Ω,"IncludePoints"->{{-1,-1},{1,-1},{1,1},{-1,1}}];
In[7]:=
%["Wireframe"]
Out[7]=
Create and visualize :
Visualize the solution:
Visualize the mesh:
Generate and visualize the mesh:
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.