cellEdges
Description
Examples
Edges Belonging to Specified Cells
Find edges belonging to the boundaries of the two middle cylinders in a geometry consisting of four stacked cylinders.
Create a geometry that consists of four stacked cylinders.
gm = multicylinder(5,[1 2 3 4],"ZOffset",[0 1 3 6])
gm = DiscreteGeometry with properties: NumCells: 4 NumFaces: 9 NumEdges: 5 NumVertices: 5 Vertices: [5x3 double]
Plot the geometry with the cell and edge labels.
pdegplot(gm,"CellLabels","on","EdgeLabels","on","FaceAlpha",0.2)
Find edges belonging to the boundaries of cells 2 and 3.
edgeIDs = cellEdges(gm,[2 3])
edgeIDs = 1×3
2 3 4
Cell Edges Belonging to Internal and External Faces
Find edges belonging to the boundaries of the outer cuboid in a geometry consisting of two nested cuboids.
Create a geometry that consists of two nested cuboids of the same height.
gm = multicuboid([2 5],[4 10],3)
gm = DiscreteGeometry with properties: NumCells: 2 NumFaces: 12 NumEdges: 24 NumVertices: 16 Vertices: [16x3 double]
Plot the geometry with the cell labels.
pdegplot(gm,"CellLabels","on","FaceAlpha",0.2)
Find all edges belonging to the boundaries of the outer cell. Show the first 10 edges.
edgeIDs = cellEdges(gm,2); edgeIDs(1:10)
ans = 1×10
1 2 3 4 5 6 7 8 9 10
From all edges belonging to the boundaries of the outer cell, return the edges belonging to only the internal faces. Internal faces are faces shared between multiple cells.
edgeIDs_int = cellEdges(gm,2,"internal")
edgeIDs_int = 1×4
9 10 11 12
From all edges belonging to the boundaries of the outer cell, return the edges belonging to the external faces. Show the first 10 edges.
edgeIDs_ext = cellEdges(gm,2,"external");
edgeIDs_ext(1:10)
ans = 1×10
1 2 3 4 5 6 7 8 13 14
Input Arguments
g
— 3-D geometry
fegeometry
object | DiscreteGeometry
object
3-D geometry, specified as an fegeometry
object
or a DiscreteGeometry
object.
RegionID
— Cell ID
positive number | vector of positive numbers
Cell ID, specified as a positive number or a vector of positive numbers. Each number represents a cell ID.
FilterType
— Type of edges to return
"all"
(default) | "internal"
| "external"
Type of edges to return, specified as "internal"
,
"external"
, or "all"
. Depending on this
argument, cellEdges
returns these types of faces:
"internal"
— Edges belonging to only internal faces. Internal faces are faces shared between multiple cells."external"
— Edges belonging to only external faces. External faces are faces not shared between multiple cells."all"
— All edges belonging to the specified cells.
Output Arguments
EdgeID
— IDs of edges belonging to boundaries of specified cells
positive number | vector of positive numbers
IDs of edges belonging to boundaries of specified cells, returned as a positive number or a vector of positive numbers.
Version History
Introduced in R2021aR2023a: Finite element model
cellEdges
now accepts geometries specified by fegeometry
objects.
See Also
Functions
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)