sgio 0.2.14__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. {sgio-0.2.14 → sgio-0.3.0}/.gitignore +15 -0
  2. {sgio-0.2.14 → sgio-0.3.0}/PKG-INFO +8 -1
  3. {sgio-0.2.14 → sgio-0.3.0}/pyproject.toml +76 -69
  4. {sgio-0.2.14 → sgio-0.3.0}/sgio/_global.py +2 -2
  5. sgio-0.3.0/sgio/_version.py +1 -0
  6. {sgio-0.2.14 → sgio-0.3.0}/sgio/app.py +1 -1
  7. {sgio-0.2.14 → sgio-0.3.0}/sgio/core/mesh.py +32 -1
  8. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/_meshio.py +114 -30
  9. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/gmsh/_common.py +4 -0
  10. sgio-0.3.0/sgio/iofunc/gmsh/_gmsh.py +108 -0
  11. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/gmsh/_gmsh22.py +133 -0
  12. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/gmsh/_gmsh41.py +398 -1
  13. sgio-0.3.0/sgio/iofunc/gmsh/msh_format.md +289 -0
  14. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/main.py +151 -25
  15. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_input.py +14 -3
  16. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_mesh.py +70 -18
  17. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_output.py +79 -16
  18. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_swiftcomp.py +16 -12
  19. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/vabs/_mesh.py +54 -6
  20. sgio-0.3.0/sgio/model/beam.py +840 -0
  21. sgio-0.3.0/sgio/model/failure.py +195 -0
  22. {sgio-0.2.14 → sgio-0.3.0}/sgio/model/general.py +346 -106
  23. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/execu.py +12 -1
  24. sgio-0.2.14/sgio/_version.py +0 -1
  25. sgio-0.2.14/sgio/iofunc/gmsh/_gmsh.py +0 -39
  26. sgio-0.2.14/sgio/model/beam.py +0 -1698
  27. sgio-0.2.14/sgio/model/failure.py +0 -2
  28. {sgio-0.2.14 → sgio-0.3.0}/LICENSE +0 -0
  29. {sgio-0.2.14 → sgio-0.3.0}/README.md +0 -0
  30. {sgio-0.2.14 → sgio-0.3.0}/sgio/__init__.py +0 -0
  31. {sgio-0.2.14 → sgio-0.3.0}/sgio/__main__.py +0 -0
  32. {sgio-0.2.14 → sgio-0.3.0}/sgio/_exceptions.py +0 -0
  33. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/__init__.py +0 -0
  34. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/NoneSort.py +0 -0
  35. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/__init__.py +0 -0
  36. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/centroid.py +0 -0
  37. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/config.py +0 -0
  38. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/config_re.py +0 -0
  39. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/csid.py +0 -0
  40. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/elType.py +0 -0
  41. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/eval2.py +0 -0
  42. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpDecimal.py +0 -0
  43. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpInt.py +0 -0
  44. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpKeyword.py +0 -0
  45. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpKeywordHelper.py +0 -0
  46. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpKeywordSequence.py +0 -0
  47. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/Read_Disclaimer_First.txt +0 -0
  48. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/__init__.py +0 -0
  49. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_importedModules.py +0 -0
  50. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpCustom.py +0 -0
  51. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpFind.py +0 -0
  52. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpFindRefs.py +0 -0
  53. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpMod.py +0 -0
  54. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpR.py +0 -0
  55. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpW.py +0 -0
  56. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/elInfoDict.txt +0 -0
  57. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/keyword_names.txt +0 -0
  58. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/keyword_sub.txt +0 -0
  59. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/legal_notices.pdf +0 -0
  60. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/METADATA +0 -0
  61. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/RECORD +0 -0
  62. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/WHEEL +0 -0
  63. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/license.txt +0 -0
  64. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/top_level.txt +0 -0
  65. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpRWErrors.py +0 -0
  66. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/inpString.py +0 -0
  67. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/mesh.py +0 -0
  68. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/misc_functions.py +0 -0
  69. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/paramTypes.py +0 -0
  70. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/printer.py +0 -0
  71. {sgio-0.2.14 → sgio-0.3.0}/sgio/_vendors/inprw/repr2.py +0 -0
  72. {sgio-0.2.14 → sgio-0.3.0}/sgio/core/__init__.py +0 -0
  73. {sgio-0.2.14 → sgio-0.3.0}/sgio/core/builder.py +0 -0
  74. {sgio-0.2.14 → sgio-0.3.0}/sgio/core/merge.py +0 -0
  75. {sgio-0.2.14 → sgio-0.3.0}/sgio/core/sg.py +0 -0
  76. {sgio-0.2.14 → sgio-0.3.0}/sgio/execu.py +0 -0
  77. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/__init__.py +0 -0
  78. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/abaqus/__init__.py +0 -0
  79. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/abaqus/_abaqus.py +0 -0
  80. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/abaqus/_abaqus_old.py +0 -0
  81. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/gmsh/__init__.py +0 -0
  82. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/nastran/_nastran.py +0 -0
  83. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/swiftcomp/__init__.py +0 -0
  84. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_global.py +0 -0
  85. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/vabs/__init__.py +0 -0
  86. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/vabs/_input.py +0 -0
  87. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/vabs/_output.py +0 -0
  88. {sgio-0.2.14 → sgio-0.3.0}/sgio/iofunc/vabs/main.py +0 -0
  89. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/iofunc/_common.py +0 -0
  90. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/iofunc/_helpers.py +0 -0
  91. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/mesh/__init__.py +0 -0
  92. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/mesh/base.py +0 -0
  93. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/mesh/formats/__init__.py +0 -0
  94. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/mesh/formats/abaqus.py +0 -0
  95. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/__about__.py +0 -0
  96. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/__init__.py +0 -0
  97. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/__init__.py +0 -0
  98. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_ascii.py +0 -0
  99. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_binary.py +0 -0
  100. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_compress.py +0 -0
  101. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_convert.py +0 -0
  102. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_decompress.py +0 -0
  103. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_info.py +0 -0
  104. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_main.py +0 -0
  105. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_common.py +0 -0
  106. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cxml/__init__.py +0 -0
  107. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_cxml/etree.py +0 -0
  108. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_exceptions.py +0 -0
  109. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_files.py +0 -0
  110. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_helpers.py +0 -0
  111. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_mesh.py +0 -0
  112. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_mesh_original.py +0 -0
  113. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/_vtk_common.py +0 -0
  114. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/abaqus/__init__.py +0 -0
  115. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/abaqus/_abaqus.py +0 -0
  116. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/abaqus/_abaqus_original.py +0 -0
  117. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/ansys/__init__.py +0 -0
  118. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/ansys/_ansys.py +0 -0
  119. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/avsucd/__init__.py +0 -0
  120. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/avsucd/_avsucd.py +0 -0
  121. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/cgns/__init__.py +0 -0
  122. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/cgns/_cgns.py +0 -0
  123. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/dolfin/__init__.py +0 -0
  124. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/dolfin/_dolfin.py +0 -0
  125. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/exodus/__init__.py +0 -0
  126. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/exodus/_exodus.py +0 -0
  127. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/flac3d/__init__.py +0 -0
  128. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/flac3d/_flac3d.py +0 -0
  129. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/__init__.py +0 -0
  130. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh22.py +0 -0
  131. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh22_original.py +0 -0
  132. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh40.py +0 -0
  133. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh41.py +0 -0
  134. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh41_original.py +0 -0
  135. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/common.py +0 -0
  136. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/common_origin.py +0 -0
  137. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/main.py +0 -0
  138. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/main_origin.py +0 -0
  139. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/h5m/__init__.py +0 -0
  140. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/h5m/_h5m.py +0 -0
  141. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/hmf/__init__.py +0 -0
  142. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/hmf/_hmf.py +0 -0
  143. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/mdpa/__init__.py +0 -0
  144. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/mdpa/_mdpa.py +0 -0
  145. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/med/__init__.py +0 -0
  146. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/med/_med.py +0 -0
  147. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/medit/__init__.py +0 -0
  148. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/medit/_medit.py +0 -0
  149. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/medit/_medit_internal.py +0 -0
  150. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/nastran/__init__.py +0 -0
  151. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/nastran/_nastran.py +0 -0
  152. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/netgen/__init__.py +0 -0
  153. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/netgen/_netgen.py +0 -0
  154. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/neuroglancer/__init__.py +0 -0
  155. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/neuroglancer/_neuroglancer.py +0 -0
  156. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/obj/__init__.py +0 -0
  157. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/obj/_obj.py +0 -0
  158. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/off/__init__.py +0 -0
  159. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/off/_off.py +0 -0
  160. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/permas/__init__.py +0 -0
  161. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/permas/_permas.py +0 -0
  162. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/ply/__init__.py +0 -0
  163. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/ply/_ply.py +0 -0
  164. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/__init__.py +0 -0
  165. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/_swiftcomp.py +0 -0
  166. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/_vabs.py +0 -0
  167. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/common.py +0 -0
  168. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/main.py +0 -0
  169. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/stl/__init__.py +0 -0
  170. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/stl/_stl.py +0 -0
  171. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/su2/__init__.py +0 -0
  172. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/su2/_su2.py +0 -0
  173. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/svg/__init__.py +0 -0
  174. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/svg/_svg.py +0 -0
  175. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/tecplot/__init__.py +0 -0
  176. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/tecplot/_tecplot.py +0 -0
  177. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/tetgen/__init__.py +0 -0
  178. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/tetgen/_tetgen.py +0 -0
  179. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/ugrid/__init__.py +0 -0
  180. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/ugrid/_ugrid.py +0 -0
  181. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/__init__.py +0 -0
  182. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/_main.py +0 -0
  183. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/_vtk_42.py +0 -0
  184. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/_vtk_51.py +0 -0
  185. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/vtu/__init__.py +0 -0
  186. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/vtu/_vtu.py +0 -0
  187. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/wkt/__init__.py +0 -0
  188. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/wkt/_wkt.py +0 -0
  189. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/__init__.py +0 -0
  190. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/common.py +0 -0
  191. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/main.py +0 -0
  192. {sgio-0.2.14 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/time_series.py +0 -0
  193. {sgio-0.2.14 → sgio-0.3.0}/sgio/model/__init__.py +0 -0
  194. {sgio-0.2.14 → sgio-0.3.0}/sgio/model/shell.py +0 -0
  195. {sgio-0.2.14 → sgio-0.3.0}/sgio/model/solid.py +0 -0
  196. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/__init__.py +0 -0
  197. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/database.py +0 -0
  198. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/io.py +0 -0
  199. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/logging.py +0 -0
  200. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/math.py +0 -0
  201. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/plot.py +0 -0
  202. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/timer.py +0 -0
  203. {sgio-0.2.14 → sgio-0.3.0}/sgio/utils/version.py +0 -0
@@ -5,10 +5,22 @@ build*/
5
5
  .pytest_cache/
6
6
  *.egg-info/
7
7
  dist/
8
+ .agents-memory/
9
+
10
+ .venv/Lib/
11
+ .venv/Scripts/
12
+ .venv/share/
13
+ .venv/.gitignore
14
+ .venv/CASHDIR.TAG
15
+ .venv/pyvenv.cfg
8
16
 
9
17
  *.pyc
10
18
  *.exe
11
19
 
20
+ # Abaqus files
21
+ *.rpy*
22
+ *.dmp
23
+
12
24
  *.deb
13
25
  SCInt
14
26
  SCReal
@@ -39,3 +51,6 @@ tests/*.SM
39
51
  tests/*.SN
40
52
  tests/*.SMN
41
53
  tests/*.ELE
54
+
55
+ *.rpy*
56
+ ABQ*.dmp
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sgio
3
- Version: 0.2.14
3
+ Version: 0.3.0
4
4
  Summary: I/O for VABS and SwiftComp
5
5
  Project-URL: Homepage, https://github.com/wenbinyugroup/sgio
6
6
  Project-URL: Documentation, https://wenbinyugroup.github.io/sgio/
@@ -14,8 +14,15 @@ Requires-Dist: build>=1.3.0
14
14
  Requires-Dist: hatchling>=1.27.0
15
15
  Requires-Dist: matplotlib
16
16
  Requires-Dist: meshio
17
+ Requires-Dist: myst-parser>=3.0.1
18
+ Requires-Dist: pydantic>=2.0
17
19
  Requires-Dist: pyyaml
20
+ Requires-Dist: rich>=14.1.0
18
21
  Requires-Dist: scipy
22
+ Requires-Dist: sphinx-copybutton>=0.5.2
23
+ Requires-Dist: sphinx-design>=0.6.1
24
+ Requires-Dist: sphinx-immaterial>=0.12.5
25
+ Requires-Dist: sphinx>=7.4.7
19
26
  Requires-Dist: twine>=6.2.0
20
27
  Provides-Extra: all
21
28
  Requires-Dist: h5py; extra == 'all'
@@ -1,69 +1,76 @@
1
- [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "sgio"
7
- # version = "0.1.0"
8
- dynamic = ["version"]
9
- description = "I/O for VABS and SwiftComp"
10
- authors = [
11
- { name = "Su Tian", email = "sutian@analyswift.com" }
12
- ]
13
- readme = { file = "README.md", content-type = "text/markdown" }
14
- requires-python = ">=3.9"
15
- dependencies = [
16
- "meshio",
17
- # "importlib_metadata; python_version<'3.8'",
18
- # "numpy>=2",
19
- # "rich",
20
- "matplotlib",
21
- "pyyaml",
22
- "scipy",
23
- "twine>=6.2.0",
24
- "build>=1.3.0",
25
- "hatchling>=1.27.0",
26
- ]
27
- classifiers = [
28
- "Programming Language :: Python :: 3",
29
- "Operating System :: OS Independent",
30
- ]
31
- license = "MIT"
32
- license-files = ["LICEN[CS]E*"]
33
-
34
- [project.optional-dependencies]
35
- dev = [
36
- "pytest",
37
- "pyinstaller", # For building executables
38
- ]
39
- all = [
40
- "h5py",
41
- "netCDF4",
42
- "pytest",
43
- ]
44
-
45
- [project.scripts]
46
- sgio = "sgio.__main__:main"
47
-
48
- [project.urls]
49
- Homepage = "https://github.com/wenbinyugroup/sgio"
50
- Documentation = "https://wenbinyugroup.github.io/sgio/"
51
-
52
- [tool.hatch.version]
53
- source = "regex"
54
- path = "sgio/_version.py"
55
- pattern = '^__version__ = "(?P<version>[^"]+)"$'
56
-
57
- [tool.hatch.build.targets.sdist]
58
- only-include = [
59
- "sgio",
60
- "LICENSE",
61
- "README.md",
62
- "pyproject.toml",
63
- ]
64
-
65
- [tool.uv]
66
- dev-dependencies = [
67
- "pytest>=6.0",
68
- "pyinstaller>=5.0",
69
- ]
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "sgio"
7
+ # version = "0.1.0"
8
+ dynamic = ["version"]
9
+ description = "I/O for VABS and SwiftComp"
10
+ authors = [
11
+ { name = "Su Tian", email = "sutian@analyswift.com" }
12
+ ]
13
+ readme = { file = "README.md", content-type = "text/markdown" }
14
+ requires-python = ">=3.9"
15
+ dependencies = [
16
+ "meshio",
17
+ # "importlib_metadata; python_version<'3.8'",
18
+ # "numpy>=2",
19
+ # "rich",
20
+ "matplotlib",
21
+ "pydantic>=2.0",
22
+ "pyyaml",
23
+ "scipy",
24
+ "build>=1.3.0",
25
+ "hatchling>=1.27.0",
26
+ "twine>=6.2.0",
27
+ "rich>=14.1.0",
28
+ "sphinx>=7.4.7",
29
+ "myst-parser>=3.0.1",
30
+ "sphinx-immaterial>=0.12.5",
31
+ "sphinx-design>=0.6.1",
32
+ "sphinx-copybutton>=0.5.2",
33
+ ]
34
+ classifiers = [
35
+ "Programming Language :: Python :: 3",
36
+ "Operating System :: OS Independent",
37
+ ]
38
+ license = "MIT"
39
+ license-files = ["LICEN[CS]E*"]
40
+
41
+ [project.optional-dependencies]
42
+ dev = [
43
+ "pytest",
44
+ "pyinstaller", # For building executables
45
+ ]
46
+ all = [
47
+ "h5py",
48
+ "netCDF4",
49
+ "pytest",
50
+ ]
51
+
52
+ [project.scripts]
53
+ sgio = "sgio.__main__:main"
54
+
55
+ [project.urls]
56
+ Homepage = "https://github.com/wenbinyugroup/sgio"
57
+ Documentation = "https://wenbinyugroup.github.io/sgio/"
58
+
59
+ [tool.hatch.version]
60
+ source = "regex"
61
+ path = "sgio/_version.py"
62
+ pattern = '^__version__ = "(?P<version>[^"]+)"$'
63
+
64
+ [tool.hatch.build.targets.sdist]
65
+ only-include = [
66
+ "sgio",
67
+ "LICENSE",
68
+ "README.md",
69
+ "pyproject.toml",
70
+ ]
71
+
72
+ [tool.uv]
73
+ dev-dependencies = [
74
+ "pytest>=6.0",
75
+ "pyinstaller>=5.0",
76
+ ]
@@ -16,7 +16,7 @@ def pretty_string(v):
16
16
  return Pretty(v).__str__()
17
17
 
18
18
 
19
- def configure_logging(cout_level='INFO', fout_level='INFO', filename='log.txt'):
19
+ def configure_logging(cout_level='INFO', fout_level='INFO', filename='sgio.log'):
20
20
  """Initialization of a logger.
21
21
 
22
22
  Parameters
@@ -28,7 +28,7 @@ def configure_logging(cout_level='INFO', fout_level='INFO', filename='log.txt'):
28
28
  fout_level : {'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'}, optional
29
29
  Output level of logs to a file, by default 'INFO'
30
30
  filename : str, optional
31
- Name of the log file, by default 'log.txt'
31
+ Name of the log file, by default 'sgio.log'
32
32
 
33
33
  Returns
34
34
  -------
@@ -0,0 +1 @@
1
+ __version__ = "0.3.0"
@@ -39,7 +39,7 @@ def cli(*args):
39
39
  default='info', choices=['debug', 'info', 'warning', 'error', 'critical'])
40
40
  logging_args.add_argument(
41
41
  '--logfile', help='Logging file name',
42
- default='log.txt')
42
+ default='sgio.log')
43
43
 
44
44
  sub_parser = root_parser.add_subparsers(
45
45
  help='sub-command help'
@@ -1,11 +1,20 @@
1
1
  from meshio import Mesh, CellBlock
2
2
  from typing import Union
3
+ import numpy as np
3
4
 
4
5
  class SGMesh(Mesh):
5
6
  """Extended mesh class that inherits from meshio.Mesh.
6
-
7
+
7
8
  This class provides additional functionality and custom format support
8
9
  while maintaining compatibility with the original meshio.Mesh class.
10
+
11
+ Attributes
12
+ ----------
13
+ cell_point_data : dict[str, list[np.ndarray]]
14
+ Dictionary of element nodal data (data at nodes of each element).
15
+ Structure: {name: [array_for_cell_block_0, array_for_cell_block_1, ...]}
16
+ where each array has shape (n_elements, n_nodes_per_element, n_components).
17
+ This is used for storing element_node data like strain/stress at element nodes.
9
18
  """
10
19
 
11
20
  def __init__(
@@ -18,6 +27,7 @@ class SGMesh(Mesh):
18
27
  cell_sets=None,
19
28
  gmsh_periodic=None,
20
29
  info=None,
30
+ cell_point_data=None,
21
31
  ):
22
32
 
23
33
  super().__init__(
@@ -31,6 +41,27 @@ class SGMesh(Mesh):
31
41
  info=info,
32
42
  )
33
43
 
44
+ # Initialize cell_point_data (element nodal data)
45
+ self.cell_point_data = {} if cell_point_data is None else cell_point_data
46
+
47
+ # Validate cell_point_data consistency
48
+ for key, data in self.cell_point_data.items():
49
+ if len(data) != len(self.cells):
50
+ raise ValueError(
51
+ f"Incompatible cell_point_data '{key}'. "
52
+ f"{len(self.cells)} cell blocks, but '{key}' has {len(data)} blocks."
53
+ )
54
+
55
+ for k in range(len(data)):
56
+ data[k] = np.asarray(data[k])
57
+ if len(data[k]) != len(self.cells[k]):
58
+ raise ValueError(
59
+ "Incompatible cell_point_data. "
60
+ + f"Cell block {k} ('{self.cells[k].type}') "
61
+ + f"has {len(self.cells[k])} elements, but "
62
+ + f"corresponding cell_point_data item has {len(data[k])} elements."
63
+ )
64
+
34
65
 
35
66
  def get_cell_block_by_type(self, cell_type):
36
67
  """
@@ -167,9 +167,9 @@ def addPointDictDataToMesh(name:str|list, dict_data:dict[int, list], mesh:SGMesh
167
167
 
168
168
 
169
169
  def addCellDictDataToMesh(name:str|list, dict_data:dict[int, list], mesh:SGMesh):
170
- """Add cell/element data (dictionary) to cell_data of mesh.
170
+ """Add cell/element data (dictionary) to cell_data or cell_point_data of mesh.
171
171
 
172
- The mesh should contain a map between (cell_type, index) and element id.
172
+ The mesh should contain a map between (cell_type, index) and element id.
173
173
 
174
174
  Parameters:
175
175
  -----------
@@ -177,13 +177,31 @@ def addCellDictDataToMesh(name:str|list, dict_data:dict[int, list], mesh:SGMesh)
177
177
  Name(s) of the cell data. If it is a list, then it should have the same length as data list for each element.
178
178
  dict_data:
179
179
  Data in the dictionary form {eid: data}.
180
+ For element data: {eid: [comp1, comp2, ...]}
181
+ For element_node data: {eid: [[comp1_n1, comp2_n1, ...], [comp1_n2, comp2_n2, ...], ...]}
180
182
  mesh:
181
183
  Mesh where the cell data will be added.
182
184
 
185
+ Note:
186
+ -----
187
+ Element data (flat lists) will be added to mesh.cell_data.
188
+ Element_node data (nested lists) will be added to mesh.cell_point_data.
189
+
183
190
  """
184
191
 
185
192
  _cell_data_eid = mesh.cell_data['element_id']
186
193
 
194
+ # Detect if data is element_node data (nested lists) or element data (flat lists)
195
+ # Check the first element's data structure
196
+ first_eid = next(iter(dict_data))
197
+ first_data = dict_data[first_eid]
198
+ is_element_node_data = isinstance(first_data, list) and len(first_data) > 0 and isinstance(first_data[0], list)
199
+
200
+ if is_element_node_data:
201
+ # Add element_node data to cell_point_data
202
+ _addCellPointDictDataToMesh(name, dict_data, mesh)
203
+ return
204
+
187
205
  if isinstance(name, str):
188
206
  _cell_data = []
189
207
 
@@ -212,6 +230,8 @@ def addCellDictDataToMesh(name:str|list, dict_data:dict[int, list], mesh:SGMesh)
212
230
 
213
231
  for _j, _eid in enumerate(_typei_ids):
214
232
  _data_all = dict_data[_eid]
233
+ # For element data: {eid: [comp1, comp2, ...]}
234
+ # _data_all is a flat list of components
215
235
  for _k, _data in enumerate(_data_all):
216
236
  _typei_data_all[_k].append(_data)
217
237
 
@@ -225,6 +245,68 @@ def addCellDictDataToMesh(name:str|list, dict_data:dict[int, list], mesh:SGMesh)
225
245
  return
226
246
 
227
247
 
248
+ def _addCellPointDictDataToMesh(name:str|list, dict_data:dict[int, list], mesh:SGMesh):
249
+ """Add cell point (element nodal) data (dictionary) to cell_point_data of mesh.
250
+
251
+ The mesh should contain a map between (cell_type, index) and element id.
252
+
253
+ Parameters:
254
+ -----------
255
+ name:
256
+ Name(s) of the cell point data. If it is a list, then it should have the same
257
+ length as the number of components in the data.
258
+ dict_data:
259
+ Data in the dictionary form {eid: [[comp1_n1, comp2_n1, ...], [comp1_n2, comp2_n2, ...], ...]}.
260
+ Each element has a list of nodes, and each node has a list of component values.
261
+ mesh:
262
+ Mesh where the cell point data will be added.
263
+
264
+ """
265
+ import numpy as np
266
+
267
+ _cell_data_eid = mesh.cell_data['element_id']
268
+
269
+ if isinstance(name, str):
270
+ # Single component name - store the entire nested structure
271
+ _cell_point_data = []
272
+
273
+ for _i, _typei_ids in enumerate(_cell_data_eid):
274
+ _typei_data = []
275
+
276
+ for _j, _eid in enumerate(_typei_ids):
277
+ _data = dict_data[_eid]
278
+ _typei_data.append(_data)
279
+
280
+ _cell_point_data.append(np.array(_typei_data))
281
+
282
+ mesh.cell_point_data[name] = _cell_point_data
283
+
284
+ elif isinstance(name, list):
285
+ # Multiple component names - transpose the data structure
286
+ # From: {eid: [[comp1_n1, comp2_n1, ...], [comp1_n2, comp2_n2, ...], ...]}
287
+ # To: For each component, create: [[[comp_n1_e1, comp_n2_e1, ...], ...], ...]
288
+
289
+ ncomps = len(name)
290
+
291
+ for comp_idx, comp_name in enumerate(name):
292
+ _cell_point_data = []
293
+
294
+ for _i, _typei_ids in enumerate(_cell_data_eid):
295
+ _typei_data = []
296
+
297
+ for _j, _eid in enumerate(_typei_ids):
298
+ _elem_node_data = dict_data[_eid]
299
+ # Extract component comp_idx from all nodes of this element
300
+ _comp_values = [node_data[comp_idx] for node_data in _elem_node_data]
301
+ _typei_data.append(_comp_values)
302
+
303
+ _cell_point_data.append(np.array(_typei_data))
304
+
305
+ mesh.cell_point_data[comp_name] = _cell_point_data
306
+
307
+ return
308
+
309
+
228
310
 
229
311
 
230
312
  # ====================================================================
@@ -281,35 +363,35 @@ def _sg_to_meshio_order(cell_type: str, idx: ArrayLike) -> np.ndarray:
281
363
 
282
364
 
283
365
 
284
- def _meshio_to_sg_order(cell_type:str, idx:ArrayLike):
285
- idx_sg = np.asarray(idx) + 1
366
+ # def _meshio_to_sg_order(cell_type:str, idx:ArrayLike):
367
+ # idx_sg = np.asarray(idx) + 1
286
368
 
287
- idx_to_insert = None
288
- if cell_type == 'triangle6':
289
- idx_to_insert = 3
290
- elif cell_type == 'tetra10':
291
- idx_to_insert = 4
292
- elif cell_type == 'wedge15':
293
- idx_to_insert = 6
369
+ # idx_to_insert = None
370
+ # if cell_type == 'triangle6':
371
+ # idx_to_insert = 3
372
+ # elif cell_type == 'tetra10':
373
+ # idx_to_insert = 4
374
+ # elif cell_type == 'wedge15':
375
+ # idx_to_insert = 6
294
376
 
295
- max_nodes = idx_sg.shape[1]
296
- if cell_type.startswith('line'):
297
- max_nodes = 5
298
- elif cell_type.startswith('triangle') or cell_type.startswith('quad'):
299
- max_nodes = 9
300
- elif cell_type.startswith('tetra') or cell_type.startswith('wedge') or cell_type.startswith('hexahedron'):
301
- max_nodes = 20
377
+ # max_nodes = idx_sg.shape[1]
378
+ # if cell_type.startswith('line'):
379
+ # max_nodes = 5
380
+ # elif cell_type.startswith('triangle') or cell_type.startswith('quad'):
381
+ # max_nodes = 9
382
+ # elif cell_type.startswith('tetra') or cell_type.startswith('wedge') or cell_type.startswith('hexahedron'):
383
+ # max_nodes = 20
302
384
 
303
- # Insert 0 for some types of cells
304
- if idx_to_insert:
305
- idx_sg = np.insert(idx_sg, idx_to_insert, 0, axis=1)
385
+ # # Insert 0 for some types of cells
386
+ # if idx_to_insert:
387
+ # idx_sg = np.insert(idx_sg, idx_to_insert, 0, axis=1)
306
388
 
307
- # Fill the remaining location with 0s
308
- pad_width = max_nodes - idx_sg.shape[1]
309
- # logger.debug('pad width = {}'.format(pad_width))
310
- idx_sg = np.pad(idx_sg, ((0, 0), (0, pad_width)), 'constant', constant_values=0)
389
+ # # Fill the remaining location with 0s
390
+ # pad_width = max_nodes - idx_sg.shape[1]
391
+ # # logger.debug('pad width = {}'.format(pad_width))
392
+ # idx_sg = np.pad(idx_sg, ((0, 0), (0, pad_width)), 'constant', constant_values=0)
311
393
 
312
- return idx_sg
394
+ # return idx_sg
313
395
 
314
396
 
315
397
 
@@ -398,7 +480,7 @@ def _write_nodes(
398
480
 
399
481
  def _meshio_to_sg_order(
400
482
  cell_type:str, idx:ArrayLike,
401
- node_id=[], renumber_nodes:bool=False
483
+ node_id=[], renumber_nodes:bool=True
402
484
  ):
403
485
  """Convert meshio cell ordering to SG ordering.
404
486
 
@@ -420,9 +502,11 @@ def _meshio_to_sg_order(
420
502
  """
421
503
  idx_sg = np.asarray(idx)
422
504
  if renumber_nodes:
423
- idx_map = {v:i+1 for i, v in enumerate(node_id)}
424
- idx_sg = np.vectorize(idx_map.get)(idx_sg)
425
- # idx_sg = np.asarray(idx) + 1
505
+ if len(node_id) == 0:
506
+ idx_sg = np.asarray(idx) + 1
507
+ else:
508
+ idx_map = {v: i+1 for i, v in enumerate(node_id)}
509
+ idx_sg = np.vectorize(idx_map.get)(idx_sg)
426
510
 
427
511
  idx_to_insert = None
428
512
  if cell_type == 'triangle6':
@@ -14,6 +14,10 @@ from meshio.gmsh.common import (
14
14
  _read_physical_names,
15
15
  _write_physical_names,
16
16
  )
17
+ from meshio._common import (
18
+ num_nodes_per_cell,
19
+ cell_data_from_raw,
20
+ )
17
21
 
18
22
  from sgio.iofunc._meshio import (
19
23
  WriteError
@@ -0,0 +1,108 @@
1
+ from __future__ import annotations
2
+
3
+ import logging
4
+ import struct
5
+
6
+ import numpy as np
7
+
8
+ from . import _gmsh22
9
+ # from . import _gmsh40
10
+ from . import _gmsh41
11
+ from ._common import _fast_forward_to_end_block
12
+ from sgio.iofunc._meshio import ReadError
13
+
14
+ logger = logging.getLogger(__name__)
15
+
16
+ # Some mesh files use "2" when it should be "2.2" and "4" when it should be "4.1"
17
+ _readers = {"2": _gmsh22, "2.2": _gmsh22, "4": _gmsh41, "4.1": _gmsh41}
18
+
19
+
20
+ def _read_header(f):
21
+ """Read the mesh format block.
22
+
23
+ Returns:
24
+ fmt_version: str
25
+ data_size: int
26
+ is_ascii: bool
27
+ """
28
+ line = f.readline().decode()
29
+ str_list = list(filter(None, line.split()))
30
+ fmt_version = str_list[0]
31
+ if str_list[1] not in ["0", "1"]:
32
+ raise ReadError("Invalid file-type in header")
33
+ is_ascii = str_list[1] == "0"
34
+ data_size = int(str_list[2])
35
+ if not is_ascii:
36
+ # The next line is the integer 1 in bytes for endianness check
37
+ one = f.read(struct.calcsize("i"))
38
+ if struct.unpack("i", one)[0] != 1:
39
+ raise ReadError("Endianness mismatch")
40
+ _fast_forward_to_end_block(f, "MeshFormat")
41
+ return fmt_version, data_size, is_ascii
42
+
43
+
44
+ def read_buffer(file, format_version="4.1", **kwargs):
45
+ """Read a Gmsh mesh from a buffer.
46
+
47
+ Parameters
48
+ ----------
49
+ file : file-like object
50
+ The file buffer to read from (opened in binary mode).
51
+ format_version : str
52
+ The expected format version. If not specified, auto-detect from file.
53
+
54
+ Returns
55
+ -------
56
+ mesh : meshio.Mesh
57
+ The mesh data read from the file.
58
+ """
59
+ # The format is specified at:
60
+ # <http://gmsh.info/doc/texinfo/gmsh.html#File-formats>
61
+
62
+ line = file.readline().decode().strip()
63
+
64
+ # Skip any $Comments/$EndComments sections
65
+ while line == "$Comments":
66
+ _fast_forward_to_end_block(file, "Comments")
67
+ line = file.readline().decode().strip()
68
+
69
+ if line != "$MeshFormat":
70
+ raise ReadError(f"Expected $MeshFormat, got {repr(line)}")
71
+
72
+ fmt_version, data_size, is_ascii = _read_header(file)
73
+
74
+ try:
75
+ reader = _readers[fmt_version]
76
+ except KeyError:
77
+ try:
78
+ reader = _readers[fmt_version.split(".")[0]]
79
+ except KeyError:
80
+ raise ValueError(
81
+ f"Need mesh format in {sorted(_readers.keys())} (got {fmt_version})"
82
+ )
83
+
84
+ return reader.read_buffer(file, is_ascii, data_size)
85
+
86
+
87
+ def write_buffer(
88
+ file, mesh, format_version, float_fmt, sgdim,
89
+ mesh_only, binary,
90
+ **kwargs):
91
+ """
92
+ """
93
+ logger.debug(locals())
94
+
95
+ if format_version == "":
96
+ format_version = "4.1"
97
+
98
+ if format_version == "2.2":
99
+ _gmsh22.write_buffer(file, mesh, float_fmt=float_fmt, binary=binary)
100
+ # elif format_version == "4.0":
101
+ # _gmsh40.write_buffer(file, mesh, format_version=format_version)
102
+ elif format_version == "4.1":
103
+ # handle gmsh:dim_tags
104
+ # mesh.point_data['gmsh:dim_tags'] = np.array([[sgdim, 0]])
105
+ mesh.point_data['gmsh:dim_tags'] = np.array([[sgdim, 1] for i in range(len(mesh.points))])
106
+ # mesh.cell_data['gmsh:geometrical'] = np.array([[i,] for i in range(len(mesh.cells))])
107
+ mesh.cell_data['gmsh:geometrical'] = [[1,],] * len(mesh.cells)
108
+ _gmsh41.write_buffer(file, mesh, float_fmt, mesh_only, binary)