MeshCurvilinearTriangle

A curvilinear triangle in 3D space defined by three corner points and three midpoints halfway along each side. Exists as part of a mesh.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Settings for curvilinear meshing

project.SolutionSettings.SolverSettings.GeneralSettings.BasisFunctionSettings.HOBFEnabled = true    
project.Mesher.Settings.WireRadius = "0.01"    
advancedMeshSettings = project.Mesher.Settings.Advanced
advancedMeshSettings.CurvilinearSegments = cf.Enums.MeshCurvilinearOptionsEnum.Disabled
advancedMeshSettings.CurvilinearTriangles = cf.Enums.MeshCurvilinearOptionsEnum.Enabled

frequency = project.SolutionConfigurations[1].Frequency
frequency.Start = "1e08"

    -- Create geometry and mesh

project.Geometry:AddSphere(cf.Point(0,0,0),1.0)

project.Mesher:Mesh()
project.Geometry["Sphere1"]:UnlinkMesh()

meshCurvilinearTriangleFaces = project.Meshes["Sphere1_1"].CurvilinearTriangleFaces

for i in ipairs(meshCurvilinearTriangleFaces) do
    curvilinearTriangleFace = meshCurvilinearTriangleFaces[i]    
    curvilinearTriangles = curvilinearTriangleFace.CurvilinearTriangles   
    
    for j = 1,curvilinearTriangles.Count do
    
        -- Obtain the 'MeshCurvilinearTriangle' and reverse its normal
        
        curvilinearTriangle = curvilinearTriangles[j]
        curvilinearTriangle:ReverseNormal()
    end
end

Inheritance

The MeshCurvilinearTriangle object is derived from the MeshElement object.

Property List

Type
The object type string. (Read only string)
Vertices
Returns a list of the triangle's vertices. The first three [1 to 3] indices are corner indices. The next three indices are midpoints. (Read only List of MeshVertex)

Method List

Delete ()
Deletes the mesh element.
ReverseNormal ()
Reverses the curvilinear triangle's normal.

Property Details

Type
The object type string.
Type
string
Access
Read only
Vertices
Returns a list of the triangle's vertices. The first three [1 to 3] indices are corner indices. The next three indices are midpoints.
Access
Read only

Method Details

Delete ()
Deletes the mesh element.
ReverseNormal ()
Reverses the curvilinear triangle's normal.