Main Content

Geometry and Mesh

Define a geometry and discretize it using a triangular or tetrahedral mesh

Unified finite element analysis workflow uses an fegeometry object to define a geometry. You can simply assign a geometry to the Geometry property of femodel.

Define a geometry using one of these sources:

The general PDE workflow, as well as the domain-specific workflows, use a DiscreteGeometry and AnalyticGeometry objects. Typically, you can define these objects using the same sources as for fegeometry.

Mesh a geometry using the generateMesh function. The toolbox uses the finite element method (FEM) to solve PDEs. For details about meshing, see Mesh Data.

For details about the components of geometries and meshes and the relationships between them, see Geometry and Mesh Components.

Functions

expand all

Creation and Visualization

importGeometryImport geometry from STL or STEP file
geometryFromMeshCreate 2-D or 3-D geometry from mesh
geometryFromEdgesCreate 2-D geometry from decomposed geometry matrix
decsgDecompose constructive solid 2-D geometry into minimal regions
multicuboidCreate geometry formed by several cubic cells
multicylinderCreate geometry formed by several cylindrical cells
multisphereCreate geometry formed by several spherical cells
triangulationCreate triangulation object from fegeometry (Since R2023b)
pdegplotPlot PDE geometry

Modification

addCellCombine two geometries by adding one inside a cell of another (Since R2021a)
addFaceFill void regions in 2-D and split cells in 3-D geometry (Since R2020a)
addVertexAdd vertex on geometry boundary (Since R2019b)
addVoidCreate void regions inside 3-D geometry (Since R2021a)
mergeCellsMerge geometry cells (Since R2023b)
rotateRotate geometry (Since R2020a)
scaleScale geometry (Since R2020a)
translateTranslate geometry (Since R2020a)
extrudeVertically extrude 2-D geometry or specified faces of 3-D geometry (Since R2020b)

Queries

cellEdgesFind edges belonging to boundaries of specified cells (Since R2021a)
cellFacesFind faces belonging to specified cells (Since R2021a)
faceEdgesFind edges belonging to specified faces (Since R2021a)
facesAttachedToEdgesFind faces attached to specified edges (Since R2021a)
nearestEdgeFind edges nearest to specified point (Since R2021a)
nearestFaceFind faces nearest to specified point (Since R2021a)

PDE Modeler App

pdecircDraw circle in PDE Modeler app
pdeellipDraw ellipse in PDE Modeler app
pdepolyDraw polygon in PDE Modeler app
pderectDraw rectangle in PDE Modeler app
generateMeshCreate triangular or tetrahedral mesh
meshQualityEvaluate shape quality of mesh elements
findElementsFind mesh elements in specified region
findNodesFind mesh nodes in specified region
areaArea of 2-D mesh elements
volumeVolume of 3-D mesh elements
pdemeshPlot PDE mesh
pdeplotPlot solution or mesh for 2-D problem
pdeplot3DPlot solution or surface mesh for 3-D problem
pdevizCreate and plot PDE visualization object (Since R2021a)

Geometry

csgdelDelete boundaries between subdomains
pdearclRepresent arc lengths as parametrized curve
wgeomWrite geometry function to file

Mesh

adaptmeshCreate adaptive 2-D mesh and solve PDE
initmeshCreate initial 2-D mesh
meshToPet[p,e,t] representation of FEMesh data
jigglemesh(Not recommended) Jiggle internal points of triangular mesh
refinemeshRefine triangular mesh

Objects

fegeometryGeometry object for finite element analysis (Since R2023a)
DiscreteGeometryDiscrete 2-D or 3-D geometry description
AnalyticGeometryAnalytic 2-D geometry description

Properties

FEMesh PropertiesMesh object
PDEVisualization PropertiesPDE visualization of mesh and nodal results (Since R2021a)

Apps

PDE ModelerCreate complex 2-D geometries by drawing, overlapping, and rotating basic shapes

Topics

Geometry

Mesh

Legacy Mesh