faceEdges
Description
Examples
Edges Belonging to Specified Faces of 3-D Geometry
Find edges belonging to the top and bottom faces of a block.
Create a block geometry.
gm = multicuboid(3,2,1)
gm = DiscreteGeometry with properties: NumCells: 1 NumFaces: 6 NumEdges: 12 NumVertices: 8 Vertices: [8x3 double]
Plot the geometry with the face labels.
pdegplot(gm,"FaceLabels","on","FaceAlpha",0.2)
Find edges belonging to faces 1 and 2.
edgeIDs = faceEdges(gm,[1 2])
edgeIDs = 1×8
1 2 3 4 5 6 7 8
Plot the geometry with the edge labels.
figure pdegplot(gm,"EdgeLabels","on","FaceAlpha",0.2)
Edges Belonging to Specified Faces of 2-D Geometry
Find edges belonging to two faces of the L-shaped membrane.
Create a model and include this geometry. The geometry of the L-shaped membrane is described in the file lshapeg
.
model = createpde(); gm = geometryFromEdges(model,@lshapeg)
gm = AnalyticGeometry with properties: NumCells: 0 NumFaces: 3 NumEdges: 10 NumVertices: 8 Vertices: [8x2 double]
Plot the geometry with the face labels.
pdegplot(gm,"FaceLabels","on")
Find edges belonging to faces 1 and 2.
edgeIDs = faceEdges(gm,[1 2])
edgeIDs = 1×8
1 2 3 6 7 8 9 10
Plot the geometry with the edge labels.
figure pdegplot(gm,"EdgeLabels","on")
Edges Belonging to Internal and External Faces
Find edges belonging to the side face of the inner 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 face labels.
pdegplot(gm,"FaceLabels","on","FaceAlpha",0.2)
Find all edges belonging to the side face of the inner cuboid.
edgeIDs = faceEdges(gm,6)
edgeIDs = 1×4
1 5 10 12
From all edges belonging to that face, return the edges belonging to only the internal faces. Internal faces are faces shared between multiple cells.
edgeIDs = faceEdges(gm,6,"internal")
edgeIDs = 1×2
10 12
From all edges belonging to that face, return the edges belonging to the external faces.
edgeIDs = faceEdges(gm,6,"external")
edgeIDs = 1×2
1 5
Plot the geometry with the edge labels.
pdegplot(gm,"EdgeLabels","on","FaceAlpha",0.2)
Input Arguments
g
— Geometry
fegeometry
object | DiscreteGeometry
object | AnalyticGeometry
object
Geometry, specified as an fegeometry
object, a DiscreteGeometry
object, or an AnalyticGeometry
object.
RegionID
— Face ID
positive number | vector of positive numbers
Face ID, specified as a positive number or a vector of positive numbers. Each number represents a face 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, faceEdges
returns these types of faces for a 3-D
geometry:
"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 specified faces
positive number | vector of positive numbers
IDs of edges belonging to the specified faces, returned as a positive number or a vector of positive numbers.
Version History
Introduced in R2021aR2023a: Finite element model
faceEdges
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 (한국어)