- Thank you received: 0
Accessing connectivity for a mesh object
- bhaveshshrimali
- Topic Author
- Offline
- Junior Member
Less
More
5 years 4 months ago #1667
by bhaveshshrimali
Accessing connectivity for a mesh object was created by bhaveshshrimali
I am experimenting with the python interface and trying to obtain a second order mesh. Consider the following MWE:
This outputs only `3` vertices, and if I am correct, the first three. How to access the complete connectivity for each element ? What is a better approach to generate a 6-noded triangular mesh.
Code:
# Some code to generate a `geo` object
mesh = geo.GenerateMesh(maxh=10)
mesh.SecondOrder()
Elems = mesh.Elements2D()
for elem in Elems:
print(elem.vertices)
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 4 months ago #1668
by mneunteufel
Replied by mneunteufel on topic Accessing connectivity for a mesh object
Hi bhaveshshrimali,
with
you get always only the three vertex points of the triangle. Use
instead to get all 6. The first three will coincide with the result from elem.vertices.
Best
Michael
with
Code:
elem.vertices
Code:
elem.points
Best
Michael
The following user(s) said Thank You: bhaveshshrimali
- bhaveshshrimali
- Topic Author
- Offline
- Junior Member
Less
More
- Thank you received: 0
5 years 4 months ago #1670
by bhaveshshrimali
Replied by bhaveshshrimali on topic Accessing connectivity for a mesh object
Ah I see, Thanks. Makes complete sense. What I meant was the points on the triangle (and not just the vertices).
Thank you very much!!
Bhavesh
Thank you very much!!
Bhavesh
Time to create page: 0.103 seconds