sgio 0.2.15__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 (202) hide show
  1. {sgio-0.2.15 → sgio-0.3.0}/.gitignore +15 -0
  2. {sgio-0.2.15 → sgio-0.3.0}/PKG-INFO +7 -1
  3. {sgio-0.2.15 → sgio-0.3.0}/pyproject.toml +6 -0
  4. {sgio-0.2.15 → sgio-0.3.0}/sgio/_global.py +2 -2
  5. sgio-0.3.0/sgio/_version.py +1 -0
  6. {sgio-0.2.15 → sgio-0.3.0}/sgio/app.py +1 -1
  7. {sgio-0.2.15 → sgio-0.3.0}/sgio/core/mesh.py +32 -1
  8. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/_meshio.py +84 -3
  9. {sgio-0.2.15 → 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.15 → sgio-0.3.0}/sgio/iofunc/gmsh/_gmsh22.py +133 -0
  12. {sgio-0.2.15 → 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.15 → sgio-0.3.0}/sgio/iofunc/main.py +148 -24
  15. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_mesh.py +16 -8
  16. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_output.py +79 -16
  17. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_swiftcomp.py +12 -11
  18. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/vabs/_mesh.py +6 -4
  19. {sgio-0.2.15 → sgio-0.3.0}/sgio/model/beam.py +5 -0
  20. sgio-0.3.0/sgio/model/failure.py +195 -0
  21. {sgio-0.2.15 → sgio-0.3.0}/sgio/model/general.py +346 -106
  22. sgio-0.2.15/sgio/_version.py +0 -1
  23. sgio-0.2.15/sgio/iofunc/gmsh/_gmsh.py +0 -39
  24. sgio-0.2.15/sgio/model/failure.py +0 -2
  25. {sgio-0.2.15 → sgio-0.3.0}/LICENSE +0 -0
  26. {sgio-0.2.15 → sgio-0.3.0}/README.md +0 -0
  27. {sgio-0.2.15 → sgio-0.3.0}/sgio/__init__.py +0 -0
  28. {sgio-0.2.15 → sgio-0.3.0}/sgio/__main__.py +0 -0
  29. {sgio-0.2.15 → sgio-0.3.0}/sgio/_exceptions.py +0 -0
  30. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/__init__.py +0 -0
  31. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/NoneSort.py +0 -0
  32. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/__init__.py +0 -0
  33. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/centroid.py +0 -0
  34. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/config.py +0 -0
  35. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/config_re.py +0 -0
  36. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/csid.py +0 -0
  37. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/elType.py +0 -0
  38. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/eval2.py +0 -0
  39. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpDecimal.py +0 -0
  40. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpInt.py +0 -0
  41. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpKeyword.py +0 -0
  42. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpKeywordHelper.py +0 -0
  43. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpKeywordSequence.py +0 -0
  44. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/Read_Disclaimer_First.txt +0 -0
  45. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/__init__.py +0 -0
  46. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_importedModules.py +0 -0
  47. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpCustom.py +0 -0
  48. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpFind.py +0 -0
  49. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpFindRefs.py +0 -0
  50. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpMod.py +0 -0
  51. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpR.py +0 -0
  52. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/_inpW.py +0 -0
  53. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/elInfoDict.txt +0 -0
  54. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/keyword_names.txt +0 -0
  55. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/keyword_sub.txt +0 -0
  56. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW/legal_notices.pdf +0 -0
  57. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/METADATA +0 -0
  58. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/RECORD +0 -0
  59. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/WHEEL +0 -0
  60. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/license.txt +0 -0
  61. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRW-2023.10.6.dist-info/top_level.txt +0 -0
  62. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpRWErrors.py +0 -0
  63. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/inpString.py +0 -0
  64. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/mesh.py +0 -0
  65. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/misc_functions.py +0 -0
  66. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/paramTypes.py +0 -0
  67. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/printer.py +0 -0
  68. {sgio-0.2.15 → sgio-0.3.0}/sgio/_vendors/inprw/repr2.py +0 -0
  69. {sgio-0.2.15 → sgio-0.3.0}/sgio/core/__init__.py +0 -0
  70. {sgio-0.2.15 → sgio-0.3.0}/sgio/core/builder.py +0 -0
  71. {sgio-0.2.15 → sgio-0.3.0}/sgio/core/merge.py +0 -0
  72. {sgio-0.2.15 → sgio-0.3.0}/sgio/core/sg.py +0 -0
  73. {sgio-0.2.15 → sgio-0.3.0}/sgio/execu.py +0 -0
  74. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/__init__.py +0 -0
  75. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/abaqus/__init__.py +0 -0
  76. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/abaqus/_abaqus.py +0 -0
  77. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/abaqus/_abaqus_old.py +0 -0
  78. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/gmsh/__init__.py +0 -0
  79. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/nastran/_nastran.py +0 -0
  80. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/swiftcomp/__init__.py +0 -0
  81. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_global.py +0 -0
  82. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/swiftcomp/_input.py +0 -0
  83. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/vabs/__init__.py +0 -0
  84. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/vabs/_input.py +0 -0
  85. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/vabs/_output.py +0 -0
  86. {sgio-0.2.15 → sgio-0.3.0}/sgio/iofunc/vabs/main.py +0 -0
  87. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/iofunc/_common.py +0 -0
  88. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/iofunc/_helpers.py +0 -0
  89. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/mesh/__init__.py +0 -0
  90. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/mesh/base.py +0 -0
  91. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/mesh/formats/__init__.py +0 -0
  92. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/mesh/formats/abaqus.py +0 -0
  93. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/__about__.py +0 -0
  94. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/__init__.py +0 -0
  95. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/__init__.py +0 -0
  96. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_ascii.py +0 -0
  97. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_binary.py +0 -0
  98. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_compress.py +0 -0
  99. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_convert.py +0 -0
  100. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_decompress.py +0 -0
  101. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_info.py +0 -0
  102. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cli/_main.py +0 -0
  103. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_common.py +0 -0
  104. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cxml/__init__.py +0 -0
  105. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_cxml/etree.py +0 -0
  106. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_exceptions.py +0 -0
  107. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_files.py +0 -0
  108. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_helpers.py +0 -0
  109. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_mesh.py +0 -0
  110. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_mesh_original.py +0 -0
  111. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/_vtk_common.py +0 -0
  112. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/abaqus/__init__.py +0 -0
  113. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/abaqus/_abaqus.py +0 -0
  114. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/abaqus/_abaqus_original.py +0 -0
  115. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/ansys/__init__.py +0 -0
  116. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/ansys/_ansys.py +0 -0
  117. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/avsucd/__init__.py +0 -0
  118. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/avsucd/_avsucd.py +0 -0
  119. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/cgns/__init__.py +0 -0
  120. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/cgns/_cgns.py +0 -0
  121. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/dolfin/__init__.py +0 -0
  122. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/dolfin/_dolfin.py +0 -0
  123. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/exodus/__init__.py +0 -0
  124. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/exodus/_exodus.py +0 -0
  125. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/flac3d/__init__.py +0 -0
  126. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/flac3d/_flac3d.py +0 -0
  127. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/__init__.py +0 -0
  128. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh22.py +0 -0
  129. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh22_original.py +0 -0
  130. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh40.py +0 -0
  131. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh41.py +0 -0
  132. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/_gmsh41_original.py +0 -0
  133. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/common.py +0 -0
  134. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/common_origin.py +0 -0
  135. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/main.py +0 -0
  136. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/gmsh/main_origin.py +0 -0
  137. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/h5m/__init__.py +0 -0
  138. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/h5m/_h5m.py +0 -0
  139. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/hmf/__init__.py +0 -0
  140. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/hmf/_hmf.py +0 -0
  141. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/mdpa/__init__.py +0 -0
  142. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/mdpa/_mdpa.py +0 -0
  143. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/med/__init__.py +0 -0
  144. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/med/_med.py +0 -0
  145. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/medit/__init__.py +0 -0
  146. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/medit/_medit.py +0 -0
  147. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/medit/_medit_internal.py +0 -0
  148. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/nastran/__init__.py +0 -0
  149. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/nastran/_nastran.py +0 -0
  150. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/netgen/__init__.py +0 -0
  151. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/netgen/_netgen.py +0 -0
  152. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/neuroglancer/__init__.py +0 -0
  153. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/neuroglancer/_neuroglancer.py +0 -0
  154. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/obj/__init__.py +0 -0
  155. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/obj/_obj.py +0 -0
  156. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/off/__init__.py +0 -0
  157. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/off/_off.py +0 -0
  158. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/permas/__init__.py +0 -0
  159. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/permas/_permas.py +0 -0
  160. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/ply/__init__.py +0 -0
  161. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/ply/_ply.py +0 -0
  162. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/__init__.py +0 -0
  163. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/_swiftcomp.py +0 -0
  164. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/_vabs.py +0 -0
  165. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/common.py +0 -0
  166. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/sg/main.py +0 -0
  167. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/stl/__init__.py +0 -0
  168. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/stl/_stl.py +0 -0
  169. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/su2/__init__.py +0 -0
  170. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/su2/_su2.py +0 -0
  171. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/svg/__init__.py +0 -0
  172. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/svg/_svg.py +0 -0
  173. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/tecplot/__init__.py +0 -0
  174. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/tecplot/_tecplot.py +0 -0
  175. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/tetgen/__init__.py +0 -0
  176. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/tetgen/_tetgen.py +0 -0
  177. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/ugrid/__init__.py +0 -0
  178. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/ugrid/_ugrid.py +0 -0
  179. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/__init__.py +0 -0
  180. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/_main.py +0 -0
  181. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/_vtk_42.py +0 -0
  182. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/vtk/_vtk_51.py +0 -0
  183. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/vtu/__init__.py +0 -0
  184. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/vtu/_vtu.py +0 -0
  185. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/wkt/__init__.py +0 -0
  186. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/wkt/_wkt.py +0 -0
  187. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/__init__.py +0 -0
  188. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/common.py +0 -0
  189. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/main.py +0 -0
  190. {sgio-0.2.15 → sgio-0.3.0}/sgio/legacy/meshio_old/xdmf/time_series.py +0 -0
  191. {sgio-0.2.15 → sgio-0.3.0}/sgio/model/__init__.py +0 -0
  192. {sgio-0.2.15 → sgio-0.3.0}/sgio/model/shell.py +0 -0
  193. {sgio-0.2.15 → sgio-0.3.0}/sgio/model/solid.py +0 -0
  194. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/__init__.py +0 -0
  195. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/database.py +0 -0
  196. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/execu.py +0 -0
  197. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/io.py +0 -0
  198. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/logging.py +0 -0
  199. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/math.py +0 -0
  200. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/plot.py +0 -0
  201. {sgio-0.2.15 → sgio-0.3.0}/sgio/utils/timer.py +0 -0
  202. {sgio-0.2.15 → 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.15
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,9 +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
17
18
  Requires-Dist: pydantic>=2.0
18
19
  Requires-Dist: pyyaml
20
+ Requires-Dist: rich>=14.1.0
19
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
20
26
  Requires-Dist: twine>=6.2.0
21
27
  Provides-Extra: all
22
28
  Requires-Dist: h5py; extra == 'all'
@@ -24,6 +24,12 @@ dependencies = [
24
24
  "build>=1.3.0",
25
25
  "hatchling>=1.27.0",
26
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",
27
33
  ]
28
34
  classifiers = [
29
35
  "Programming Language :: Python :: 3",
@@ -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
  # ====================================================================
@@ -418,7 +500,6 @@ def _meshio_to_sg_order(
418
500
  idx_sg: np.ndarray (n_cells, n_elem_nodes_sg)
419
501
  Array of cell connectivity in SG ordering.
420
502
  """
421
- print(f'{renumber_nodes = }')
422
503
  idx_sg = np.asarray(idx)
423
504
  if renumber_nodes:
424
505
  if len(node_id) == 0:
@@ -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)
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import logging
3
4
  import numpy as np
4
5
  from meshio import CellBlock
5
6
  from meshio.gmsh._gmsh22 import (
@@ -14,6 +15,8 @@ from meshio.gmsh._gmsh22 import (
14
15
  _write_periodic,
15
16
  )
16
17
 
18
+ logger = logging.getLogger(__name__)
19
+
17
20
  from ._common import (
18
21
  _fast_forward_over_blank_lines,
19
22
  _fast_forward_to_end_block,
@@ -94,6 +97,10 @@ def write_buffer(file, mesh, float_fmt=".16e", binary=False, **kwargs):
94
97
  for name, dat in cell_data_raw.items():
95
98
  _write_data(file, "ElementData", name, dat, binary)
96
99
 
100
+ # Write cell_point_data (element nodal data) to ElementNodeData sections
101
+ if hasattr(mesh, 'cell_point_data') and mesh.cell_point_data:
102
+ _write_cell_point_data(file, mesh, binary)
103
+
97
104
 
98
105
  def _write_nodes(fh, points, float_fmt, binary):
99
106
  if points.shape[1] == 2:
@@ -188,4 +195,130 @@ def _write_elements(fh, cells: list[CellBlock], tag_data, binary: bool):
188
195
  fh.write("$EndElements\n")
189
196
 
190
197
 
198
+ def _write_cell_point_data(fh, mesh, binary: bool) -> None:
199
+ """Write cell_point_data (element nodal data) to $ElementNodeData sections.
200
+
201
+ Parameters
202
+ ----------
203
+ fh : file
204
+ File handle to write to
205
+ mesh : SGMesh
206
+ Mesh object containing cell_point_data
207
+ binary : bool
208
+ Whether to write in binary mode
209
+
210
+ Notes
211
+ -----
212
+ The $ElementNodeData format is:
213
+ $ElementNodeData
214
+ numStringTags(ASCII int)
215
+ stringTag(string) ...
216
+ numRealTags(ASCII int)
217
+ realTag(ASCII double) ...
218
+ numIntegerTags(ASCII int)
219
+ integerTag(ASCII int) ...
220
+ elementTag(int) numNodesPerElement(int) value(double) ...
221
+ ...
222
+ $EndElementNodeData
223
+
224
+ The cell_point_data structure is:
225
+ {name: [array_for_cell_block_0, array_for_cell_block_1, ...]}
226
+ where each array has shape (n_elements, n_nodes_per_element) for single component
227
+ or (n_elements, n_nodes_per_element, n_components) for multi-component data.
228
+ """
229
+ # Get element IDs from cell_data
230
+ if 'element_id' not in mesh.cell_data:
231
+ logger.warning("Cannot write cell_point_data: mesh.cell_data['element_id'] not found")
232
+ return
233
+
234
+ element_ids = mesh.cell_data['element_id']
235
+
236
+ # Process each field in cell_point_data
237
+ for field_name, cell_blocks_data in mesh.cell_point_data.items():
238
+ # Determine number of components from the data shape
239
+ first_block_data = cell_blocks_data[0]
240
+ if len(first_block_data.shape) == 2:
241
+ # Shape: (n_elements, n_nodes_per_element) - single component
242
+ num_components = 1
243
+ elif len(first_block_data.shape) == 3:
244
+ # Shape: (n_elements, n_nodes_per_element, n_components)
245
+ num_components = first_block_data.shape[2]
246
+ else:
247
+ logger.warning(f"Unexpected shape for cell_point_data '{field_name}': {first_block_data.shape}")
248
+ continue
249
+
250
+ # Count total number of elements across all cell blocks
251
+ total_elements = sum(len(block_data) for block_data in cell_blocks_data)
252
+
253
+ # Write header
254
+ if binary:
255
+ fh.write(b"$ElementNodeData\n")
256
+ # 1 string tag: field name
257
+ fh.write(f"{1}\n".encode())
258
+ fh.write(f'"{field_name}"\n'.encode())
259
+ # 1 real tag: time value
260
+ fh.write(f"{1}\n".encode())
261
+ fh.write(f"{0.0}\n".encode())
262
+ # 3 integer tags: time step, num components, num elements
263
+ fh.write(f"{3}\n".encode())
264
+ fh.write(f"{0}\n".encode()) # time step
265
+ fh.write(f"{num_components}\n".encode())
266
+ fh.write(f"{total_elements}\n".encode())
267
+ else:
268
+ fh.write("$ElementNodeData\n")
269
+ # 1 string tag: field name
270
+ fh.write(f"{1}\n")
271
+ fh.write(f'"{field_name}"\n')
272
+ # 1 real tag: time value
273
+ fh.write(f"{1}\n")
274
+ fh.write(f"{0.0}\n")
275
+ # 3 integer tags: time step, num components, num elements
276
+ fh.write(f"{3}\n")
277
+ fh.write(f"{0}\n") # time step
278
+ fh.write(f"{num_components}\n")
279
+ fh.write(f"{total_elements}\n")
280
+
281
+ # Write data for each element across all cell blocks
282
+ for block_idx, block_data in enumerate(cell_blocks_data):
283
+ block_element_ids = element_ids[block_idx]
284
+
285
+ for elem_idx, elem_data in enumerate(block_data):
286
+ elem_id = int(block_element_ids[elem_idx])
287
+
288
+ # elem_data shape: (n_nodes_per_element,) or (n_nodes_per_element, n_components)
289
+ if num_components == 1:
290
+ # Single component: elem_data is 1D array
291
+ num_nodes = len(elem_data)
292
+ if binary:
293
+ np.array([elem_id], dtype=c_int).tofile(fh)
294
+ np.array([num_nodes], dtype=c_int).tofile(fh)
295
+ elem_data.astype(c_double).tofile(fh)
296
+ else:
297
+ fh.write(f"{elem_id} {num_nodes}")
298
+ for val in elem_data:
299
+ fh.write(f" {float(val)}")
300
+ fh.write("\n")
301
+ else:
302
+ # Multi-component: elem_data is 2D array (n_nodes, n_components)
303
+ num_nodes = elem_data.shape[0]
304
+ if binary:
305
+ np.array([elem_id], dtype=c_int).tofile(fh)
306
+ np.array([num_nodes], dtype=c_int).tofile(fh)
307
+ # Flatten the data: all components for node 1, then node 2, etc.
308
+ elem_data.astype(c_double).flatten().tofile(fh)
309
+ else:
310
+ fh.write(f"{elem_id} {num_nodes}")
311
+ for node_vals in elem_data:
312
+ for val in node_vals:
313
+ fh.write(f" {float(val)}")
314
+ fh.write("\n")
315
+
316
+ # Write footer
317
+ if binary:
318
+ fh.write(b"\n")
319
+ fh.write(b"$EndElementNodeData\n")
320
+ else:
321
+ fh.write("$EndElementNodeData\n")
322
+
323
+
191
324