scinumtools3 0.4.1__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 (482) hide show
  1. scinumtools3-0.4.1/.clang-format +44 -0
  2. scinumtools3-0.4.1/.clang-format-ignore +2 -0
  3. scinumtools3-0.4.1/.clang-tidy +48 -0
  4. scinumtools3-0.4.1/.github/workflows/c-cpp-linux.yml +95 -0
  5. scinumtools3-0.4.1/.github/workflows/c-cpp-macos.yml +56 -0
  6. scinumtools3-0.4.1/.github/workflows/pypi-wheels.yml +77 -0
  7. scinumtools3-0.4.1/.github/workflows/static.yml +49 -0
  8. scinumtools3-0.4.1/.gitignore +44 -0
  9. scinumtools3-0.4.1/.gitmodules +3 -0
  10. scinumtools3-0.4.1/CMakeLists.txt +193 -0
  11. scinumtools3-0.4.1/CONTRIBUTING.md +95 -0
  12. scinumtools3-0.4.1/LICENSE +21 -0
  13. scinumtools3-0.4.1/PKG-INFO +313 -0
  14. scinumtools3-0.4.1/README.md +288 -0
  15. scinumtools3-0.4.1/apps/CMakeLists.txt +13 -0
  16. scinumtools3-0.4.1/apps/snt/CMakeLists.txt +21 -0
  17. scinumtools3-0.4.1/apps/snt/README.md +32 -0
  18. scinumtools3-0.4.1/apps/snt/argparser.cpp +72 -0
  19. scinumtools3-0.4.1/apps/snt/argparser.h +41 -0
  20. scinumtools3-0.4.1/apps/snt/main.cpp +58 -0
  21. scinumtools3-0.4.1/apps/snt/main.h +9 -0
  22. scinumtools3-0.4.1/apps/snt/module_dip.cpp +90 -0
  23. scinumtools3-0.4.1/apps/snt/module_puq.cpp +144 -0
  24. scinumtools3-0.4.1/apps/snt-dmap/CMakeLists.txt +16 -0
  25. scinumtools3-0.4.1/apps/snt-dmap/README.md +30 -0
  26. scinumtools3-0.4.1/apps/snt-dmap/main.cpp +271 -0
  27. scinumtools3-0.4.1/apps/snt-gui/CMakeLists.txt +21 -0
  28. scinumtools3-0.4.1/apps/snt-gui/main.cpp +6 -0
  29. scinumtools3-0.4.1/apps/snt-server/CMakeLists.txt +22 -0
  30. scinumtools3-0.4.1/apps/snt-server/main.cpp +26 -0
  31. scinumtools3-0.4.1/apps/snt-server/settings.h +9 -0
  32. scinumtools3-0.4.1/benchmarks/CMakeLists.txt +26 -0
  33. scinumtools3-0.4.1/benchmarks/puq/puq_benchmark.cpp +59 -0
  34. scinumtools3-0.4.1/bindings/python/README.md +3 -0
  35. scinumtools3-0.4.1/bindings/python/cpp/CMakeLists.txt +79 -0
  36. scinumtools3-0.4.1/bindings/python/cpp/cmake/FindPytest.cmake +16 -0
  37. scinumtools3-0.4.1/bindings/python/cpp/cmake/Pytest.cmake +22 -0
  38. scinumtools3-0.4.1/bindings/python/cpp/dip/CMakeLists.txt +6 -0
  39. scinumtools3-0.4.1/bindings/python/cpp/dip/bind_environment.cpp +39 -0
  40. scinumtools3-0.4.1/bindings/python/cpp/dip/bind_main.cpp +37 -0
  41. scinumtools3-0.4.1/bindings/python/cpp/dip/bind_value_node.cpp +87 -0
  42. scinumtools3-0.4.1/bindings/python/cpp/puq/CMakeLists.txt +7 -0
  43. scinumtools3-0.4.1/bindings/python/cpp/puq/bind_formats.cpp +15 -0
  44. scinumtools3-0.4.1/bindings/python/cpp/puq/bind_lists.cpp +19 -0
  45. scinumtools3-0.4.1/bindings/python/cpp/puq/bind_main.cpp +49 -0
  46. scinumtools3-0.4.1/bindings/python/cpp/puq/bind_quantity.cpp +334 -0
  47. scinumtools3-0.4.1/bindings/python/cpp/puq/bind_system.cpp +14 -0
  48. scinumtools3-0.4.1/bindings/python/cpp/puq/bind_unit_system.cpp +30 -0
  49. scinumtools3-0.4.1/bindings/python/cpp/scinumtools3.cpp +35 -0
  50. scinumtools3-0.4.1/bindings/python/cpp/snt/CMakeLists.txt +3 -0
  51. scinumtools3-0.4.1/bindings/python/cpp/snt/bind_main.cpp +29 -0
  52. scinumtools3-0.4.1/bindings/python/src/scinumtools3/__init__.py +5 -0
  53. scinumtools3-0.4.1/bindings/python/src/scinumtools3/dip/__init__.py +5 -0
  54. scinumtools3-0.4.1/bindings/python/src/scinumtools3/puq/__init__.py +11 -0
  55. scinumtools3-0.4.1/bindings/python/src/scinumtools3/snt/__init__.py +1 -0
  56. scinumtools3-0.4.1/bindings/python/tests/conftest.py +19 -0
  57. scinumtools3-0.4.1/bindings/python/tests/dip/example.dip +3 -0
  58. scinumtools3-0.4.1/bindings/python/tests/dip/test_definition.py +47 -0
  59. scinumtools3-0.4.1/bindings/python/tests/dip/test_results.py +100 -0
  60. scinumtools3-0.4.1/bindings/python/tests/misc/test_example.py +18 -0
  61. scinumtools3-0.4.1/bindings/python/tests/misc/test_module.py +13 -0
  62. scinumtools3-0.4.1/bindings/python/tests/puq/test_calculator.py +14 -0
  63. scinumtools3-0.4.1/bindings/python/tests/puq/test_lists.py +48 -0
  64. scinumtools3-0.4.1/bindings/python/tests/puq/test_quantity.py +230 -0
  65. scinumtools3-0.4.1/bindings/python/tests/puq/test_unit_system.py +34 -0
  66. scinumtools3-0.4.1/cmake/settings.h.in +5 -0
  67. scinumtools3-0.4.1/cmake/snt-config.cmake.in +13 -0
  68. scinumtools3-0.4.1/devtools/build_periodic_table.py +106 -0
  69. scinumtools3-0.4.1/devtools/check_versions.sh +12 -0
  70. scinumtools3-0.4.1/devtools/createHeaders.py +28 -0
  71. scinumtools3-0.4.1/devtools/requirements.txt +4 -0
  72. scinumtools3-0.4.1/docs/Doxyfile +2947 -0
  73. scinumtools3-0.4.1/docs/Makefile +20 -0
  74. scinumtools3-0.4.1/docs/README.md +26 -0
  75. scinumtools3-0.4.1/docs/dipl/grammar.ebnf +143 -0
  76. scinumtools3-0.4.1/docs/dipl/specification.md +218 -0
  77. scinumtools3-0.4.1/docs/dipl/syntax/conditions.md +106 -0
  78. scinumtools3-0.4.1/docs/dipl/syntax/datatypes.md +90 -0
  79. scinumtools3-0.4.1/docs/dipl/syntax/expressions.md +217 -0
  80. scinumtools3-0.4.1/docs/dipl/syntax/functions.md +41 -0
  81. scinumtools3-0.4.1/docs/dipl/syntax/nodes.md +138 -0
  82. scinumtools3-0.4.1/docs/dipl/syntax/properties.md +177 -0
  83. scinumtools3-0.4.1/docs/dipl/syntax/references.md +296 -0
  84. scinumtools3-0.4.1/docs/dipl/syntax/units.md +60 -0
  85. scinumtools3-0.4.1/docs/dipl/syntax/values.md +124 -0
  86. scinumtools3-0.4.1/docs/make.bat +35 -0
  87. scinumtools3-0.4.1/docs/puel/grammar.ebnf +62 -0
  88. scinumtools3-0.4.1/docs/puel/specification.md +185 -0
  89. scinumtools3-0.4.1/docs/source/conf.py +30 -0
  90. scinumtools3-0.4.1/docs/source/index.rst +17 -0
  91. scinumtools3-0.4.1/examples/CMakeLists.txt +5 -0
  92. scinumtools3-0.4.1/examples/dip/cli/parameters.dip +7 -0
  93. scinumtools3-0.4.1/examples/exs/ArraySolver/CMakeLists.txt +16 -0
  94. scinumtools3-0.4.1/examples/exs/ArraySolver/atom.cpp +50 -0
  95. scinumtools3-0.4.1/examples/exs/ArraySolver/main.cpp +38 -0
  96. scinumtools3-0.4.1/examples/exs/ArraySolver/main.h +25 -0
  97. scinumtools3-0.4.1/examples/exs/ArraySolver/operator_array.cpp +17 -0
  98. scinumtools3-0.4.1/examples/exs/CMakeLists.txt +7 -0
  99. scinumtools3-0.4.1/examples/exs/CustomSolver/CMakeLists.txt +16 -0
  100. scinumtools3-0.4.1/examples/exs/CustomSolver/atom.cpp +34 -0
  101. scinumtools3-0.4.1/examples/exs/CustomSolver/main.cpp +29 -0
  102. scinumtools3-0.4.1/examples/exs/CustomSolver/main.h +24 -0
  103. scinumtools3-0.4.1/examples/exs/CustomSolver/operator_length.cpp +12 -0
  104. scinumtools3-0.4.1/examples/exs/DefaultSolver/CMakeLists.txt +16 -0
  105. scinumtools3-0.4.1/examples/exs/DefaultSolver/main.cpp +17 -0
  106. scinumtools3-0.4.1/examples/exs/ModifiedSolver/CMakeLists.txt +16 -0
  107. scinumtools3-0.4.1/examples/exs/ModifiedSolver/main.cpp +28 -0
  108. scinumtools3-0.4.1/examples/exs/README.md +4 -0
  109. scinumtools3-0.4.1/examples/exs/SettingsSolver/CMakeLists.txt +16 -0
  110. scinumtools3-0.4.1/examples/exs/SettingsSolver/atom.cpp +25 -0
  111. scinumtools3-0.4.1/examples/exs/SettingsSolver/main.cpp +31 -0
  112. scinumtools3-0.4.1/examples/exs/SettingsSolver/main.h +31 -0
  113. scinumtools3-0.4.1/examples/exs/SettingsSolver/operator_select.cpp +13 -0
  114. scinumtools3-0.4.1/examples/exs/UniquePtrSolver/CMakeLists.txt +16 -0
  115. scinumtools3-0.4.1/examples/exs/UniquePtrSolver/atom.cpp +28 -0
  116. scinumtools3-0.4.1/examples/exs/UniquePtrSolver/main.cpp +26 -0
  117. scinumtools3-0.4.1/examples/exs/UniquePtrSolver/main.h +21 -0
  118. scinumtools3-0.4.1/examples/snt/CMakeLists.txt +3 -0
  119. scinumtools3-0.4.1/examples/snt/quick_example/CMakeLists.txt +15 -0
  120. scinumtools3-0.4.1/examples/snt/quick_example/main.cpp +33 -0
  121. scinumtools3-0.4.1/include/snt/core/datatypes.h +147 -0
  122. scinumtools3-0.4.1/include/snt/core/math/abs.h +10 -0
  123. scinumtools3-0.4.1/include/snt/core/math/cbrt.h +10 -0
  124. scinumtools3-0.4.1/include/snt/core/math/exp.h +10 -0
  125. scinumtools3-0.4.1/include/snt/core/math/log.h +10 -0
  126. scinumtools3-0.4.1/include/snt/core/math/log10.h +10 -0
  127. scinumtools3-0.4.1/include/snt/core/math/max.h +10 -0
  128. scinumtools3-0.4.1/include/snt/core/math/pow.h +10 -0
  129. scinumtools3-0.4.1/include/snt/core/math/sqrt.h +10 -0
  130. scinumtools3-0.4.1/include/snt/core/math.h +13 -0
  131. scinumtools3-0.4.1/include/snt/core/settings.h +40 -0
  132. scinumtools3-0.4.1/include/snt/core/string_format.h +226 -0
  133. scinumtools3-0.4.1/include/snt/core/to_string.h +10 -0
  134. scinumtools3-0.4.1/include/snt/dip/dip.h +50 -0
  135. scinumtools3-0.4.1/include/snt/dip/environment.h +101 -0
  136. scinumtools3-0.4.1/include/snt/dip/lists/list_branching.h +51 -0
  137. scinumtools3-0.4.1/include/snt/dip/lists/list_functions.h +30 -0
  138. scinumtools3-0.4.1/include/snt/dip/lists/list_hierarchy.h +23 -0
  139. scinumtools3-0.4.1/include/snt/dip/lists/list_node.h +37 -0
  140. scinumtools3-0.4.1/include/snt/dip/lists/list_source.h +37 -0
  141. scinumtools3-0.4.1/include/snt/dip/lists/list_unit.h +68 -0
  142. scinumtools3-0.4.1/include/snt/dip/nodes/node.h +32 -0
  143. scinumtools3-0.4.1/include/snt/dip/nodes/node_base.h +30 -0
  144. scinumtools3-0.4.1/include/snt/dip/nodes/node_boolean.h +28 -0
  145. scinumtools3-0.4.1/include/snt/dip/nodes/node_case.h +22 -0
  146. scinumtools3-0.4.1/include/snt/dip/nodes/node_float.h +32 -0
  147. scinumtools3-0.4.1/include/snt/dip/nodes/node_integer.h +33 -0
  148. scinumtools3-0.4.1/include/snt/dip/nodes/node_string.h +28 -0
  149. scinumtools3-0.4.1/include/snt/dip/nodes/node_value.h +69 -0
  150. scinumtools3-0.4.1/include/snt/dip/nodes/parser.h +129 -0
  151. scinumtools3-0.4.1/include/snt/dip/settings.h +123 -0
  152. scinumtools3-0.4.1/include/snt/dip/solvers/logical_atom.h +41 -0
  153. scinumtools3-0.4.1/include/snt/dip/solvers/logical_operators.h +24 -0
  154. scinumtools3-0.4.1/include/snt/dip/solvers/logical_solver.h +18 -0
  155. scinumtools3-0.4.1/include/snt/dip/solvers/numerical_atom.h +46 -0
  156. scinumtools3-0.4.1/include/snt/dip/solvers/numerical_solver.h +18 -0
  157. scinumtools3-0.4.1/include/snt/dip/solvers/template_solver.h +19 -0
  158. scinumtools3-0.4.1/include/snt/exs/atom.h +199 -0
  159. scinumtools3-0.4.1/include/snt/exs/atom_base.h +193 -0
  160. scinumtools3-0.4.1/include/snt/exs/atom_grand.h +212 -0
  161. scinumtools3-0.4.1/include/snt/exs/atom_list.h +19 -0
  162. scinumtools3-0.4.1/include/snt/exs/expression.h +25 -0
  163. scinumtools3-0.4.1/include/snt/exs/logical/not.h +8 -0
  164. scinumtools3-0.4.1/include/snt/exs/logical/or.h +8 -0
  165. scinumtools3-0.4.1/include/snt/exs/operator_base.h +35 -0
  166. scinumtools3-0.4.1/include/snt/exs/operator_group.h +64 -0
  167. scinumtools3-0.4.1/include/snt/exs/operator_list.h +23 -0
  168. scinumtools3-0.4.1/include/snt/exs/operator_ternary.h +20 -0
  169. scinumtools3-0.4.1/include/snt/exs/operators/arithmetic.h +59 -0
  170. scinumtools3-0.4.1/include/snt/exs/operators/comparison.h +64 -0
  171. scinumtools3-0.4.1/include/snt/exs/operators/control.h +26 -0
  172. scinumtools3-0.4.1/include/snt/exs/operators/exponential.h +81 -0
  173. scinumtools3-0.4.1/include/snt/exs/operators/logical.h +34 -0
  174. scinumtools3-0.4.1/include/snt/exs/operators/trigonometry.h +36 -0
  175. scinumtools3-0.4.1/include/snt/exs/settings.h +96 -0
  176. scinumtools3-0.4.1/include/snt/exs/solver.h +222 -0
  177. scinumtools3-0.4.1/include/snt/exs/step_list.h +20 -0
  178. scinumtools3-0.4.1/include/snt/exs/token.h +26 -0
  179. scinumtools3-0.4.1/include/snt/exs/token_list.h +140 -0
  180. scinumtools3-0.4.1/include/snt/exs/token_list_base.h +19 -0
  181. scinumtools3-0.4.1/include/snt/mat/element.h +109 -0
  182. scinumtools3-0.4.1/include/snt/mat/material.h +21 -0
  183. scinumtools3-0.4.1/include/snt/mat/matter.h +29 -0
  184. scinumtools3-0.4.1/include/snt/mat/part.h +32 -0
  185. scinumtools3-0.4.1/include/snt/mat/periodic_table.h +390 -0
  186. scinumtools3-0.4.1/include/snt/mat/set.h +43 -0
  187. scinumtools3-0.4.1/include/snt/mat/settings.h +21 -0
  188. scinumtools3-0.4.1/include/snt/mat/solvers/material_solver.h +25 -0
  189. scinumtools3-0.4.1/include/snt/mat/solvers/substance_atom.h +58 -0
  190. scinumtools3-0.4.1/include/snt/mat/solvers/substance_solver.h +49 -0
  191. scinumtools3-0.4.1/include/snt/mat/substance.h +53 -0
  192. scinumtools3-0.4.1/include/snt/puq/base_units.h +55 -0
  193. scinumtools3-0.4.1/include/snt/puq/calc/calculator.h +18 -0
  194. scinumtools3-0.4.1/include/snt/puq/calc/calculator_atom.h +23 -0
  195. scinumtools3-0.4.1/include/snt/puq/converter.h +209 -0
  196. scinumtools3-0.4.1/include/snt/puq/dimensions.h +38 -0
  197. scinumtools3-0.4.1/include/snt/puq/exceptions.h +53 -0
  198. scinumtools3-0.4.1/include/snt/puq/exponent.h +124 -0
  199. scinumtools3-0.4.1/include/snt/puq/lists.h +25 -0
  200. scinumtools3-0.4.1/include/snt/puq/math/abs.h +18 -0
  201. scinumtools3-0.4.1/include/snt/puq/math/cbrt.h +20 -0
  202. scinumtools3-0.4.1/include/snt/puq/math/ceil.h +18 -0
  203. scinumtools3-0.4.1/include/snt/puq/math/cos.h +18 -0
  204. scinumtools3-0.4.1/include/snt/puq/math/exp.h +18 -0
  205. scinumtools3-0.4.1/include/snt/puq/math/floor.h +18 -0
  206. scinumtools3-0.4.1/include/snt/puq/math/log.h +18 -0
  207. scinumtools3-0.4.1/include/snt/puq/math/log10.h +18 -0
  208. scinumtools3-0.4.1/include/snt/puq/math/max.h +18 -0
  209. scinumtools3-0.4.1/include/snt/puq/math/min.h +18 -0
  210. scinumtools3-0.4.1/include/snt/puq/math/pow.h +26 -0
  211. scinumtools3-0.4.1/include/snt/puq/math/round.h +18 -0
  212. scinumtools3-0.4.1/include/snt/puq/math/sin.h +18 -0
  213. scinumtools3-0.4.1/include/snt/puq/math/sqrt.h +20 -0
  214. scinumtools3-0.4.1/include/snt/puq/math/tan.h +18 -0
  215. scinumtools3-0.4.1/include/snt/puq/math.h +20 -0
  216. scinumtools3-0.4.1/include/snt/puq/measurement.h +82 -0
  217. scinumtools3-0.4.1/include/snt/puq/quantity.h +121 -0
  218. scinumtools3-0.4.1/include/snt/puq/result.h +64 -0
  219. scinumtools3-0.4.1/include/snt/puq/settings.h +69 -0
  220. scinumtools3-0.4.1/include/snt/puq/solver/unit_atom.h +33 -0
  221. scinumtools3-0.4.1/include/snt/puq/solver/unit_solver.h +18 -0
  222. scinumtools3-0.4.1/include/snt/puq/systems/quantities.h +160 -0
  223. scinumtools3-0.4.1/include/snt/puq/systems/system_base.h +68 -0
  224. scinumtools3-0.4.1/include/snt/puq/systems/systems.h +156 -0
  225. scinumtools3-0.4.1/include/snt/puq/systems/unit_system.h +85 -0
  226. scinumtools3-0.4.1/include/snt/puq/to_string.h +17 -0
  227. scinumtools3-0.4.1/include/snt/puq/unit_format.h +80 -0
  228. scinumtools3-0.4.1/include/snt/puq/util/data_table.h +73 -0
  229. scinumtools3-0.4.1/include/snt/puq/util/display_length.h +45 -0
  230. scinumtools3-0.4.1/include/snt/val/array.h +40 -0
  231. scinumtools3-0.4.1/include/snt/val/math/abs.h +12 -0
  232. scinumtools3-0.4.1/include/snt/val/math/cbrt.h +12 -0
  233. scinumtools3-0.4.1/include/snt/val/math/exp.h +12 -0
  234. scinumtools3-0.4.1/include/snt/val/math/log.h +12 -0
  235. scinumtools3-0.4.1/include/snt/val/math/log10.h +12 -0
  236. scinumtools3-0.4.1/include/snt/val/math/max.h +12 -0
  237. scinumtools3-0.4.1/include/snt/val/math/pow.h +13 -0
  238. scinumtools3-0.4.1/include/snt/val/math/sqrt.h +12 -0
  239. scinumtools3-0.4.1/include/snt/val/math.h +13 -0
  240. scinumtools3-0.4.1/include/snt/val/to_string.h +13 -0
  241. scinumtools3-0.4.1/include/snt/val/value_base.h +168 -0
  242. scinumtools3-0.4.1/include/snt/val/values.h +129 -0
  243. scinumtools3-0.4.1/include/snt/val/values_array.h +368 -0
  244. scinumtools3-0.4.1/include/snt/val/values_number.h +249 -0
  245. scinumtools3-0.4.1/include/snt/val/values_string.h +50 -0
  246. scinumtools3-0.4.1/paper/paper.bib +28 -0
  247. scinumtools3-0.4.1/paper/paper.md +109 -0
  248. scinumtools3-0.4.1/pyproject.toml +130 -0
  249. scinumtools3-0.4.1/requirements.txt +6 -0
  250. scinumtools3-0.4.1/settings.env +6 -0
  251. scinumtools3-0.4.1/setup.sh +224 -0
  252. scinumtools3-0.4.1/src/CMakeLists.txt +1 -0
  253. scinumtools3-0.4.1/src/snt/CMakeLists.txt +18 -0
  254. scinumtools3-0.4.1/src/snt/api/CMakeLists.txt +22 -0
  255. scinumtools3-0.4.1/src/snt/api/dip_parse.cpp +52 -0
  256. scinumtools3-0.4.1/src/snt/api/dip_parse.h +82 -0
  257. scinumtools3-0.4.1/src/snt/api/puq_convert.cpp +57 -0
  258. scinumtools3-0.4.1/src/snt/api/puq_convert.h +58 -0
  259. scinumtools3-0.4.1/src/snt/api/puq_eval.cpp +63 -0
  260. scinumtools3-0.4.1/src/snt/api/puq_eval.h +64 -0
  261. scinumtools3-0.4.1/src/snt/api/puq_info.cpp +157 -0
  262. scinumtools3-0.4.1/src/snt/api/puq_info.h +39 -0
  263. scinumtools3-0.4.1/src/snt/api/puq_list.cpp +60 -0
  264. scinumtools3-0.4.1/src/snt/api/puq_list.h +41 -0
  265. scinumtools3-0.4.1/src/snt/core/CMakeLists.txt +22 -0
  266. scinumtools3-0.4.1/src/snt/core/backtrace.h +65 -0
  267. scinumtools3-0.4.1/src/snt/core/datatypes.cpp +27 -0
  268. scinumtools3-0.4.1/src/snt/core/math/abs.cpp +10 -0
  269. scinumtools3-0.4.1/src/snt/core/math/cbrt.cpp +10 -0
  270. scinumtools3-0.4.1/src/snt/core/math/exp.cpp +10 -0
  271. scinumtools3-0.4.1/src/snt/core/math/floor.cpp +10 -0
  272. scinumtools3-0.4.1/src/snt/core/math/floor.h +10 -0
  273. scinumtools3-0.4.1/src/snt/core/math/log.cpp +10 -0
  274. scinumtools3-0.4.1/src/snt/core/math/log10.cpp +10 -0
  275. scinumtools3-0.4.1/src/snt/core/math/max.cpp +10 -0
  276. scinumtools3-0.4.1/src/snt/core/math/pow.cpp +10 -0
  277. scinumtools3-0.4.1/src/snt/core/math/sqrt.cpp +10 -0
  278. scinumtools3-0.4.1/src/snt/core/to_number.cpp +19 -0
  279. scinumtools3-0.4.1/src/snt/core/to_number.h +12 -0
  280. scinumtools3-0.4.1/src/snt/core/to_string.cpp +14 -0
  281. scinumtools3-0.4.1/src/snt/dip/CMakeLists.txt +22 -0
  282. scinumtools3-0.4.1/src/snt/dip/dip.cpp +229 -0
  283. scinumtools3-0.4.1/src/snt/dip/environment.cpp +179 -0
  284. scinumtools3-0.4.1/src/snt/dip/helpers.h +73 -0
  285. scinumtools3-0.4.1/src/snt/dip/lists/list_branching.cpp +193 -0
  286. scinumtools3-0.4.1/src/snt/dip/lists/list_functions.cpp +35 -0
  287. scinumtools3-0.4.1/src/snt/dip/lists/list_hierarchy.cpp +30 -0
  288. scinumtools3-0.4.1/src/snt/dip/lists/list_source.cpp +38 -0
  289. scinumtools3-0.4.1/src/snt/dip/lists/list_unit.cpp +40 -0
  290. scinumtools3-0.4.1/src/snt/dip/nodes/node.cpp +21 -0
  291. scinumtools3-0.4.1/src/snt/dip/nodes/node_base.cpp +28 -0
  292. scinumtools3-0.4.1/src/snt/dip/nodes/node_boolean.cpp +95 -0
  293. scinumtools3-0.4.1/src/snt/dip/nodes/node_case.cpp +79 -0
  294. scinumtools3-0.4.1/src/snt/dip/nodes/node_empty.cpp +13 -0
  295. scinumtools3-0.4.1/src/snt/dip/nodes/node_empty.h +16 -0
  296. scinumtools3-0.4.1/src/snt/dip/nodes/node_float.cpp +130 -0
  297. scinumtools3-0.4.1/src/snt/dip/nodes/node_group.cpp +12 -0
  298. scinumtools3-0.4.1/src/snt/dip/nodes/node_group.h +16 -0
  299. scinumtools3-0.4.1/src/snt/dip/nodes/node_import.cpp +51 -0
  300. scinumtools3-0.4.1/src/snt/dip/nodes/node_import.h +17 -0
  301. scinumtools3-0.4.1/src/snt/dip/nodes/node_integer.cpp +179 -0
  302. scinumtools3-0.4.1/src/snt/dip/nodes/node_modification.cpp +15 -0
  303. scinumtools3-0.4.1/src/snt/dip/nodes/node_modification.h +16 -0
  304. scinumtools3-0.4.1/src/snt/dip/nodes/node_property.cpp +22 -0
  305. scinumtools3-0.4.1/src/snt/dip/nodes/node_property.h +18 -0
  306. scinumtools3-0.4.1/src/snt/dip/nodes/node_source.cpp +32 -0
  307. scinumtools3-0.4.1/src/snt/dip/nodes/node_source.h +17 -0
  308. scinumtools3-0.4.1/src/snt/dip/nodes/node_string.cpp +101 -0
  309. scinumtools3-0.4.1/src/snt/dip/nodes/node_table.cpp +76 -0
  310. scinumtools3-0.4.1/src/snt/dip/nodes/node_table.h +19 -0
  311. scinumtools3-0.4.1/src/snt/dip/nodes/node_unit.cpp +33 -0
  312. scinumtools3-0.4.1/src/snt/dip/nodes/node_unit.h +17 -0
  313. scinumtools3-0.4.1/src/snt/dip/nodes/node_value.cpp +234 -0
  314. scinumtools3-0.4.1/src/snt/dip/nodes/parser.cpp +626 -0
  315. scinumtools3-0.4.1/src/snt/dip/parsers.cpp +386 -0
  316. scinumtools3-0.4.1/src/snt/dip/parsers.h +23 -0
  317. scinumtools3-0.4.1/src/snt/dip/solvers/logical_atom.cpp +214 -0
  318. scinumtools3-0.4.1/src/snt/dip/solvers/logical_operators.cpp +29 -0
  319. scinumtools3-0.4.1/src/snt/dip/solvers/logical_solver.cpp +54 -0
  320. scinumtools3-0.4.1/src/snt/dip/solvers/numerical_atom.cpp +196 -0
  321. scinumtools3-0.4.1/src/snt/dip/solvers/numerical_solver.cpp +104 -0
  322. scinumtools3-0.4.1/src/snt/dip/solvers/template_solver.cpp +77 -0
  323. scinumtools3-0.4.1/src/snt/exs/CMakeLists.txt +22 -0
  324. scinumtools3-0.4.1/src/snt/exs/atom.cpp +128 -0
  325. scinumtools3-0.4.1/src/snt/exs/atom_grand.cpp +10 -0
  326. scinumtools3-0.4.1/src/snt/exs/atom_list.cpp +10 -0
  327. scinumtools3-0.4.1/src/snt/exs/expression.cpp +37 -0
  328. scinumtools3-0.4.1/src/snt/exs/operator_base.cpp +47 -0
  329. scinumtools3-0.4.1/src/snt/exs/operator_list.cpp +19 -0
  330. scinumtools3-0.4.1/src/snt/exs/operator_ternary.cpp +24 -0
  331. scinumtools3-0.4.1/src/snt/exs/operators/arithmetic.cpp +111 -0
  332. scinumtools3-0.4.1/src/snt/exs/operators/comparison.cpp +72 -0
  333. scinumtools3-0.4.1/src/snt/exs/operators/control.cpp +22 -0
  334. scinumtools3-0.4.1/src/snt/exs/operators/exponential.cpp +94 -0
  335. scinumtools3-0.4.1/src/snt/exs/operators/logical.cpp +37 -0
  336. scinumtools3-0.4.1/src/snt/exs/operators/trigonometry.cpp +35 -0
  337. scinumtools3-0.4.1/src/snt/exs/step_list.cpp +9 -0
  338. scinumtools3-0.4.1/src/snt/exs/token.cpp +19 -0
  339. scinumtools3-0.4.1/src/snt/mat/CMakeLists.txt +15 -0
  340. scinumtools3-0.4.1/src/snt/mat/element.cpp +152 -0
  341. scinumtools3-0.4.1/src/snt/mat/material.cpp +3 -0
  342. scinumtools3-0.4.1/src/snt/mat/matter.cpp +3 -0
  343. scinumtools3-0.4.1/src/snt/mat/set.cpp +3 -0
  344. scinumtools3-0.4.1/src/snt/mat/solvers/material_solver.cpp +20 -0
  345. scinumtools3-0.4.1/src/snt/mat/solvers/substance_atom.cpp +57 -0
  346. scinumtools3-0.4.1/src/snt/mat/solvers/substance_solver.cpp +140 -0
  347. scinumtools3-0.4.1/src/snt/mat/substance.cpp +24 -0
  348. scinumtools3-0.4.1/src/snt/puq/CMakeLists.txt +22 -0
  349. scinumtools3-0.4.1/src/snt/puq/base_units.cpp +227 -0
  350. scinumtools3-0.4.1/src/snt/puq/calc/calculator.cpp +41 -0
  351. scinumtools3-0.4.1/src/snt/puq/calc/calculator_atom.cpp +76 -0
  352. scinumtools3-0.4.1/src/snt/puq/converter.cpp +232 -0
  353. scinumtools3-0.4.1/src/snt/puq/dimensions.cpp +117 -0
  354. scinumtools3-0.4.1/src/snt/puq/exponent.cpp +128 -0
  355. scinumtools3-0.4.1/src/snt/puq/lists.cpp +159 -0
  356. scinumtools3-0.4.1/src/snt/puq/math/abs.cpp +25 -0
  357. scinumtools3-0.4.1/src/snt/puq/math/cbrt.cpp +35 -0
  358. scinumtools3-0.4.1/src/snt/puq/math/ceil.cpp +40 -0
  359. scinumtools3-0.4.1/src/snt/puq/math/cos.cpp +30 -0
  360. scinumtools3-0.4.1/src/snt/puq/math/exp.cpp +27 -0
  361. scinumtools3-0.4.1/src/snt/puq/math/floor.cpp +40 -0
  362. scinumtools3-0.4.1/src/snt/puq/math/log.cpp +28 -0
  363. scinumtools3-0.4.1/src/snt/puq/math/log10.cpp +31 -0
  364. scinumtools3-0.4.1/src/snt/puq/math/max.cpp +49 -0
  365. scinumtools3-0.4.1/src/snt/puq/math/min.cpp +49 -0
  366. scinumtools3-0.4.1/src/snt/puq/math/pow.cpp +91 -0
  367. scinumtools3-0.4.1/src/snt/puq/math/round.cpp +43 -0
  368. scinumtools3-0.4.1/src/snt/puq/math/sin.cpp +30 -0
  369. scinumtools3-0.4.1/src/snt/puq/math/sqrt.cpp +33 -0
  370. scinumtools3-0.4.1/src/snt/puq/math/tan.cpp +37 -0
  371. scinumtools3-0.4.1/src/snt/puq/measurement.cpp +376 -0
  372. scinumtools3-0.4.1/src/snt/puq/quantity.cpp +486 -0
  373. scinumtools3-0.4.1/src/snt/puq/result.cpp +283 -0
  374. scinumtools3-0.4.1/src/snt/puq/solver/operator_array.cpp +38 -0
  375. scinumtools3-0.4.1/src/snt/puq/solver/operator_array.h +25 -0
  376. scinumtools3-0.4.1/src/snt/puq/solver/operator_parentheses.cpp +50 -0
  377. scinumtools3-0.4.1/src/snt/puq/solver/operator_parentheses.h +20 -0
  378. scinumtools3-0.4.1/src/snt/puq/solver/unit_atom.cpp +182 -0
  379. scinumtools3-0.4.1/src/snt/puq/solver/unit_solver.cpp +38 -0
  380. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_AU.h +86 -0
  381. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_EMU.h +107 -0
  382. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_ESU.h +105 -0
  383. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_GEO.h +71 -0
  384. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_GRU.h +78 -0
  385. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_GU.h +107 -0
  386. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_IU.h +87 -0
  387. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_PU.h +65 -0
  388. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_SI.h +269 -0
  389. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_SRU.h +69 -0
  390. scinumtools3-0.4.1/src/snt/puq/systems/dmaps/dmap_US.h +107 -0
  391. scinumtools3-0.4.1/src/snt/puq/systems/prefixes.cpp +18 -0
  392. scinumtools3-0.4.1/src/snt/puq/systems/system_cgs.cpp +155 -0
  393. scinumtools3-0.4.1/src/snt/puq/systems/system_eus.cpp +177 -0
  394. scinumtools3-0.4.1/src/snt/puq/systems/system_nus.cpp +160 -0
  395. scinumtools3-0.4.1/src/snt/puq/systems/system_si.cpp +298 -0
  396. scinumtools3-0.4.1/src/snt/puq/systems/unit_system.cpp +132 -0
  397. scinumtools3-0.4.1/src/snt/puq/to_string.cpp +43 -0
  398. scinumtools3-0.4.1/src/snt/puq/unit_format.cpp +130 -0
  399. scinumtools3-0.4.1/src/snt/val/CMakeLists.txt +22 -0
  400. scinumtools3-0.4.1/src/snt/val/math/abs.cpp +9 -0
  401. scinumtools3-0.4.1/src/snt/val/math/cbrt.cpp +9 -0
  402. scinumtools3-0.4.1/src/snt/val/math/exp.cpp +9 -0
  403. scinumtools3-0.4.1/src/snt/val/math/floor.cpp +9 -0
  404. scinumtools3-0.4.1/src/snt/val/math/floor.h +12 -0
  405. scinumtools3-0.4.1/src/snt/val/math/log.cpp +9 -0
  406. scinumtools3-0.4.1/src/snt/val/math/log10.cpp +9 -0
  407. scinumtools3-0.4.1/src/snt/val/math/max.cpp +9 -0
  408. scinumtools3-0.4.1/src/snt/val/math/pow.cpp +9 -0
  409. scinumtools3-0.4.1/src/snt/val/math/sqrt.cpp +9 -0
  410. scinumtools3-0.4.1/src/snt/val/to_string.cpp +24 -0
  411. scinumtools3-0.4.1/src/snt/val/values_string.cpp +127 -0
  412. scinumtools3-0.4.1/tests/CMakeLists.txt +24 -0
  413. scinumtools3-0.4.1/tests/api/CMakeLists.txt +22 -0
  414. scinumtools3-0.4.1/tests/api/dip_commands.cpp +20 -0
  415. scinumtools3-0.4.1/tests/api/puq_commands.cpp +130 -0
  416. scinumtools3-0.4.1/tests/dip/CMakeLists.txt +25 -0
  417. scinumtools3-0.4.1/tests/dip/fixtures.h +83 -0
  418. scinumtools3-0.4.1/tests/dip/pch_tests.h +6 -0
  419. scinumtools3-0.4.1/tests/dip/test_branching.cpp +194 -0
  420. scinumtools3-0.4.1/tests/dip/test_environment.cpp +73 -0
  421. scinumtools3-0.4.1/tests/dip/test_expressions.cpp +51 -0
  422. scinumtools3-0.4.1/tests/dip/test_expressions_logical.cpp +108 -0
  423. scinumtools3-0.4.1/tests/dip/test_expressions_numerical.cpp +77 -0
  424. scinumtools3-0.4.1/tests/dip/test_expressions_template.cpp +34 -0
  425. scinumtools3-0.4.1/tests/dip/test_functions.cpp +230 -0
  426. scinumtools3-0.4.1/tests/dip/test_hierarchy.cpp +63 -0
  427. scinumtools3-0.4.1/tests/dip/test_modifications.cpp +80 -0
  428. scinumtools3-0.4.1/tests/dip/test_parse_arrays.cpp +125 -0
  429. scinumtools3-0.4.1/tests/dip/test_parse_dimensions.cpp +91 -0
  430. scinumtools3-0.4.1/tests/dip/test_parse_dip.cpp +32 -0
  431. scinumtools3-0.4.1/tests/dip/test_parse_scalars.cpp +141 -0
  432. scinumtools3-0.4.1/tests/dip/test_parse_strings.cpp +58 -0
  433. scinumtools3-0.4.1/tests/dip/test_parse_tables.cpp +114 -0
  434. scinumtools3-0.4.1/tests/dip/test_properties.cpp +348 -0
  435. scinumtools3-0.4.1/tests/dip/test_references.cpp +265 -0
  436. scinumtools3-0.4.1/tests/dip/test_references_raw.cpp +162 -0
  437. scinumtools3-0.4.1/tests/dip/test_slicing.cpp +97 -0
  438. scinumtools3-0.4.1/tests/dip/test_solver_logical.cpp +117 -0
  439. scinumtools3-0.4.1/tests/dip/test_solver_numerical.cpp +94 -0
  440. scinumtools3-0.4.1/tests/dip/test_solver_template.cpp +90 -0
  441. scinumtools3-0.4.1/tests/dip/test_source_list.cpp +117 -0
  442. scinumtools3-0.4.1/tests/dip/test_unit_list.cpp +62 -0
  443. scinumtools3-0.4.1/tests/dip/test_units.cpp +225 -0
  444. scinumtools3-0.4.1/tests/exs/CMakeLists.txt +25 -0
  445. scinumtools3-0.4.1/tests/exs/examples_test.cpp +45 -0
  446. scinumtools3-0.4.1/tests/exs/expression_test.cpp +41 -0
  447. scinumtools3-0.4.1/tests/exs/operators_test.cpp +76 -0
  448. scinumtools3-0.4.1/tests/exs/pch_tests.h +6 -0
  449. scinumtools3-0.4.1/tests/exs/solver_test.cpp +203 -0
  450. scinumtools3-0.4.1/tests/exs/tokens_test.cpp +63 -0
  451. scinumtools3-0.4.1/tests/mat/CMakeLists.txt +25 -0
  452. scinumtools3-0.4.1/tests/mat/pch_tests.h +6 -0
  453. scinumtools3-0.4.1/tests/mat/test_element.cpp +100 -0
  454. scinumtools3-0.4.1/tests/mat/test_substance.cpp +10 -0
  455. scinumtools3-0.4.1/tests/mat/test_substance_solver.cpp +44 -0
  456. scinumtools3-0.4.1/tests/puq/CMakeLists.txt +25 -0
  457. scinumtools3-0.4.1/tests/puq/base_units_test.cpp +125 -0
  458. scinumtools3-0.4.1/tests/puq/calculator_test.cpp +50 -0
  459. scinumtools3-0.4.1/tests/puq/converter_test.cpp +161 -0
  460. scinumtools3-0.4.1/tests/puq/data_table_test.cpp +33 -0
  461. scinumtools3-0.4.1/tests/puq/dimensions_test.cpp +64 -0
  462. scinumtools3-0.4.1/tests/puq/exponent_test.cpp +100 -0
  463. scinumtools3-0.4.1/tests/puq/lists_test.cpp +202 -0
  464. scinumtools3-0.4.1/tests/puq/math_test.cpp +488 -0
  465. scinumtools3-0.4.1/tests/puq/measurement_test.cpp +293 -0
  466. scinumtools3-0.4.1/tests/puq/pch_tests.h +6 -0
  467. scinumtools3-0.4.1/tests/puq/quantity_test.cpp +247 -0
  468. scinumtools3-0.4.1/tests/puq/uncertainty_test.cpp +198 -0
  469. scinumtools3-0.4.1/tests/puq/unit_atom_test.cpp +95 -0
  470. scinumtools3-0.4.1/tests/puq/unit_format_test.cpp +170 -0
  471. scinumtools3-0.4.1/tests/puq/unit_solver_test.cpp +84 -0
  472. scinumtools3-0.4.1/tests/puq/unit_system_test.cpp +209 -0
  473. scinumtools3-0.4.1/tests/snt/CMakeLists.txt +22 -0
  474. scinumtools3-0.4.1/tests/snt/string_format_test.cpp +97 -0
  475. scinumtools3-0.4.1/tests/val/CMakeLists.txt +25 -0
  476. scinumtools3-0.4.1/tests/val/pch_tests.h +6 -0
  477. scinumtools3-0.4.1/tests/val/test_casting.cpp +127 -0
  478. scinumtools3-0.4.1/tests/val/test_comparison.cpp +95 -0
  479. scinumtools3-0.4.1/tests/val/test_definition.cpp +126 -0
  480. scinumtools3-0.4.1/tests/val/test_math.cpp +202 -0
  481. scinumtools3-0.4.1/tests/val/test_quantifiers.cpp +50 -0
  482. scinumtools3-0.4.1/tests/val/test_slicing.cpp +21 -0
