epanet-plus 0.0.1__cp313-cp313-macosx_10_13_x86_64.whl

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.

Potentially problematic release.


This version of epanet-plus might be problematic. Click here for more details.

Files changed (105) hide show
  1. docs/conf.py +67 -0
  2. epanet-msx-src/dispersion.h +27 -0
  3. epanet-msx-src/hash.c +107 -0
  4. epanet-msx-src/hash.h +28 -0
  5. epanet-msx-src/include/epanetmsx.h +104 -0
  6. epanet-msx-src/include/epanetmsx_export.h +42 -0
  7. epanet-msx-src/mathexpr.c +937 -0
  8. epanet-msx-src/mathexpr.h +39 -0
  9. epanet-msx-src/mempool.c +204 -0
  10. epanet-msx-src/mempool.h +24 -0
  11. epanet-msx-src/msxchem.c +1285 -0
  12. epanet-msx-src/msxcompiler.c +368 -0
  13. epanet-msx-src/msxdict.h +42 -0
  14. epanet-msx-src/msxdispersion.c +586 -0
  15. epanet-msx-src/msxerr.c +116 -0
  16. epanet-msx-src/msxfile.c +260 -0
  17. epanet-msx-src/msxfuncs.c +175 -0
  18. epanet-msx-src/msxfuncs.h +35 -0
  19. epanet-msx-src/msxinp.c +1504 -0
  20. epanet-msx-src/msxout.c +398 -0
  21. epanet-msx-src/msxproj.c +791 -0
  22. epanet-msx-src/msxqual.c +2011 -0
  23. epanet-msx-src/msxrpt.c +400 -0
  24. epanet-msx-src/msxtank.c +422 -0
  25. epanet-msx-src/msxtoolkit.c +1164 -0
  26. epanet-msx-src/msxtypes.h +551 -0
  27. epanet-msx-src/msxutils.c +524 -0
  28. epanet-msx-src/msxutils.h +56 -0
  29. epanet-msx-src/newton.c +158 -0
  30. epanet-msx-src/newton.h +34 -0
  31. epanet-msx-src/rk5.c +287 -0
  32. epanet-msx-src/rk5.h +39 -0
  33. epanet-msx-src/ros2.c +293 -0
  34. epanet-msx-src/ros2.h +35 -0
  35. epanet-msx-src/smatrix.c +816 -0
  36. epanet-msx-src/smatrix.h +29 -0
  37. epanet-src/AUTHORS +60 -0
  38. epanet-src/LICENSE +21 -0
  39. epanet-src/enumstxt.h +151 -0
  40. epanet-src/epanet.c +5937 -0
  41. epanet-src/epanet2.c +961 -0
  42. epanet-src/epanet2.def +131 -0
  43. epanet-src/errors.dat +79 -0
  44. epanet-src/flowbalance.c +186 -0
  45. epanet-src/funcs.h +219 -0
  46. epanet-src/genmmd.c +1000 -0
  47. epanet-src/hash.c +177 -0
  48. epanet-src/hash.h +28 -0
  49. epanet-src/hydcoeffs.c +1303 -0
  50. epanet-src/hydraul.c +1164 -0
  51. epanet-src/hydsolver.c +781 -0
  52. epanet-src/hydstatus.c +442 -0
  53. epanet-src/include/epanet2.h +466 -0
  54. epanet-src/include/epanet2_2.h +1962 -0
  55. epanet-src/include/epanet2_enums.h +518 -0
  56. epanet-src/inpfile.c +884 -0
  57. epanet-src/input1.c +672 -0
  58. epanet-src/input2.c +970 -0
  59. epanet-src/input3.c +2265 -0
  60. epanet-src/leakage.c +527 -0
  61. epanet-src/mempool.c +146 -0
  62. epanet-src/mempool.h +24 -0
  63. epanet-src/output.c +853 -0
  64. epanet-src/project.c +1691 -0
  65. epanet-src/quality.c +695 -0
  66. epanet-src/qualreact.c +800 -0
  67. epanet-src/qualroute.c +696 -0
  68. epanet-src/report.c +1559 -0
  69. epanet-src/rules.c +1500 -0
  70. epanet-src/smatrix.c +871 -0
  71. epanet-src/text.h +508 -0
  72. epanet-src/types.h +928 -0
  73. epanet-src/util/cstr_helper.c +59 -0
  74. epanet-src/util/cstr_helper.h +38 -0
  75. epanet-src/util/errormanager.c +92 -0
  76. epanet-src/util/errormanager.h +39 -0
  77. epanet-src/util/filemanager.c +212 -0
  78. epanet-src/util/filemanager.h +81 -0
  79. epanet-src/validate.c +408 -0
  80. epanet.cpython-313-darwin.so +0 -0
  81. epanet_plus/VERSION +1 -0
  82. epanet_plus/__init__.py +8 -0
  83. epanet_plus/epanet_plus.c +118 -0
  84. epanet_plus/epanet_toolkit.py +2730 -0
  85. epanet_plus/epanet_wrapper.py +2414 -0
  86. epanet_plus/include/epanet_plus.h +9 -0
  87. epanet_plus-0.0.1.dist-info/METADATA +152 -0
  88. epanet_plus-0.0.1.dist-info/RECORD +105 -0
  89. epanet_plus-0.0.1.dist-info/WHEEL +6 -0
  90. epanet_plus-0.0.1.dist-info/licenses/LICENSE +21 -0
  91. epanet_plus-0.0.1.dist-info/top_level.txt +11 -0
  92. examples/basic_usage.py +35 -0
  93. python-extension/ext.c +344 -0
  94. python-extension/pyepanet.c +2133 -0
  95. python-extension/pyepanet.h +143 -0
  96. python-extension/pyepanet2.c +1823 -0
  97. python-extension/pyepanet2.h +141 -0
  98. python-extension/pyepanet_plus.c +37 -0
  99. python-extension/pyepanet_plus.h +4 -0
  100. python-extension/pyepanetmsx.c +388 -0
  101. python-extension/pyepanetmsx.h +35 -0
  102. tests/test_epanet.py +16 -0
  103. tests/test_epanetmsx.py +36 -0
  104. tests/test_epyt.py +114 -0
  105. tests/test_load_inp_from_buffer.py +18 -0
