pynumgeo 2026.2.0.dev2__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 (190) hide show
  1. pynumgeo-2026.2.0.dev2/.gitignore +37 -0
  2. pynumgeo-2026.2.0.dev2/LICENSE +28 -0
  3. pynumgeo-2026.2.0.dev2/NOTICE +19 -0
  4. pynumgeo-2026.2.0.dev2/PKG-INFO +103 -0
  5. pynumgeo-2026.2.0.dev2/README.md +63 -0
  6. pynumgeo-2026.2.0.dev2/pyproject.toml +101 -0
  7. pynumgeo-2026.2.0.dev2/src/pynumgeo/__init__.py +144 -0
  8. pynumgeo-2026.2.0.dev2/src/pynumgeo/_provenance.py +77 -0
  9. pynumgeo-2026.2.0.dev2/src/pynumgeo/_version.py +28 -0
  10. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/__init__.py +466 -0
  11. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/catalogue.json +56012 -0
  12. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/accelerator.md +102 -0
  13. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/amplitude.md +124 -0
  14. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/assign_material.md +36 -0
  15. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/Uboundary.md +55 -0
  16. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/body-force.md +58 -0
  17. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/boundary.md +201 -0
  18. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/cload.md +75 -0
  19. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/connector_element.md +16 -0
  20. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/dload.md +241 -0
  21. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/dsload.md +378 -0
  22. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/flexible-boundary.md +115 -0
  23. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/index.md +134 -0
  24. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/mass_point.md +16 -0
  25. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/boundary-conditions/reaction_force.md +36 -0
  26. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/contacts/contact-options.md +25 -0
  27. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/contacts/contact-pair.md +88 -0
  28. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/contacts/fluid_interaction.md +21 -0
  29. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/contacts/index.md +28 -0
  30. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/contacts/interaction.md +214 -0
  31. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/controls.md +201 -0
  32. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-beam.md +87 -0
  33. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-shell.md +123 -0
  34. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-u-truss.md +69 -0
  35. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-u.md +56 -0
  36. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-uU-sat.md +60 -0
  37. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-up-sat.md +119 -0
  38. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-up.md +118 -0
  39. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-upU-sat.md +57 -0
  40. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-upp.md +43 -0
  41. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/elements-ut.md +79 -0
  42. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/element/index.md +40 -0
  43. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/elset.md +37 -0
  44. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/embedded-regions/absorbed.md +46 -0
  45. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/embedded-regions/index.md +19 -0
  46. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/embedded-regions/interaction.md +184 -0
  47. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/equation.md +123 -0
  48. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/execute-command.md +12 -0
  49. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/extrapolation.md +33 -0
  50. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/index.md +140 -0
  51. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/contact.md +11 -0
  52. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/index.md +25 -0
  53. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/pore-pressure.md +24 -0
  54. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/state-variables.md +171 -0
  55. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/stress.md +90 -0
  56. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/temperature.md +28 -0
  57. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/velocity-acceleration.md +45 -0
  58. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/initial-conditions/void-ratio.md +28 -0
  59. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/beam-properties.md +100 -0
  60. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/bishop.md +98 -0
  61. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/bulk_modulus.md +9 -0
  62. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/cavitation.md +17 -0
  63. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/damping.md +61 -0
  64. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/density.md +15 -0
  65. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/fpl-stabilisation.md +39 -0
  66. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hourglass.md +92 -0
  67. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/brooks-corey.md +27 -0
  68. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/exponential.md +25 -0
  69. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/fredlund-xing.md +28 -0
  70. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/gallipoli-model.md +28 -0
  71. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/index.md +64 -0
  72. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/karlsruhe-model.md +38 -0
  73. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/hydraulic/van-genuchten.md +28 -0
  74. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/index.md +55 -0
  75. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/avhp.md +12 -0
  76. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/avisa.md +84 -0
  77. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/barotropic_elasticity.md +54 -0
  78. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/bathytropic-elasticity.md +113 -0
  79. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/bc-hypo-igs-sf.md +116 -0
  80. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/bingham.md +49 -0
  81. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hardening_soil_MN.md +94 -0
  82. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hardening_soil_MN_bricks.md +96 -0
  83. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hca-sand.md +263 -0
  84. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hypo-clay.md +13 -0
  85. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hypoplasticity_gis.md +111 -0
  86. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hypoplasticity_igs.md +181 -0
  87. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hypoplasticity_isa-sf.md +126 -0
  88. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/hypoplasticity_isa.md +147 -0
  89. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/index.md +43 -0
  90. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/linear_elasticity.md +13 -0
  91. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/matsuoka_nakai.md +41 -0
  92. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/modified-cam-clay.md +166 -0
  93. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/mohr_coulomb.md +205 -0
  94. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/sanisand.md +154 -0
  95. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/sanisand_f.md +84 -0
  96. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/sanisand_msf.md +101 -0
  97. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/ta-ger.md +106 -0
  98. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical/thermal_elasticity.md +48 -0
  99. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/mechanical_viscosity.md +23 -0
  100. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/min_pressure.md +23 -0
  101. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability/brooks-corey.md +24 -0
  102. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability/fredlund-xing.md +34 -0
  103. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability/index.md +27 -0
  104. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability/logistic-fit.md +27 -0
  105. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability/nguyen.md +25 -0
  106. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability/van-genuchten.md +24 -0
  107. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/permeability.md +153 -0
  108. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/phantom_elasticity.md +25 -0
  109. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/shell-properties.md +64 -0
  110. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/specific-heat.md +24 -0
  111. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/thermal-capacity.md +22 -0
  112. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/thermal-conductivity.md +24 -0
  113. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/thermal-stabilisation.md +24 -0
  114. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/material/truss-properties.md +56 -0
  115. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/model-change/index.md +13 -0
  116. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/model-change/material.md +32 -0
  117. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/node.md +29 -0
  118. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/non-local.md +32 -0
  119. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/nset.md +60 -0
  120. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/output/field.md +203 -0
  121. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/output/index.md +56 -0
  122. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/output/print.md +158 -0
  123. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/read-state.md +8 -0
  124. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/reset.md +25 -0
  125. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/restart.md +73 -0
  126. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/solver.md +515 -0
  127. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/dynamic.md +65 -0
  128. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/explicit-dynamic.md +48 -0
  129. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/geostatic.md +14 -0
  130. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/index.md +83 -0
  131. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/reduction.md +32 -0
  132. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/static.md +27 -0
  133. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/transient-critical.md +20 -0
  134. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/step/transient.md +14 -0
  135. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/submodel.md +30 -0
  136. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/surface.md +28 -0
  137. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/termination.md +29 -0
  138. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/amplitude.md +48 -0
  139. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/boundary.md +58 -0
  140. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/contact.md +84 -0
  141. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/index.md +42 -0
  142. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/initial-statev.md +73 -0
  143. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/initial-stress.md +77 -0
  144. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/load.md +70 -0
  145. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs/reference/user/material.md +169 -0
  146. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/docs_index.json +136 -0
  147. pynumgeo-2026.2.0.dev2/src/pynumgeo/catalogue/data/messages.json +24331 -0
  148. pynumgeo-2026.2.0.dev2/src/pynumgeo/cli/__init__.py +14 -0
  149. pynumgeo-2026.2.0.dev2/src/pynumgeo/cli/__main__.py +243 -0
  150. pynumgeo-2026.2.0.dev2/src/pynumgeo/deck/__init__.py +21 -0
  151. pynumgeo-2026.2.0.dev2/src/pynumgeo/deck/compare.py +181 -0
  152. pynumgeo-2026.2.0.dev2/src/pynumgeo/deck/deck.py +338 -0
  153. pynumgeo-2026.2.0.dev2/src/pynumgeo/deck/keyword.py +182 -0
  154. pynumgeo-2026.2.0.dev2/src/pynumgeo/deck/names.py +270 -0
  155. pynumgeo-2026.2.0.dev2/src/pynumgeo/io/__init__.py +14 -0
  156. pynumgeo-2026.2.0.dev2/src/pynumgeo/io/lexer.py +298 -0
  157. pynumgeo-2026.2.0.dev2/src/pynumgeo/io/numbers.py +125 -0
  158. pynumgeo-2026.2.0.dev2/src/pynumgeo/io/reader.py +997 -0
  159. pynumgeo-2026.2.0.dev2/src/pynumgeo/io/syntax.py +258 -0
  160. pynumgeo-2026.2.0.dev2/src/pynumgeo/io/writer.py +464 -0
  161. pynumgeo-2026.2.0.dev2/src/pynumgeo/issue.py +70 -0
  162. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/__init__.py +59 -0
  163. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/convert.py +573 -0
  164. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/freecad_adapter.py +289 -0
  165. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/mesh.py +384 -0
  166. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/meshio_adapter.py +255 -0
  167. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/quality.py +195 -0
  168. pynumgeo-2026.2.0.dev2/src/pynumgeo/mesh/topology.py +590 -0
  169. pynumgeo-2026.2.0.dev2/src/pynumgeo/py.typed +0 -0
  170. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/__init__.py +78 -0
  171. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/_fortran.py +89 -0
  172. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/printfiles.py +617 -0
  173. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/results.py +345 -0
  174. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/sta.py +256 -0
  175. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/tensors.py +75 -0
  176. pynumgeo-2026.2.0.dev2/src/pynumgeo/results/vtk.py +465 -0
  177. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/__init__.py +73 -0
  178. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/executable.py +237 -0
  179. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/logs.py +564 -0
  180. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/messages.py +285 -0
  181. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/outcome.py +650 -0
  182. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/result.py +267 -0
  183. pynumgeo-2026.2.0.dev2/src/pynumgeo/solver/runner.py +482 -0
  184. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/__init__.py +51 -0
  185. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/engine.py +121 -0
  186. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/issue.py +19 -0
  187. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/rules/__init__.py +17 -0
  188. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/rules/behaviour.py +3565 -0
  189. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/rules/core.py +491 -0
  190. pynumgeo-2026.2.0.dev2/src/pynumgeo/validation/rules/keywords.py +1085 -0
