Mesh

A mesh consisting of mesh entities that represents the simulated model.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])
sConf = app.Models["startup"].Configurations[1]
mesh = sConf.Mesh
points = mesh.Points

    -- Iterate through 'TriangleFaces' and print the first two 'Triangles' 
    -- vertex indices as well as their locations
    
TriangleFaces_count = mesh.TriangleFaces.Count
for i = 1, TriangleFaces_count do
    triangle = mesh.TriangleFaces[i].Triangles -- Create a member to ensure the best performance
    for j = 1, 2 do
       print("Triangle "..j)
       print(triangle[j])
       print("Vertex locations")
       print(points[triangle[j].VertexIndices[1]]) -- Accessing member here will be faster than
       print(points[triangle[j].VertexIndices[2]]) -- querying the mesh for its points each time
       print(points[triangle[j].VertexIndices[3]])
    end
end

Usage locations

The Mesh object can be accessed from the following locations:

Property List

Points
The collection of mesh points that form the mesh model. (Read only Points)
Type
The object type string. (Read only string)

Collection List

CubeRegions
The collection of regions meshed with cubes. The regions that form part of the mesh model. (MeshCubeRegionCollection of MeshCubeRegion.)
CurvilinearSegmentWires
The collection of wires meshed with curvilinear segments. The wires form part of the mesh model. (MeshCurvilinearSegmentWireCollection of MeshCurvilinearSegmentWire.)
CurvilinearTriangleFaces
The collection of faces meshed with curvilinear triangles. The faces form part of the mesh model. (MeshCurvilinearTriangleFaceCollection of MeshCurvilinearTriangleFace.)
SegmentWires
The collection of wires meshed with segments. The wires form part of the mesh model. (MeshSegmentWireCollection of MeshSegmentWire.)
TetrahedronRegions
The collection of regions meshed with tetrahedra. The regions form part of the mesh model. (MeshTetrahedronRegionCollection of MeshTetrahedronRegion.)
TriangleFaces
The collection of faces meshed with flat triangles. The faces form part of the mesh model. (MeshTriangleFaceCollection of MeshTriangleFace.)
UnmeshedCylinderRegions
The collection of unmeshed cylinders that form part of the mesh model. (MeshUnmeshedCylinderRegionCollection of MeshUnmeshedCylinderRegion.)
UnmeshedPolygonFaces
The collection of unmeshed faces that form part of the mesh model. (MeshUnmeshedPolygonFaceCollection of MeshUnmeshedPolygonFace.)

Method List

GetPointMatrixForSegmentMeshIndexList (indexlist List of number)
Creates a matrix of points for the given segment mesh index list. (Returns a Matrix object.)
GetPointMatrixForTriangleMeshIndexList (indexlist List of number)
Creates a matrix of points for the given triangle mesh index list. (Returns a Matrix object.)

Property Details

Points
The collection of mesh points that form the mesh model.
Type
Points
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Collection Details

CubeRegions
The collection of regions meshed with cubes. The regions that form part of the mesh model.
Type
MeshCubeRegionCollection
CurvilinearSegmentWires
The collection of wires meshed with curvilinear segments. The wires form part of the mesh model.
Type
MeshCurvilinearSegmentWireCollection
CurvilinearTriangleFaces
The collection of faces meshed with curvilinear triangles. The faces form part of the mesh model.
Type
MeshCurvilinearTriangleFaceCollection
SegmentWires
The collection of wires meshed with segments. The wires form part of the mesh model.
Type
MeshSegmentWireCollection
TetrahedronRegions
The collection of regions meshed with tetrahedra. The regions form part of the mesh model.
Type
MeshTetrahedronRegionCollection
TriangleFaces
The collection of faces meshed with flat triangles. The faces form part of the mesh model.
Type
MeshTriangleFaceCollection
UnmeshedCylinderRegions
The collection of unmeshed cylinders that form part of the mesh model.
Type
MeshUnmeshedCylinderRegionCollection
UnmeshedPolygonFaces
The collection of unmeshed faces that form part of the mesh model.
Type
MeshUnmeshedPolygonFaceCollection

Method Details

GetPointMatrixForSegmentMeshIndexList (indexlist List of number)
Creates a matrix of points for the given segment mesh index list.
Input Parameters
indexlist(List of number)
A mesh index list.
Return
Matrix
A point matrix.
GetPointMatrixForTriangleMeshIndexList (indexlist List of number)
Creates a matrix of points for the given triangle mesh index list.
Input Parameters
indexlist(List of number)
A mesh index list.
Return
Matrix
A point matrix.