@@ -0,0 +1,29 @@
1
+
2
+ #ifndef SMATRIX_H
3
+ #define SMATRIX_H
4
+
5
+ #include "msxtypes.h"
6
+
7
+ /* ----------- SMATRIX.C ---------------*/
8
+ int msx_createsparse(void); /* Creates sparse matrix */
9
+ int allocsparse(void); /* Allocates matrix memory */
10
+ void msx_freesparse(void); /* Frees matrix memory */
11
+ int buildlists(int); /* Builds adjacency lists */
12
+ int paralink(int, int, int); /* Checks for parallel links */
13
+ void xparalinks(void); /* Removes parallel links */
14
+ void freelists(void); /* Frees adjacency lists */
15
+ void countdegree(void); /* Counts links at each node */
16
+ int reordernodes(void); /* Finds a node re-ordering */
17
+ int mindegree(int, int); /* Finds min. degree node */
18
+ int growlist(int); /* Augments adjacency list */
19
+ int newlink(Padjlist); /* Adds fill-ins for a node */
20
+ int linked(int, int); /* Checks if 2 nodes linked */
21
+ int addlink(int, int, int); /* Creates new fill-in */
22
+ int storesparse(int); /* Stores sparse matrix */
23
+ int ordersparse(int); /* Orders matrix storage */
24
+ void transpose(int, int*, int*, /* Transposes sparse matrix */
25
+ int*, int*, int*, int*, int*);
26
+ int msx_linsolve(int, double*, double*, /* Solution of linear eqns. */
27
+ double*); /* via Cholesky factorization */
28
+
29
+ #endif
epanet-src/AUTHORS ADDED
@@ -0,0 +1,60 @@
1
+ # Authors ordered alphabetically.
2
+
3
+ Authors with Contributions in the Public Domain:
4
+ Lewis Rossman <LRossman@cinci.rr.com>
5
+ Michael Tryby <tryby.michael@epa.gov>
6
+
7
+ Version 2.0
8
+ Lewis Rossman <LRossman@cinci.rr.com>
9
+
10
+ Authors with Contributions Subject to Copyright (see LICENSE):
11
+ Except where noted.
12
+
13
+ Version 2.1
14
+ Jinduan Chen <jinduan.uc@gmail.com>
15
+ Maurizio Cingi <mrzcng2@gmail.com>
16
+ Demetrios Eliades <eldemet@gmail.com>
17
+ Will Furnass <will@thearete.co.uk>
18
+ Milad Ghiami <milad.ghiami67@gmail.com>
19
+ Sam Hatchett <samhatchett@gmail.com>
20
+ Mike Kane <muke195@gmail.com>
21
+ Marios Kyriakou <mariosmsk@gmail.com>
22
+ Steffen Macke <sdteffen@sdteffen.de>
23
+ Angela Marchi <angela.marchi@adelaide.edu.au>
24
+ Bryant McDonnell <bemcdonnell@gmail.com>
25
+ Lew Rossman <LRossman@cinci.rr.com>
26
+ Elad Salomons <selad@optiwater.com>
27
+ Feng Shang <fengshang72@gmail.com>
28
+ Yunier Soad <yunier.soad@gmail.com>
29
+ Tom Taxon <tntaxon@anl.gov>
30
+ Michael Tryby <tryby.michael@epa.gov> (Contributions in the Public Domain)
31
+ James Uber <jim@citilogics.com>
32
+ Hyoungmin Woo <hyoungmin.woo@gmail.com>
33
+
34
+ Version 2.2
35
+ Demetrios Eliades <eldemet@gmail.com>
36
+ Sam Hatchett <samhatchett@gmail.com>
37
+ Abel Heinsbroek <mail@abelheinsbroek.nl>
38
+ Marios Kyriakou <mariosmsk@gmail.com>
39
+ Lewis Rossman <LRossman@cinci.rr.com>
40
+ Elad Salomons <selad@optiwater.com>
41
+ Markus Sunela <markus.sunela@fluidit.fi>
42
+ Michael Tryby <tryby.michael@epa.gov> (Contributions in the Public Domain)
43
+
44
+ Version 2.3
45
+ Luke Butler <lukepbutler@gmail.com>
46
+ Demetrios Eliades <eldemet@gmail.com>
47
+ Sam Hatchett <samhatchett@gmail.com>
48
+ Abel Heinsbroek <mail@abelheinsbroek.nl>
49
+ Robert Janke <janke.robert@epa.gov>
50
+ Marios Kyriakou <mariosmsk@gmail.com>
51
+ Corey McNeish
52
+ 0tkl <tkl.zhaoqing@gmail.com>
53
+ Lewis Rossman <LRossman@cinci.rr.com>
54
+ Elad Salomons <selad@optiwater.com>
55
+ Alex Sinske
56
+ Sahand Tashak
57
+ Yu Chun Tsao
58
+ James Uber <jim@citilogics.com>
59
+ Oscar Vegas Niño <ovegas141279@gmail.com>
60
+ Dennis Zanutto <dennis.zanutto@kwrwater.nl>
epanet-src/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 (See AUTHORS)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice, list of authors, and this permission notice shall
13
+ be included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
epanet-src/enumstxt.h ADDED
@@ -0,0 +1,151 @@
1
+ /*
2
+ *****************************************************************************
3
+ Project: OWA EPANET
4
+ Version: 2.3
5
+ Module: enumstxt.h
6
+ Description: text strings for enumerated data types
7
+ Authors: see AUTHORS
8
+ Copyright: see AUTHORS
9
+ License: see LICENSE
10
+ Last Updated: 03/10/2025
11
+ ******************************************************************************
12
+ */
13
+
14
+ #ifndef ENUMSTXT_H
15
+ #define ENUMSTXT_H
16
+ #include "text.h"
17
+
18
+ char *NodeTxt[] = {t_JUNCTION,
19
+ t_RESERVOIR,
20
+ t_TANK};
21
+
22
+ char *LinkTxt[] = {w_CV,
23
+ w_PIPE,
24
+ w_PUMP,
25
+ w_PRV,
26
+ w_PSV,
27
+ w_PBV,
28
+ w_FCV,
29
+ w_TCV,
30
+ w_GPV,
31
+ w_PCV};
32
+
33
+ char *StatTxt[] = {t_XHEAD,
34
+ t_TEMPCLOSED,
35
+ t_CLOSED,
36
+ t_OPEN,
37
+ t_ACTIVE,
38
+ t_XFLOW,
39
+ t_XFCV,
40
+ t_XPRESSURE,
41
+ t_FILLING,
42
+ t_EMPTYING,
43
+ t_OVERFLOWING};
44
+
45
+ char *FormTxt[] = {w_HW,
46
+ w_DW,
47
+ w_CM};
48
+
49
+ char *RptFormTxt[] = {t_HW,
50
+ t_DW,
51
+ t_CM};
52
+
53
+ char *RptFlowUnitsTxt[] = {u_CFS,
54
+ u_GPM,
55
+ u_MGD,
56
+ u_IMGD,
57
+ u_AFD,
58
+ u_LPS,
59
+ u_LPM,
60
+ u_MLD,
61
+ u_CMH,
62
+ u_CMD,
63
+ u_CMS};
64
+
65
+ char *FlowUnitsTxt[] = {w_CFS,
66
+ w_GPM,
67
+ w_MGD,
68
+ w_IMGD,
69
+ w_AFD,
70
+ w_LPS,
71
+ w_LPM,
72
+ w_MLD,
73
+ w_CMH,
74
+ w_CMD,
75
+ w_CMS};
76
+
77
+ char *PressUnitsTxt[] = {w_PSI,
78
+ w_KPA,
79
+ w_METERS,
80
+ w_BAR,
81
+ w_FEET};
82
+
83
+ char *DemandModelTxt[] = { w_DDA,
84
+ w_PDA,
85
+ NULL };
86
+
87
+ char *QualTxt[] = {w_NONE,
88
+ w_CHEM,
89
+ w_AGE,
90
+ w_TRACE};
91
+
92
+
93
+ char *SourceTxt[] = {w_CONCEN,
94
+ w_MASS,
95
+ w_SETPOINT,
96
+ w_FLOWPACED};
97
+
98
+ char *ControlTxt[] = {w_BELOW,
99
+ w_ABOVE,
100
+ w_TIME,
101
+ w_CLOCKTIME};
102
+
103
+ char *TstatTxt[] = {w_NONE,
104
+ w_AVG,
105
+ w_MIN,
106
+ w_MAX,
107
+ w_RANGE};
108
+
109
+ char *MixTxt[] = {w_MIXED,
110
+ w_2COMP,
111
+ w_FIFO,
112
+ w_LIFO,
113
+ NULL};
114
+
115
+ char *RptFlagTxt[] = {w_NO,
116
+ w_YES,
117
+ w_FULL};
118
+
119
+ char *BackflowTxt[] = {w_NO,
120
+ w_YES,
121
+ NULL};
122
+
123
+ char *CurveTypeTxt[] = {c_VOLUME,
124
+ c_PUMP,
125
+ c_EFFIC,
126
+ c_HEADLOSS,
127
+ c_GENERIC,
128
+ c_VALVE,
129
+ NULL};
130
+
131
+ char *SectTxt[] = {s_TITLE, s_JUNCTIONS, s_RESERVOIRS,
132
+ s_TANKS, s_PIPES, s_PUMPS,
133
+ s_VALVES, s_CONTROLS, s_RULES,
134
+ s_DEMANDS, s_SOURCES, s_EMITTERS,
135
+ s_PATTERNS, s_CURVES, s_QUALITY,
136
+ s_STATUS, s_ROUGHNESS, s_ENERGY,
137
+ s_REACTIONS, s_MIXING, s_REPORT,
138
+ s_TIMES, s_OPTIONS, s_COORDS,
139
+ s_VERTICES, s_LABELS, s_BACKDROP,
140
+ s_TAGS, s_LEAKAGE, s_END,
141
+ NULL};
142
+
143
+ char *Fldname[] = {t_ELEV, t_DEMAND, t_HEAD,
144
+ t_PRESSURE, t_QUALITY, t_LENGTH,
145
+ t_DIAM, t_FLOW, t_VELOCITY,
146
+ t_HEADLOSS, t_LINKQUAL, t_LINKSTATUS,
147
+ t_SETTING, t_REACTRATE, t_FRICTION,
148
+ "", "", "", "", "", "", NULL};
149
+
150
+
151
+ #endif