@@ -0,0 +1,44 @@
1
+ BasedOnStyle: LLVM
2
+
3
+ IndentWidth: 4
4
+ TabWidth: 4
5
+ UseTab: Never
6
+
7
+ NamespaceIndentation: All
8
+
9
+ BreakBeforeBraces: Attach
10
+
11
+ # Important for preventing giant one-line pybind11 calls
12
+ ColumnLimit: 120
13
+
14
+ AllowShortFunctionsOnASingleLine: Inline
15
+ AllowShortLambdasOnASingleLine: Inline
16
+
17
+ # Better formatting for env.def(...) style calls
18
+ BinPackArguments: false
19
+ BinPackParameters: false
20
+ AlignAfterOpenBracket: BlockIndent
21
+ PenaltyBreakBeforeFirstCallParameter: 1
22
+
23
+ # Prevent return type wrapping
24
+ PenaltyReturnTypeOnItsOwnLine: 1000
25
+ AlwaysBreakAfterReturnType: None
26
+
27
+ DerivePointerAlignment: false
28
+ PointerAlignment: Left
29
+
30
+ SortIncludes: true
31
+ IncludeBlocks: Regroup
32
+
33
+ IncludeCategories:
34
+ - Regex: '^<(exs|val|puq|dip|mat)/.*>$'
35
+ Priority: 1
36
+
37
+ - Regex: '^"(exs|val|puq|dip|mat)/.*"$'
38
+ Priority: 1
39
+
40
+ - Regex: '^".*"$'
41
+ Priority: 2
42
+
43
+ - Regex: '^<.*>$'
44
+ Priority: 3
@@ -0,0 +1,2 @@
1
+ src/snt/puq/systems/dmaps/**
2
+ apps/snt-server/external/**
@@ -0,0 +1,48 @@
1
+ Checks: >
2
+ clang-analyzer-*,
3
+ -clang-analyzer-cplusplus*,
4
+ performance-*,
5
+ llvm-include-cleaner,
6
+ modernize-use-nullptr,
7
+ modernize-use-override,
8
+ modernize-loop-convert,
9
+ modernize-use-equals-default,
10
+ modernize-use-equals-delete,
11
+ modernize-use-using,
12
+ cppcoreguidelines-pro-type-const-cast,
13
+ cppcoreguidelines-slicing,
14
+ cppcoreguidelines-pro-type-member-init,
15
+ cppcoreguidelines-narrowing-conversions,
16
+ cppcoreguidelines-virtual-class-destructor
17
+ modernize-use-forward-declaration
18
+ misc-forward-declarations
19
+ misc-include-cleaner
20
+ misc-unused-include
21
+ llvm-include-order
22
+ clang-analyzer-optin.cplusplus.IncludeWhatYouUse
23
+ readability-*
24
+ readability-identifier-naming
25
+
26
+ CheckOptions:
27
+ - key: readability-identifier-naming.ClassCase
28
+ value: CamelCase
29
+ - key: readability-identifier-naming.StructCase
30
+ value: CamelCase
31
+ - key: readability-identifier-naming.FunctionCase
32
+ value: camelBack # e.g., `computeResult`
33
+ - key: readability-identifier-naming.VariableCase
34
+ value: lower_case # e.g., `time_step`
35
+ - key: readability-identifier-naming.ParameterCase
36
+ value: lower_case
37
+ - key: readability-identifier-naming.PrivateMemberCase
38
+ value: m_lower_case # if members are prefixed by `m_`
39
+ - key: readability-identifier-naming.ConstantCase
40
+ value: UPPER_CASE # e.g., `MAX_ITER`
41
+ - key: readability-identifier-naming.GlobalConstantPrefix
42
+ value: k # if global constants are like `kMaxValue`
43
+ - key: readability-identifier-naming.EnumCase
44
+ value: CamelCase
45
+ - key: readability-identifier-naming.EnumConstantCase
46
+ value: UPPER_CASE
47
+
48
+ WarningsAsErrors: '*'
@@ -0,0 +1,95 @@
1
+ name: Linux Build
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ paths:
7
+ - 'src/**'
8
+ - 'include/**'
9
+ - 'bindings/**'
10
+ - 'benchmarks/**'
11
+ - 'examples/**'
12
+ - 'apps/**'
13
+ - 'tests/**'
14
+ pull_request:
15
+ branches: [ "main" ]
16
+ paths:
17
+ - 'src/**'
18
+ - 'include/**'
19
+ - 'bindings/**'
20
+ - 'benchmarks/**'
21
+ - 'examples/**'
22
+ - 'apps/**'
23
+ - 'tests/**'
24
+
25
+ jobs:
26
+ build:
27
+ strategy:
28
+ matrix:
29
+ os: [ubuntu-latest]
30
+
31
+ runs-on: ${{ matrix.os }}
32
+
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ with:
36
+ submodules: recursive
37
+
38
+ - uses: actions/setup-python@v5
39
+ with:
40
+ python-version: '3.13'
41
+
42
+ - name: Install Python dependencies
43
+ run: |
44
+ python -m pip install --upgrade pip
45
+ pip install -r requirements.txt
46
+
47
+ - name: Linux dependencies
48
+ if: runner.os == 'Linux'
49
+ run: |
50
+ sudo apt-get update
51
+ sudo apt-get install -y libgtest-dev pybind11-dev
52
+
53
+ - name: Build
54
+ run: ./setup.sh --github-workflows -b
55
+
56
+ - name: Test
57
+ run: ./setup.sh -t
58
+
59
+ #jobs:
60
+ # build:
61
+ #
62
+ # runs-on: ubuntu-latest
63
+ #
64
+ # steps:
65
+ # - uses: actions/checkout@v4
66
+ # with:
67
+ # submodules: recursive
68
+ #
69
+ # - name: Set up Python
70
+ #
71
+ # uses: actions/setup-python@v5
72
+ # with:
73
+ # python-version: '3.13'
74
+ #
75
+ # - name: Install dependencies
76
+ # run: |
77
+ # python -m pip install --upgrade pip
78
+ # pip install -r requirements.txt
79
+ #
80
+ # - name: Install and build GTest
81
+ # run: |
82
+ # sudo apt-get update
83
+ # sudo apt-get install -y cmake
84
+ # sudo apt-get install -y libgtest-dev
85
+ # sudo apt-get install -y pybind11-dev
86
+ # cd /usr/src/gtest
87
+ # sudo cmake .
88
+ # sudo make
89
+ # sudo cp lib/*.a /usr/lib
90
+ #
91
+ # - name: build
92
+ # run: ./setup.sh --github-workflows -b
93
+ #
94
+ # - name: test
95
+ # run: ./setup.sh -t
@@ -0,0 +1,56 @@
1
+ name: macOS Build
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ paths:
7
+ - 'src/**'
8
+ - 'include/**'
9
+ - 'bindings/**'
10
+ - 'benchmarks/**'
11
+ - 'examples/**'
12
+ - 'apps/**'
13
+ - 'tests/**'
14
+ pull_request:
15
+ branches: [ "main" ]
16
+ paths:
17
+ - 'src/**'
18
+ - 'include/**'
19
+ - 'bindings/**'
20
+ - 'benchmarks/**'
21
+ - 'examples/**'
22
+ - 'apps/**'
23
+ - 'tests/**'
24
+
25
+ jobs:
26
+ build:
27
+ strategy:
28
+ matrix:
29
+ os: [macos-latest]
30
+
31
+ runs-on: ${{ matrix.os }}
32
+
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ with:
36
+ submodules: recursive
37
+
38
+ - uses: actions/setup-python@v5
39
+ with:
40
+ python-version: '3.13'
41
+
42
+ - name: Install Python dependencies
43
+ run: |
44
+ python -m pip install --upgrade pip
45
+ pip install -r requirements.txt
46
+
47
+ - name: macOS dependencies
48
+ if: runner.os == 'macOS'
49
+ run: |
50
+ brew install googletest pybind11
51
+
52
+ - name: Build
53
+ run: ./setup.sh --github-workflows -b
54
+
55
+ - name: Test
56
+ run: ./setup.sh -t
@@ -0,0 +1,77 @@
1
+ name: Build and Publish on PyPi
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build_wheels:
9
+ name: Build wheels (${{ matrix.os }})
10
+ runs-on: ${{ matrix.os }}
11
+
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os:
16
+ - ubuntu-latest
17
+ #- windows-latest
18
+ - macos-latest
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Build wheels
24
+ uses: pypa/cibuildwheel@v2.23
25
+
26
+ - name: Upload wheels
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: wheels-${{ matrix.os }}
30
+ path: ./wheelhouse/*.whl
31
+
32
+ build_sdist:
33
+ runs-on: ubuntu-latest
34
+
35
+
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+
39
+ - name: Build source distribution
40
+ run: |
41
+ python -m pip install build
42
+ python -m build --sdist
43
+
44
+ - uses: actions/upload-artifact@v4
45
+ with:
46
+ name: sdist
47
+ path: dist/*.tar.gz
48
+
49
+ publish:
50
+ needs:
51
+ - build_wheels
52
+ - build_sdist
53
+
54
+ runs-on: ubuntu-latest
55
+
56
+ permissions:
57
+ id-token: write
58
+
59
+ environment:
60
+ name: pypi
61
+
62
+ steps:
63
+ - name: Download all artifacts
64
+ uses: actions/download-artifact@v4
65
+ with:
66
+ path: dist
67
+
68
+ - name: Flatten artifact directories
69
+ run: |
70
+ mkdir upload
71
+ find dist -type f \( -name "*.whl" -o -name "*.tar.gz" \) -exec cp {} upload/ \;
72
+
73
+ - name: Publish to PyPI
74
+ uses: pypa/gh-action-pypi-publish@release/v1
75
+ with:
76
+ packages-dir: upload
77
+
@@ -0,0 +1,49 @@
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name: Deploy static content to Pages
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches: ["main"]
8
+ paths:
9
+ - 'docs/**'
10
+
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch:
13
+
14
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15
+ permissions:
16
+ contents: read
17
+ pages: write
18
+ id-token: write
19
+
20
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22
+ concurrency:
23
+ group: "pages"
24
+ cancel-in-progress: false
25
+
26
+ jobs:
27
+ # Single deploy job since we're just deploying
28
+ deploy:
29
+ environment:
30
+ name: github-pages
31
+ url: ${{ steps.deployment.outputs.page_url }}
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - name: Checkout
35
+ uses: actions/checkout@v4
36
+ - name: Setup Pages
37
+ uses: actions/configure-pages@v5
38
+ - name: Build documentation
39
+ run:
40
+ sudo apt install -y doxygen graphviz;
41
+ pip3 install -r requirements.txt;
42
+ ./setup.sh -d
43
+ - name: Upload artifact
44
+ uses: actions/upload-pages-artifact@v3
45
+ with:
46
+ path: './docs/build/html/'
47
+ - name: Deploy to GitHub Pages
48
+ id: deployment
49
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,44 @@
1
+ # Custom
2
+ build/*
3
+ CMakeFiles/*
4
+ CMakeCache.txt
5
+ helpers/*
6
+ docs/build/*
7
+ docs/doxy/*
8
+ dist/*
9
+ **/__pycache__/*
10
+ .venv
11
+ **/.DS_STORE
12
+
13
+ # Prerequisites
14
+ *.d
15
+
16
+ # Compiled Object files
17
+ *.slo
18
+ *.lo
19
+ *.o
20
+ *.obj
21
+
22
+ # Precompiled Headers
23
+ *.gch
24
+ *.pch
25
+
26
+ # Compiled Dynamic libraries
27
+ *.so
28
+ *.dylib
29
+ *.dll
30
+
31
+ # Fortran module files
32
+ *.mod
33
+ *.smod
34
+
35
+ # Compiled Static libraries
36
+ *.lai
37
+ *.la
38
+ *.a
39
+ *.lib
40
+
41
+ # Executables
42
+ *.exe
43
+ *.out
44
+ *.app
@@ -0,0 +1,3 @@
1
+ [submodule "apps/snt-server/external/cpp-httplib"]
2
+ path = apps/snt-server/external/cpp-httplib
3
+ url = git@github.com:yhirose/cpp-httplib.git
@@ -0,0 +1,193 @@
1
+ cmake_minimum_required(VERSION 3.22)
2
+ cmake_policy(SET CMP0074 NEW)
3
+ set(CMAKE_TRY_ENABLE_TARGET_TYPE STATIC_LIBRARY)
4
+
5
+ project(scinumtools VERSION 1.0 LANGUAGES CXX)
6
+
7
+ set(CMAKE_CXX_STANDARD 20)
8
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
9
+
10
+ if(NOT MSVC)
11
+ add_compile_options(-Wno-deprecated)
12
+ endif()
13
+
14
+ set(MODULE_NAME snt)
15
+ #set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install")
16
+ set(CMAKE_INSTALL_BINDIR bin)
17
+ set(CMAKE_INSTALL_LIBDIR lib)
18
+ set(CMAKE_INSTALL_INCLUDEDIR include)
19
+
20
+ # limit error number
21
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
22
+ add_compile_options(-ferror-limit=3)
23
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
24
+ add_compile_options(-fmax-errors=3)
25
+ endif()
26
+
27
+ # ensure all targets (executables, static libs, shared libs) are built with -fPIC if required
28
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
29
+
30
+ # set environmental variables
31
+ file(READ "settings.env" ENV_CONTENTS)
32
+ string(REGEX MATCH "CODE_VERSION=([^\n\r]*)" _ ${ENV_CONTENTS})
33
+ string(REGEX REPLACE ".*CODE_VERSION=([^\n\r]*).*" "\\1" CODE_VERSION "${_}")
34
+
35
+ # set preprocessor flags
36
+ add_compile_definitions(CODE_VERSION="${CODE_VERSION}")
37
+ configure_file(
38
+ ${CMAKE_SOURCE_DIR}/cmake/settings.h.in
39
+ ${CMAKE_BINARY_DIR}/settings.h
40
+ )
41
+
42
+ # analyze code compilation
43
+ option(ENABLE_TIME_TRACE "Enable Clang time tracing" OFF)
44
+ if(ENABLE_TIME_TRACE)
45
+ add_compile_options(-ftime-trace)
46
+ endif()
47
+
48
+ # enable apps
49
+ option(ENABLE_APP_SNT_SERVER "Enable SNT REST-API server app" OFF)
50
+ option(ENABLE_APP_SNT_GUI "Enable SNT graphical user interface" OFF)
51
+
52
+ # set generic options
53
+ function(set_module_options NAME DEFAULT)
54
+ # set default values
55
+ option(ENABLE_${NAME} "Enable ${NAME}" ${DEFAULT})
56
+ option(ENABLE_${NAME}_GTEST "Enable ${NAME} gtests" ${DEFAULT})
57
+ option(ENABLE_${NAME}_PYBIND "Enable ${NAME} pytests" ${DEFAULT})
58
+ option(ENABLE_${NAME}_PYTEST "Enable ${NAME} pytests" ${DEFAULT})
59
+ # set parts off if main switch is off
60
+ if(NOT ENABLE_${NAME})
61
+ set(ENABLE_${NAME}_GTEST OFF CACHE BOOL "" FORCE)
62
+ set(ENABLE_${NAME}_PYBIND OFF CACHE BOOL "" FORCE)
63
+ endif()
64
+ if(NOT ENABLE_${NAME}_PYBIND)
65
+ set(ENABLE_${NAME}_PYTEST OFF CACHE BOOL "" FORCE)
66
+ endif()
67
+ message(STATUS "ENABLE_${NAME}=${ENABLE_${NAME}}")
68
+ message(STATUS "ENABLE_${NAME}_GTEST=${ENABLE_${NAME}_GTEST}")
69
+ message(STATUS "ENABLE_${NAME}_PYBIND=${ENABLE_${NAME}_PYBIND}")
70
+ message(STATUS "ENABLE_${NAME}_PYTEST=${ENABLE_${NAME}_PYTEST}")
71
+ endfunction()
72
+ # set options for all modules
73
+ set_module_options(SNT ON)
74
+ set_module_options(EXS ON)
75
+ set_module_options(VAL ON)
76
+ set_module_options(PUQ ON)
77
+ set_module_options(DIP ON)
78
+ set_module_options(MAT ON)
79
+
80
+ # import GTest
81
+ ###############
82
+
83
+ # this needs to be here, so that ctest notice it!
84
+ if(
85
+ ENABLE_SNT_GTEST OR
86
+ ENABLE_EXS_GTEST OR
87
+ ENABLE_VAL_GTEST OR
88
+ ENABLE_PUQ_GTEST OR
89
+ ENABLE_DIP_GTEST OR
90
+ ENABLE_MAT_GTEST
91
+ )
92
+ find_package(GTest REQUIRED)
93
+ include_directories(${GTEST_INCLUDE_DIRS})
94
+ include(GoogleTest)
95
+ enable_testing()
96
+ endif()
97
+
98
+ message("Scientific Numerical Tools (SNT)")
99
+ message("Code version: ${CODE_VERSION}")
100
+
101
+ # enable clang-tidy during the compilation
102
+ ##########################################
103
+
104
+ option(ENABLE_CLANG_TIDY "Run clang-tidy during build" OFF)
105
+ if(ENABLE_CLANG_TIDY)
106
+ find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
107
+ if(NOT CLANG_TIDY_COMMAND)
108
+ message(FATAL_ERROR "clang-tidy not found!")
109
+ else()
110
+ message(STATUS "Running with clang-tidy ${ENABLE_CLANG_TIDY}")
111
+ endif()
112
+
113
+ # This makes all targets run clang-tidy automatically during compilation
114
+ set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_COMMAND}
115
+ -p=${CMAKE_BINARY_DIR})
116
+ endif()
117
+
118
+ # compile libraries and executables
119
+ ###################################
120
+
121
+ add_subdirectory(src) # build dip-cpp library
122
+ add_subdirectory(apps) # build executable applications
123
+ add_subdirectory(examples) # build example applications
124
+ add_subdirectory(tests) # build gtest executable
125
+ if (ENABLE_PUQ AND ENABLE_DIP)
126
+ add_subdirectory(bindings/python/cpp) # build Python bindings
127
+ endif()
128
+
129
+ # setup Google Benchmark
130
+ ########################
131
+
132
+ option(ENABLE_BENCHMARKS "Build benchmarks" OFF)
133
+
134
+ if(ENABLE_BENCHMARKS)
135
+
136
+ include(FetchContent)
137
+
138
+ FetchContent_Declare(
139
+ benchmark
140
+ GIT_REPOSITORY https://github.com/google/benchmark.git
141
+ GIT_TAG v1.8.3
142
+ )
143
+
144
+ set(BENCHMARK_ENABLE_TESTING OFF)
145
+
146
+ FetchContent_MakeAvailable(benchmark)
147
+
148
+ set_target_properties(
149
+ benchmark
150
+ benchmark_main
151
+ PROPERTIES
152
+ CXX_CLANG_TIDY ""
153
+ )
154
+
155
+ add_subdirectory(benchmarks)
156
+ endif()
157
+
158
+ # create cmake export files
159
+ ###########################
160
+
161
+ include(CMakePackageConfigHelpers)
162
+
163
+ configure_package_config_file(
164
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${MODULE_NAME}-config.cmake.in
165
+ "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}-config.cmake"
166
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${MODULE_NAME}
167
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR
168
+ )
169
+
170
+ write_basic_package_version_file(
171
+ "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}-config-version.cmake"
172
+ VERSION ${CODE_VERSION}
173
+ COMPATIBILITY AnyNewerVersion
174
+ )
175
+
176
+ # install files
177
+ ###############
178
+
179
+ install(DIRECTORY src/
180
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
181
+ FILES_MATCHING PATTERN "*.h")
182
+
183
+ install(FILES
184
+ "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}-config.cmake"
185
+ "${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}-config-version.cmake"
186
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${MODULE_NAME}
187
+ )
188
+
189
+ install(EXPORT TargetsSNT
190
+ FILE ${MODULE_NAME}-targets.cmake
191
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${MODULE_NAME}"
192
+ )
193
+
@@ -0,0 +1,95 @@
1
+ # Contributing to scinumtools3
2
+
3
+ Thank you for considering contributing to **scinumtools3**! We welcome all contributions, including bug reports, feature requests, documentation improvements, and code changes.
4
+
5
+ ---
6
+
7
+ ## How to Contribute
8
+
9
+ 1. **Fork the repository** from GitHub:
10
+ [https://github.com/vrtulka23/scinumtools3](https://github.com/vrtulka23/scinumtools3)
11
+
12
+ 2. **Clone your fork locally**:
13
+ ```bash
14
+ git clone https://github.com/vrtulka23/scinumtools3.git
15
+ cd scinumtools3
16
+ ```
17
+
18
+ 3. **Create a new branch** for your work:
19
+
20
+ ```bash
21
+ git checkout -b feature/my-new-feature
22
+ ```
23
+
24
+ 4. **Make your changes**:
25
+
26
+ * Follow the coding style defined in `.clang-format`.
27
+ * Use modern C++ (C++17 or newer).
28
+ * Write Doxygen-style comments for public APIs.
29
+ * Add unit tests for new features or bug fixes (see `gtest/`).
30
+
31
+ 5. **Build and run tests**:
32
+
33
+ ```bash
34
+ cmake -B build
35
+ cd build
36
+ make
37
+ ctest
38
+ ```
39
+
40
+ 6. **Commit and push your changes**:
41
+
42
+ ```bash
43
+ git add .
44
+ git commit -m "Describe your change"
45
+ git push origin feature/my-new-feature
46
+ ```
47
+
48
+ 7. **Open a Pull Request**:
49
+
50
+ * Go to the original repository on GitHub.
51
+ * Submit a PR with a clear description of your changes.
52
+ * Link related issues if any.
53
+
54
+ ---
55
+
56
+ ## Coding Guidelines
57
+
58
+ * Use descriptive variable and function names.
59
+ * Keep functions small and focused.
60
+ * Apply `.clang-format` for consistent style.
61
+ * Document all public interfaces with Doxygen comments, for example:
62
+
63
+ ```cpp
64
+ /// \brief Short description
65
+ /// \param name Description of the parameter
66
+ /// \return Description of the return value
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Reporting Issues
72
+
73
+ If you find a bug or have a feature request:
74
+
75
+ 1. Check the issue tracker to see if it is already reported:
76
+ [https://github.com/vrtulka23/scinumtools3/issues](https://github.com/vrtulka23/scinumtools3/issues)
77
+
78
+ 2. If not, open a new issue and include:
79
+
80
+ * Steps to reproduce the problem
81
+ * Expected behavior
82
+ * Actual behavior
83
+ * System details (OS, compiler, version)
84
+
85
+ ---
86
+
87
+ ## Communication
88
+
89
+ For questions or discussions:
90
+
91
+ * Use GitHub Discussions (if enabled) or open an Issue.
92
+
93
+ ---
94
+
95
+ Thank you for contributing to **scinumtools3**!