@@ -0,0 +1,37 @@
1
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
2
+ # pynumgeo
3
+ # Python API for the finite element code numgeo
4
+ # Copyright (C) 2026 Jan Machacek
5
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
6
+ #
7
+ # Author: Jan Machacek
8
+ #
9
+ # pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
10
+ # development of numgeo: new developments in the numgeo source code are taken over into the API, and a
11
+ # CI pipeline tests every change.
12
+ #
13
+ # License: BSD-3-Clause, see LICENSE.
14
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
15
+ # Only the package and its documentation belong to this repository: everything else is ignored.
16
+ /*
17
+ !/src/
18
+ !/tests/
19
+ !/docs/
20
+ !/README.md
21
+ !/LICENSE
22
+ !/NOTICE
23
+ !/pyproject.toml
24
+ !/zensical.toml
25
+ !/.gitignore
26
+ !/.github/
27
+ /docs/changelog.md
28
+ /docs/compatibility.md
29
+ /docs/maintenance.md
30
+
31
+ # Python and tool caches
32
+ __pycache__/
33
+ *.py[cod]
34
+ *.egg-info/
35
+ .pytest_cache/
36
+ .mypy_cache/
37
+ .ruff_cache/
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Jan Machacek
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,19 @@
1
+ pynumgeo
2
+ Copyright (c) 2026 Jan Machacek
3
+ Licensed under the BSD 3-Clause License, see LICENSE.
4
+
5
+ The pynumgeo source code is written by Jan Machacek. In addition, the package ships data taken from
6
+ numgeo, in src/pynumgeo/catalogue/data/:
7
+
8
+ * docs/reference/ - the keyword reference pages of the numgeo documentation
9
+ (numgeo documentation commit eceee974);
10
+ * catalogue.json,
11
+ messages.json - keyword, option and message tables derived from the numgeo source code
12
+ (numgeo source commit 834564ed).
13
+
14
+ These numgeo texts are
15
+
16
+ Copyright (c) 2018-2026 Jan Machacek, Patrick Staubach (the copyright holders of numgeo)
17
+
18
+ and are redistributed with pynumgeo with the permission of the copyright holders. numgeo itself is
19
+ not part of pynumgeo; see https://www.numgeo.de.
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.5
2
+ Name: pynumgeo
3
+ Version: 2026.2.0.dev2
4
+ Summary: Python API for the finite element code numgeo: input decks, validation, runs and results
5
+ Project-URL: Homepage, https://github.com/j-machacek/pynumgeo
6
+ Project-URL: Documentation, https://j-machacek.github.io/pynumgeo/
7
+ Project-URL: Source, https://github.com/j-machacek/pynumgeo
8
+ Project-URL: numgeo, https://www.numgeo.de
9
+ Author: Jan Machacek
10
+ License-Expression: BSD-3-Clause
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: numpy>=1.23
24
+ Requires-Dist: pydantic<3,>=2.5
25
+ Provides-Extra: dev
26
+ Requires-Dist: meshio>=5; extra == 'dev'
27
+ Requires-Dist: mypy>=1.8; extra == 'dev'
28
+ Requires-Dist: pre-commit; extra == 'dev'
29
+ Requires-Dist: pytest-cov; extra == 'dev'
30
+ Requires-Dist: pytest>=7; extra == 'dev'
31
+ Requires-Dist: ruff>=0.5; extra == 'dev'
32
+ Provides-Extra: docs
33
+ Requires-Dist: mkdocstrings-python>=2.0; extra == 'docs'
34
+ Requires-Dist: zensical>=0.0.73; extra == 'docs'
35
+ Provides-Extra: meshio
36
+ Requires-Dist: meshio>=5; extra == 'meshio'
37
+ Provides-Extra: pandas
38
+ Requires-Dist: pandas>=1.5; extra == 'pandas'
39
+ Description-Content-Type: text/markdown
40
+
41
+ <!--
42
+ =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
43
+ pynumgeo
44
+ Python API for the finite element code numgeo
45
+ Copyright (C) 2026 Jan Machacek
46
+ =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
47
+
48
+ Author: Jan Machacek
49
+
50
+ pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
51
+ development of numgeo: new developments in the numgeo source code are taken over into the API, and a
52
+ CI pipeline tests every change.
53
+
54
+ License: BSD-3-Clause, see LICENSE.
55
+ =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
56
+ -->
57
+
58
+ <p align="center">
59
+ <picture>
60
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/j-machacek/pynumgeo/main/docs/assets/pynumgeo-logo-dark.png">
61
+ <img src="https://raw.githubusercontent.com/j-machacek/pynumgeo/main/docs/assets/pynumgeo-logo.png" alt="pynumgeo" height="80">
62
+ </picture>
63
+ </p>
64
+
65
+ # pynumgeo
66
+
67
+ [PyPI](https://pypi.org/project/pynumgeo/) ·
68
+ [Documentation](https://j-machacek.github.io/pynumgeo/) ·
69
+ [numgeo](https://www.numgeo.de) ·
70
+ [numgeo documentation](https://j-machacek.github.io/numgeo/)
71
+
72
+ Python API for the finite element code [numgeo](https://www.numgeo.de): the object model of a numgeo
73
+ input deck, reading and writing input files, validation against what the solver accepts, running the
74
+ solver, and reading its results — headless, on Windows and Linux.
75
+
76
+ ```python
77
+ import pynumgeo as ng
78
+
79
+ deck = ng.read("model.inp") # numgeo input -> Deck (mesh, materials, steps, ...)
80
+ issues = ng.validate(deck) # what numgeo would reject or read differently
81
+ ng.write(deck, "job/model.inp") # normal-case, deterministic numgeo input
82
+ res = ng.run(deck, "job", job="model") # run numgeo, judge the outcome from its report files
83
+ frames = ng.open_results("job", "model").frames()
84
+ ```
85
+
86
+ ```console
87
+ pip install --pre pynumgeo # Python 3.11+; runtime dependencies: numpy, pydantic 2
88
+ pynumgeo validate model.inp # every command also has --json
89
+ pynumgeo run model.inp --workdir runs/m1
90
+ pynumgeo info "*Initial conditions"
91
+ pynumgeo --version
92
+ ```
93
+
94
+ The [documentation](https://j-machacek.github.io/pynumgeo/) is built with [Zensical](https://zensical.org)
95
+ from `docs/` (`pip install -e ".[docs]"`, then `zensical serve`); `docs/llms.txt` is a one-page summary for
96
+ agents.
97
+
98
+ pynumgeo `2026.2.0.dev2` is a pre-release (hence `pip install --pre`) built against the numgeo developer
99
+ source `834564ed` (`numgeo2026-v2`); `2026.2.0` will be released together with numgeo2026-v2. Every input file it writes starts with a header that names the
100
+ pynumgeo version, its author and the numgeo build it was written for.
101
+
102
+ Author: Jan Machacek. Licence: BSD-3-Clause (`LICENSE`). The numgeo reference texts bundled with the
103
+ package are covered by the numgeo copyright notice in `NOTICE`.
@@ -0,0 +1,63 @@
1
+ <!--
2
+ =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
3
+ pynumgeo
4
+ Python API for the finite element code numgeo
5
+ Copyright (C) 2026 Jan Machacek
6
+ =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
7
+
8
+ Author: Jan Machacek
9
+
10
+ pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
11
+ development of numgeo: new developments in the numgeo source code are taken over into the API, and a
12
+ CI pipeline tests every change.
13
+
14
+ License: BSD-3-Clause, see LICENSE.
15
+ =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
16
+ -->
17
+
18
+ <p align="center">
19
+ <picture>
20
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/pynumgeo-logo-dark.svg">
21
+ <img src="docs/assets/pynumgeo-logo.svg" alt="pynumgeo" height="80">
22
+ </picture>
23
+ </p>
24
+
25
+ # pynumgeo
26
+
27
+ [PyPI](https://pypi.org/project/pynumgeo/) ·
28
+ [Documentation](https://j-machacek.github.io/pynumgeo/) ·
29
+ [numgeo](https://www.numgeo.de) ·
30
+ [numgeo documentation](https://j-machacek.github.io/numgeo/)
31
+
32
+ Python API for the finite element code [numgeo](https://www.numgeo.de): the object model of a numgeo
33
+ input deck, reading and writing input files, validation against what the solver accepts, running the
34
+ solver, and reading its results — headless, on Windows and Linux.
35
+
36
+ ```python
37
+ import pynumgeo as ng
38
+
39
+ deck = ng.read("model.inp") # numgeo input -> Deck (mesh, materials, steps, ...)
40
+ issues = ng.validate(deck) # what numgeo would reject or read differently
41
+ ng.write(deck, "job/model.inp") # normal-case, deterministic numgeo input
42
+ res = ng.run(deck, "job", job="model") # run numgeo, judge the outcome from its report files
43
+ frames = ng.open_results("job", "model").frames()
44
+ ```
45
+
46
+ ```console
47
+ pip install --pre pynumgeo # Python 3.11+; runtime dependencies: numpy, pydantic 2
48
+ pynumgeo validate model.inp # every command also has --json
49
+ pynumgeo run model.inp --workdir runs/m1
50
+ pynumgeo info "*Initial conditions"
51
+ pynumgeo --version
52
+ ```
53
+
54
+ The [documentation](https://j-machacek.github.io/pynumgeo/) is built with [Zensical](https://zensical.org)
55
+ from `docs/` (`pip install -e ".[docs]"`, then `zensical serve`); `docs/llms.txt` is a one-page summary for
56
+ agents.
57
+
58
+ pynumgeo `2026.2.0.dev2` is a pre-release (hence `pip install --pre`) built against the numgeo developer
59
+ source `834564ed` (`numgeo2026-v2`); `2026.2.0` will be released together with numgeo2026-v2. Every input file it writes starts with a header that names the
60
+ pynumgeo version, its author and the numgeo build it was written for.
61
+
62
+ Author: Jan Machacek. Licence: BSD-3-Clause (`LICENSE`). The numgeo reference texts bundled with the
63
+ package are covered by the numgeo copyright notice in `NOTICE`.
@@ -0,0 +1,101 @@
1
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
2
+ # pynumgeo
3
+ # Python API for the finite element code numgeo
4
+ # Copyright (C) 2026 Jan Machacek
5
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
6
+ #
7
+ # Author: Jan Machacek
8
+ #
9
+ # pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
10
+ # development of numgeo: new developments in the numgeo source code are taken over into the API, and a
11
+ # CI pipeline tests every change.
12
+ #
13
+ # License: BSD-3-Clause, see LICENSE.
14
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
15
+
16
+ [build-system]
17
+ requires = ["hatchling>=1.27", "hatch-fancy-pypi-readme>=24"]
18
+ build-backend = "hatchling.build"
19
+
20
+ [project]
21
+ name = "pynumgeo"
22
+ dynamic = ["version", "readme"]
23
+ description = "Python API for the finite element code numgeo: input decks, validation, runs and results"
24
+ license = "BSD-3-Clause"
25
+ license-files = ["LICENSE", "NOTICE"]
26
+ authors = [{ name = "Jan Machacek" }]
27
+ requires-python = ">=3.11"
28
+ dependencies = ["numpy>=1.23", "pydantic>=2.5,<3"]
29
+ classifiers = [
30
+ "Development Status :: 4 - Beta",
31
+ "Programming Language :: Python :: 3",
32
+ "Programming Language :: Python :: 3.11",
33
+ "Programming Language :: Python :: 3.12",
34
+ "Programming Language :: Python :: 3.13",
35
+ "Operating System :: Microsoft :: Windows",
36
+ "Operating System :: POSIX :: Linux",
37
+ "Topic :: Scientific/Engineering",
38
+ "Typing :: Typed",
39
+ ]
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/j-machacek/pynumgeo"
43
+ Documentation = "https://j-machacek.github.io/pynumgeo/"
44
+ Source = "https://github.com/j-machacek/pynumgeo"
45
+ numgeo = "https://www.numgeo.de"
46
+
47
+ [project.optional-dependencies]
48
+ meshio = ["meshio>=5"]
49
+ pandas = ["pandas>=1.5"]
50
+ docs = ["zensical>=0.0.73", "mkdocstrings-python>=2.0"]
51
+ dev = ["pytest>=7", "pytest-cov", "ruff>=0.5", "mypy>=1.8", "pre-commit", "meshio>=5"]
52
+
53
+ [project.scripts]
54
+ pynumgeo = "pynumgeo.cli.__main__:main"
55
+
56
+ [tool.hatch.version]
57
+ path = "src/pynumgeo/_version.py"
58
+
59
+ # PyPI cannot show the logo through the relative paths that GitHub uses: rewrite them to absolute URLs
60
+ # (PNG) in the package description only.
61
+ [tool.hatch.metadata.hooks.fancy-pypi-readme]
62
+ content-type = "text/markdown"
63
+
64
+ [[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
65
+ path = "README.md"
66
+
67
+ [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
68
+ pattern = '="docs/assets/(pynumgeo-logo(?:-dark)?)\.svg"'
69
+ replacement = '="https://raw.githubusercontent.com/j-machacek/pynumgeo/main/docs/assets/\1.png"'
70
+
71
+ [tool.hatch.build.targets.wheel]
72
+ packages = ["src/pynumgeo"]
73
+
74
+ [tool.hatch.build.targets.sdist]
75
+ include = ["src/pynumgeo", "README.md", "LICENSE", "NOTICE", "pyproject.toml"]
76
+
77
+ [tool.pytest.ini_options]
78
+ testpaths = ["tests", "src/pynumgeo"]
79
+ addopts = "--doctest-modules -ra"
80
+ markers = [
81
+ "solver: needs a numgeo executable (NUMGEO_EXE)",
82
+ "source: needs a numgeo-src checkout (NUMGEO_SRC)",
83
+ "examples: needs the example decks (NUMGEO_EXAMPLES)",
84
+ "slow: long-running",
85
+ ]
86
+
87
+ [tool.ruff]
88
+ line-length = 120
89
+ target-version = "py311"
90
+ src = ["src", "tests", "scripts"]
91
+
92
+ [tool.ruff.lint]
93
+ select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF"]
94
+ ignore = ["RUF001", "RUF002", "RUF003"]
95
+
96
+ [tool.mypy]
97
+ python_version = "3.12" # numpy>=2.3 stubs need >=3.12 syntax; the code itself targets 3.11 (ruff)
98
+ strict = true
99
+ files = ["src/pynumgeo"]
100
+ plugins = ["pydantic.mypy"]
101
+ warn_unused_ignores = true
@@ -0,0 +1,144 @@
1
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
2
+ # pynumgeo
3
+ # Python API for the finite element code numgeo
4
+ # Copyright (C) 2026 Jan Machacek
5
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
6
+ #
7
+ # Author: Jan Machacek
8
+ #
9
+ # pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
10
+ # development of numgeo: new developments in the numgeo source code are taken over into the API, and a
11
+ # CI pipeline tests every change.
12
+ #
13
+ # License: BSD-3-Clause, see LICENSE.
14
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
15
+ """pynumgeo — Python API for the finite element code numgeo.
16
+
17
+ Read, build, validate and write numgeo input decks, run the solver and read its results::
18
+
19
+ import pynumgeo as ng
20
+
21
+ deck = ng.read("model.inp") # numgeo input -> Deck (mesh, materials, steps, ...)
22
+ issues = ng.validate(deck) # what numgeo would reject or read differently
23
+ ng.write(deck, "job/model.inp") # normal-case, deterministic numgeo input
24
+ res = ng.run(deck, "job", job="model") # run numgeo, judge the outcome from its logs
25
+ frames = ng.open_results("job", "model").frames()
26
+
27
+ Everything numgeo-specific (keywords, options, element types, constitutive models, messages) comes from
28
+ the catalogue (:mod:`pynumgeo.catalogue`), generated from the numgeo source. Submodules are imported
29
+ lazily, so ``import pynumgeo`` stays fast. The functions ``run`` and ``validate`` live in the subpackages
30
+ :mod:`pynumgeo.solver` and :mod:`pynumgeo.validation`; the subpackages are named differently from the
31
+ functions so that importing one never replaces ``pynumgeo.run`` or ``pynumgeo.validate`` by a module.
32
+ """
33
+
34
+ from __future__ import annotations
35
+
36
+ import importlib
37
+ from typing import TYPE_CHECKING, Any
38
+
39
+ from pynumgeo._version import NUMGEO_DOCS_COMMIT, NUMGEO_SOURCE_COMMIT, NUMGEO_VERSION, __version__
40
+
41
+ if TYPE_CHECKING: # pragma: no cover
42
+ from pynumgeo import catalogue
43
+ from pynumgeo.deck import Amplitude, Deck, Keyword, Material, Section, Step, diff
44
+ from pynumgeo.io.reader import (
45
+ FragmentResult,
46
+ ReadError,
47
+ ReadResult,
48
+ data_tokens,
49
+ parse,
50
+ parse_fragment,
51
+ parse_text,
52
+ read,
53
+ )
54
+ from pynumgeo.io.writer import WriteError, format_keyword, format_material, write, write_text, write_texts
55
+ from pynumgeo.issue import Issue
56
+ from pynumgeo.mesh import Mesh
57
+ from pynumgeo.results import open_results
58
+ from pynumgeo.solver import RunResult, RunStatus, run
59
+ from pynumgeo.validation import BuildProfile, validate
60
+
61
+ __all__ = [
62
+ "NUMGEO_DOCS_COMMIT",
63
+ "NUMGEO_SOURCE_COMMIT",
64
+ "NUMGEO_VERSION",
65
+ "Amplitude",
66
+ "BuildProfile",
67
+ "Deck",
68
+ "FragmentResult",
69
+ "Issue",
70
+ "Keyword",
71
+ "Material",
72
+ "Mesh",
73
+ "ReadError",
74
+ "ReadResult",
75
+ "RunResult",
76
+ "RunStatus",
77
+ "Section",
78
+ "Step",
79
+ "WriteError",
80
+ "__version__",
81
+ "catalogue",
82
+ "data_tokens",
83
+ "diff",
84
+ "format_keyword",
85
+ "format_material",
86
+ "open_results",
87
+ "parse",
88
+ "parse_fragment",
89
+ "parse_text",
90
+ "read",
91
+ "run",
92
+ "validate",
93
+ "write",
94
+ "write_text",
95
+ "write_texts",
96
+ ]
97
+
98
+ _LAZY = {
99
+ "catalogue": ("pynumgeo.catalogue", None),
100
+ "Amplitude": ("pynumgeo.deck", "Amplitude"),
101
+ "Deck": ("pynumgeo.deck", "Deck"),
102
+ "Keyword": ("pynumgeo.deck", "Keyword"),
103
+ "Material": ("pynumgeo.deck", "Material"),
104
+ "Section": ("pynumgeo.deck", "Section"),
105
+ "Step": ("pynumgeo.deck", "Step"),
106
+ "diff": ("pynumgeo.deck", "diff"),
107
+ "Mesh": ("pynumgeo.mesh", "Mesh"),
108
+ "Issue": ("pynumgeo.issue", "Issue"),
109
+ "ReadError": ("pynumgeo.io.reader", "ReadError"),
110
+ "ReadResult": ("pynumgeo.io.reader", "ReadResult"),
111
+ "FragmentResult": ("pynumgeo.io.reader", "FragmentResult"),
112
+ "parse_fragment": ("pynumgeo.io.reader", "parse_fragment"),
113
+ "data_tokens": ("pynumgeo.io.reader", "data_tokens"),
114
+ "parse": ("pynumgeo.io.reader", "parse"),
115
+ "parse_text": ("pynumgeo.io.reader", "parse_text"),
116
+ "read": ("pynumgeo.io.reader", "read"),
117
+ "WriteError": ("pynumgeo.io.writer", "WriteError"),
118
+ "write": ("pynumgeo.io.writer", "write"),
119
+ "write_text": ("pynumgeo.io.writer", "write_text"),
120
+ "write_texts": ("pynumgeo.io.writer", "write_texts"),
121
+ "format_keyword": ("pynumgeo.io.writer", "format_keyword"),
122
+ "format_material": ("pynumgeo.io.writer", "format_material"),
123
+ "BuildProfile": ("pynumgeo.validation", "BuildProfile"),
124
+ "validate": ("pynumgeo.validation", "validate"),
125
+ "run": ("pynumgeo.solver", "run"),
126
+ "RunResult": ("pynumgeo.solver", "RunResult"),
127
+ "RunStatus": ("pynumgeo.solver", "RunStatus"),
128
+ "open_results": ("pynumgeo.results", "open_results"),
129
+ }
130
+
131
+
132
+ def __getattr__(name: str) -> Any:
133
+ try:
134
+ mod, attr = _LAZY[name]
135
+ except KeyError:
136
+ raise AttributeError(f"module 'pynumgeo' has no attribute {name!r}") from None
137
+ m = importlib.import_module(mod)
138
+ value = m if attr is None else getattr(m, attr)
139
+ globals()[name] = value
140
+ return value
141
+
142
+
143
+ def __dir__() -> list[str]:
144
+ return sorted(__all__)
@@ -0,0 +1,77 @@
1
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
2
+ # pynumgeo
3
+ # Python API for the finite element code numgeo
4
+ # Copyright (C) 2026 Jan Machacek
5
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
6
+ #
7
+ # Author: Jan Machacek
8
+ #
9
+ # pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
10
+ # development of numgeo: new developments in the numgeo source code are taken over into the API, and a
11
+ # CI pipeline tests every change.
12
+ #
13
+ # License: BSD-3-Clause, see LICENSE.
14
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
15
+ """What pynumgeo writes into every file it creates: program, version and author.
16
+
17
+ * Input files start with a banner of numgeo comment lines (``**``), in the style of the numgeo source
18
+ files: :func:`input_file_header`. numgeo cuts every line at ``**``, so the banner is not read.
19
+ * The console log of a run (``<job>.console.log``) starts with :func:`console_header`; the console
20
+ parser skips that line.
21
+ * The JSON reports of the command line carry :func:`provenance` under the key ``"pynumgeo"``.
22
+
23
+ The creation date is not written: the same deck always gives the same file.
24
+
25
+ Examples:
26
+ >>> print("\\n".join(input_file_header())) # doctest: +ELLIPSIS
27
+ ** =~~=~~=...=~=~
28
+ ...numgeo input file
29
+ ...Created with pynumgeo ..., the Python API for numgeo by Jan Machacek
30
+ ...Written for numgeo... (numgeo source ...)
31
+ ** =~~=~~=...=~=~
32
+ """
33
+
34
+ from __future__ import annotations
35
+
36
+ from pynumgeo._version import NUMGEO_SOURCE_COMMIT, NUMGEO_VERSION, __version__
37
+
38
+ __all__ = ["AUTHOR", "BANNER", "CONSOLE_MARK", "console_header", "input_file_header", "provenance"]
39
+
40
+ #: The author of pynumgeo.
41
+ AUTHOR = "Jan Machacek"
42
+ #: Banner line of the numgeo source files (103 characters).
43
+ BANNER = "=~~" * 33 + "=~=~"
44
+ #: Start of the first line of a console log written by pynumgeo.
45
+ CONSOLE_MARK = "pynumgeo "
46
+
47
+
48
+ def _centre(text: str) -> str:
49
+ return " " * max((len(BANNER) - len(text)) // 2, 0) + text
50
+
51
+
52
+ def input_file_header() -> list[str]:
53
+ """The comment lines at the top of every input file pynumgeo writes (each at most 106 characters)."""
54
+ lines = [
55
+ BANNER,
56
+ _centre("numgeo input file"),
57
+ _centre(f"Created with pynumgeo {__version__}, the Python API for numgeo by {AUTHOR}"),
58
+ _centre(f"Written for {NUMGEO_VERSION} (numgeo source {NUMGEO_SOURCE_COMMIT[:8]})"),
59
+ BANNER,
60
+ ]
61
+ return [f"** {ln}" for ln in lines]
62
+
63
+
64
+ def console_header(command: list[str]) -> str:
65
+ """The first line of ``<job>.console.log``: who recorded it, and the command that started numgeo."""
66
+ return f"{CONSOLE_MARK}{__version__} (Python API for numgeo by {AUTHOR}): console output of {' '.join(command)}"
67
+
68
+
69
+ def provenance() -> dict[str, str]:
70
+ """Program, version and author, plus the numgeo build pynumgeo was written for (JSON reports)."""
71
+ return {
72
+ "program": "pynumgeo",
73
+ "version": __version__,
74
+ "author": AUTHOR,
75
+ "numgeo_version": NUMGEO_VERSION,
76
+ "numgeo_source_commit": NUMGEO_SOURCE_COMMIT,
77
+ }
@@ -0,0 +1,28 @@
1
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
2
+ # pynumgeo
3
+ # Python API for the finite element code numgeo
4
+ # Copyright (C) 2026 Jan Machacek
5
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
6
+ #
7
+ # Author: Jan Machacek
8
+ #
9
+ # pynumgeo writes, checks and runs numgeo input files and reads numgeo results. It follows the
10
+ # development of numgeo: new developments in the numgeo source code are taken over into the API, and a
11
+ # CI pipeline tests every change.
12
+ #
13
+ # License: BSD-3-Clause, see LICENSE.
14
+ # =~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
15
+ """Version of pynumgeo and of the numgeo source it was derived from.
16
+
17
+ pynumgeo follows the numgeo version: numgeo ``numgeo2026-v2`` corresponds to pynumgeo ``2026.2.x``
18
+ (``.devN`` until it is released together with numgeo).
19
+ """
20
+
21
+ __version__ = "2026.2.0.dev2"
22
+
23
+ #: numgeo version string this pynumgeo was derived from (console banner of the solver).
24
+ NUMGEO_VERSION = "numgeo2026-v2"
25
+ #: numgeo-src commit the catalogue was generated from.
26
+ NUMGEO_SOURCE_COMMIT = "834564ed77c2aa9ce5f6cdeabc03293c331520af"
27
+ #: numgeo documentation commit the bundled reference pages come from.
28
+ NUMGEO_DOCS_COMMIT = "eceee9749a1f0e47ff9aeedd50131707c4d7290a"