Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Refine triangular mesh

**This page describes the legacy workflow. New features might
not be compatible with the legacy workflow. For the corresponding
step in the recommended workflow, see generateMesh.**

[p1,e1,t1] = refinemesh(g,p,e,t) [p1,e1,t1] = refinemesh(g,p,e,t,'regular') [p1,e1,t1] = refinemesh(g,p,e,t,'longest') [p1,e1,t1] = refinemesh(g,p,e,t,it) [p1,e1,t1] = refinemesh(g,p,e,t,it,'regular') [p1,e1,t1] = refinemesh(g,p,e,t,it,'longest') [p1,e1,t1,u1] = refinemesh(g,p,e,t,u) [p1,e1,t1,u1] = refinemesh(g,p,e,t,u,'regular') [p1,e1,t1,u1] = refinemesh(g,p,e,t,u,'longest') [p1,e1,t1,u1] = refinemesh(g,p,e,t,u,it) [p1,e1,t1,u1] = refinemesh(g,p,e,t,u,it,'regular') [p1,e1,t1,u1] = refinemesh(g,p,e,t,u,it,'longest')

`[p1,e1,t1] = refinemesh(g,p,e,t)`

returns
a refined version of the triangular mesh specified by the geometry `g`

,
Point matrix `p`

, Edge matrix `e`

,
and Triangle matrix `t`

.

The triangular mesh is given by the mesh data `p`

, `e`

,
and `t`

. For details on the mesh data representation,
see Mesh Data.

`[p1,e1,t1,u1] = refinemesh(g,p,e,t,u)`

refines
the mesh and also extends the function `u`

to the
new mesh by linear interpolation. The number of rows in `u`

should
correspond to the number of columns in `p`

, and `u1`

has
as many rows as there are points in `p1`

. Each column
of `u`

is interpolated separately.

An extra input argument `it`

is interpreted
as a list of subdomains to refine, if it is a row vector, or a list
of triangles to refine, if it is a column vector.

The default refinement method is regular refinement, where all
of the specified triangles are divided into four triangles of the
same shape. Longest edge refinement, where the longest edge of each
specified triangle is bisected, can be demanded by giving `longest`

as
a final parameter. Using `regular`

as a final parameter
results in regular refinement. Some triangles outside of the specified
set may also be refined to preserve the triangulation and its quality.

Was this topic helpful?