generateMesh
Create triangular or tetrahedral mesh
Description
generateMesh(
creates a mesh and
stores it in the model
)model
object. model
must
contain a geometry. For details about creating a geometry and including it in a
model, see Geometry and Mesh and the
geometry functions listed there.
generateMesh(
modifies the mesh creation according to the model
,Name,Value
)Name,Value
arguments.
also returns the mesh to the MATLAB® workspace, using any of the previous syntaxes.mesh
= generateMesh(___)
Examples
Input Arguments
Output Arguments
More About
Tips
generateMesh
can return slightly different meshes in different releases. For example, the number of elements in the mesh can change. Avoid writing code that relies on explicitly specified node and element IDs or node and element counts.generateMesh
uses the following set of rules when you specify local element sizes withHface
,Hedge
, orHvertex
. These rules are valid for both the default and custom values ofHmin
andHmax
.If you specify local sizes for regions near each other,
generateMesh
uses the minimum size. For example, if you specify size 1 on an edge and size 0.5 on one of its vertices, the function gradually reduces the element sizes in the proximity of that vertex.If you specify local sizes smaller than
Hmin
,generateMesh
ignoresHmin
in those localities.If you specify local sizes larger than
Hmax
,generateMesh
ignores the specified local sizes.Hmax
is not exceeded anywhere in the mesh.