I want to access all the mesh information directly. I don't want to save the created mesh using a <filename.msh> file. How is it possible? Also I don't want to use the meshio or pygmsh or anyother package.
EDIT: I used the following lines and obtained the tetrahedrons from the msh file. Still I needed to write it. I need to do it without writing it externally.
a,b = gmsh.model.mesh.getElementsByType(4, -1)
b.reshape(-1,4)
Also I want the output in the following format. That is the complete line in the msh file as below:
147 4 2 0 1 26 13 8 16
But I get only
26 13 8 16