Compare commits

...
Author SHA1 Message Date
Pierre-Antoine Rouby 1d0aded01d HS: input_pk hot fix. 2024-01-30 10:32:50 +01:00
Pierre-Antoine Rouby 3322bafdca MainWindow: doc: Mage: Switch odt to pdf. 2024-01-29 17:23:45 +01:00
Pierre-Antoine Rouby 6a0f66c244 Geometry: Revert previous plot display fix. 2024-01-29 16:51:49 +01:00
Pierre-Antoine Rouby 40757b949d Results: Fix axes previous line. 2024-01-29 16:37:42 +01:00
Pierre-Antoine Rouby b6c91f63f7 doc: paper: 2023: Simhydro: Add the PDF version of paper preprint. 2024-01-29 16:14:16 +01:00
Pierre-Antoine Rouby e36206b436 ci: Add mage documentation. 2024-01-29 15:55:15 +01:00
Pierre-Antoine Rouby 797a853b36 Solver: Mage: Fix pep8. 2024-01-29 15:46:08 +01:00
Pierre-Antoine Rouby bdc5e35453 HS: Fix input_kp type for export. 2024-01-29 15:43:28 +01:00
Pierre-Antoine Rouby 1bd05ee1c2 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-26 17:02:09 +01:00
Pierre-Antoine Rouby dc406147df Doc: Tuto1: Fix HS images without description. 2024-01-26 17:02:00 +01:00
Theophile Terraz 87fa63d8f9 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-26 16:23:52 +01:00
Theophile Terraz 2355a14a0c debug TD 2024-01-26 16:23:44 +01:00
Pierre-Antoine Rouby 69e94e978c Geometry: Fix plot update at meshing. 2024-01-26 15:40:35 +01:00
Pierre-Antoine Rouby 97fafe9b9b Geometry: Reach: Fix pep8. 2024-01-26 14:35:04 +01:00
Pierre-Antoine Rouby 312abc9501 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-26 14:27:41 +01:00
Pierre-Antoine Rouby ca8c7a23fd MainWindow: Put results menu in model action list. 2024-01-26 14:27:08 +01:00
Pierre-Antoine Rouby 9d69d60ea8 Results: Catch some possible execption where results is empty. 2024-01-26 14:16:46 +01:00
Theophile Terraz 7ab6db184d update tuto 2024-01-26 12:09:56 +01:00
Pierre-Antoine Rouby e72d06bf6f Geometry: Fix some update error. 2024-01-26 11:53:51 +01:00
Pierre-Antoine Rouby fbf342f1ad MainWindow: Use 'default-mage' (if exists) in case of last solver is not found. 2024-01-26 10:03:04 +01:00
Pierre-Antoine Rouby 699e174b3d Merge branch 'master' with fix #32. 2024-01-26 09:34:59 +01:00
Pierre-Antoine Rouby 48f6c09436 Results: Fix profile list update at reach selection. 2024-01-26 09:32:05 +01:00
Lionel Penard bab2c33e38 Corrections to French translation 2024-01-25 08:51:35 +01:00
Pierre-Antoine Rouby c725e15015 Solver: Mage: Fix pep8. 2024-01-24 17:15:08 +01:00
Pierre-Antoine Rouby 3bad91ec37 doc: users: Tuto: Add context pdf and '.pamhyr' files. 2024-01-24 17:12:55 +01:00
Theophile Terraz ceaab3c2fc Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-24 17:06:11 +01:00
Theophile Terraz e183c5d1de mend
work on tuto1
2024-01-24 17:03:32 +01:00
Theophile Terraz dc73213bee work on tuto1 2024-01-24 16:58:54 +01:00
Theophile Terraz 2ed57fbbe0 work on tuto1 2024-01-24 16:58:30 +01:00
Pierre-Antoine Rouby 4de04d1af8 Solver: Mage: Fix comment for ST file header. 2024-01-24 16:46:03 +01:00
Pierre-Antoine Rouby 7ae64d390f Solver: Mage: Fix read bin. 2024-01-24 16:16:13 +01:00
Pierre-Antoine Rouby f56d87f648 Meshing: Mage: Fix profiles purge. 2024-01-24 15:58:05 +01:00
Pierre-Antoine Rouby 6c65d84d5e Checker: Geometry: Set minimal profiles number to 2. 2024-01-24 15:47:27 +01:00
Pierre-Antoine Rouby 490b5466da Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-24 15:27:02 +01:00
Theophile Terraz 3805cc9932 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-24 15:26:35 +01:00
Theophile Terraz b56172328e debug 2024-01-24 15:26:33 +01:00
Pierre-Antoine Rouby e4a012b5a3 Meshing: Mage: Fix mailleurTT. 2024-01-24 15:26:18 +01:00
Pierre-Antoine Rouby 3dfdc308e3 HS: Fix HS KP is missing at display update. 2024-01-24 15:12:39 +01:00
Pierre-Antoine Rouby 14a2abaebd Meshing: Mage: Fix pep8. 2024-01-24 15:05:28 +01:00
Pierre-Antoine Rouby d0afd0ed74 Geometry: Fix division by 0 for incline. 2024-01-24 15:00:31 +01:00
Pierre-Antoine Rouby 473aac4500 Meshing: Define meshing with MailleurTT. 2024-01-24 14:51:19 +01:00
Pierre-Antoine Rouby ad59afc4f5 MainWindow: Fix pep8. 2024-01-24 11:46:30 +01:00
Pierre-Antoine Rouby 3be2973032 ci: Update mage version. 2024-01-24 11:45:07 +01:00
Pierre-Antoine Rouby b5a3ee7568 doc: Delete user documentation and use gitlab wiki instead. 2024-01-24 11:41:30 +01:00
Pierre-Antoine Rouby aad7d75fa6 ci: Minor fix. 2024-01-24 11:22:37 +01:00
Pierre-Antoine Rouby 70f1581a3b Packages: Add TP charriage. 2024-01-24 11:12:31 +01:00
Pierre-Antoine Rouby 641003ded4 Doc: Users: TP: Add TP charriage. 2024-01-24 11:08:40 +01:00
Pierre-Antoine Rouby 28526d8f91 Solver: Mage: Fix pep8. 2024-01-24 10:46:07 +01:00
Pierre-Antoine Rouby 416a807e5d Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-24 10:44:58 +01:00
Lionel Penard e723b56e18 Typos tuto1 and French translation 2024-01-24 10:43:04 +01:00
Pierre-Antoine Rouby 67b76a3113 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-24 10:41:36 +01:00
Pierre-Antoine Rouby 1169f3cc94 Geometry: ui: Minor change. 2024-01-24 10:26:22 +01:00
Pierre-Antoine Rouby 82ab7b5429 HS: Basic: Display set type question only if previous type is not ND. 2024-01-24 10:22:58 +01:00
Lionel Penard 9b3a281e35 Typos tuto1 and French translation 2024-01-24 09:50:58 +01:00
Theophile Terraz 00f0e39eda Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-23 17:39:20 +01:00
Theophile Terraz 1e7e5b0328 debug mesh 2024-01-23 17:39:10 +01:00
Lionel Penard 8afd5023e9 merge french tuto1 2024-01-23 17:07:28 +01:00
Lionel Penard 100003ad90 Update english and create french version of tuto1 2024-01-23 16:57:26 +01:00
Pierre-Antoine Rouby 7fd6e4469b HS: Basic: Add CheckValve hydraulic structure and VAR export. 2024-01-23 16:56:24 +01:00
Pierre-Antoine Rouby 793289dd80 Tuto: Add ci tuto building. 2024-01-23 16:08:35 +01:00
Theophile Terraz ab10970025 add png to tuto1 2024-01-23 15:24:05 +01:00
Pierre-Antoine Rouby 3c9eccdfab Solver: Mage: Fix <list>.node error. 2024-01-23 11:30:34 +01:00
Pierre-Antoine Rouby 6c4636917a README: Update install from source. 2024-01-23 10:31:31 +01:00
Pierre-Antoine Rouby 56b170d767 README: Minor change. 2024-01-23 09:35:03 +01:00
Pierre-Antoine Rouby 318f6e9965 Geometry: Fix pep8. 2024-01-22 16:04:32 +01:00
Pierre-Antoine Rouby 63f7095508 Geometry: Activate export to file. 2024-01-22 15:28:42 +01:00
Pierre-Antoine Rouby 1965782348 Traduction: Update. 2024-01-22 14:44:56 +01:00
Pierre-Antoine Rouby a54bf30c3d Traduction: Update. 2024-01-22 11:58:33 +01:00
Pierre-Antoine Rouby 1e245004c9 Translation: Solver parameters: Add translate for mage solver parameters. 2024-01-22 11:03:49 +01:00
Pierre-Antoine Rouby 03c3c37435 Solver, Meshing: Mage: Add some exit condition. 2024-01-22 10:53:00 +01:00
Pierre-Antoine Rouby 19ad9c4d1a Config: Minor change. 2024-01-19 16:16:26 +01:00
Pierre-Antoine Rouby c183e5016c Pamhyr: Fix tests and pep8. 2024-01-19 15:54:28 +01:00
Pierre-Antoine Rouby 4790b9c071 River: Fix node and edges artefact deletions at data saves. 2024-01-19 15:49:54 +01:00
Pierre-Antoine Rouby 770bb5f96f Config: Fix version updater. 2024-01-19 14:22:38 +01:00
Pierre-Antoine Rouby 6319ac9310 Geometry: Handle exception for meshing tool. 2024-01-19 11:51:48 +01:00
Pierre-Antoine Rouby b6f0c6f49a tests: Add a mage meshingtool test. 2024-01-19 11:20:53 +01:00
Pierre-Antoine Rouby 486ff5c239 Mainwindow: Minor change. 2024-01-19 10:35:36 +01:00
Pierre-Antoine Rouby 73475220e9 Mainwindow: Add action to open results from a file. 2024-01-19 10:08:30 +01:00
Pierre-Antoine Rouby 852a3f58ff Checker: Mage: Add guidelines checker. 2024-01-17 15:26:21 +01:00
Pierre-Antoine Rouby 8b8aff7df1 Frictions: Fix none assiciated stricklers at save/load. 2024-01-17 14:42:20 +01:00
Pierre-Antoine Rouby e86111bd7a Solver: Mage: Fix empty HS error and space in input param. 2024-01-17 11:23:49 +01:00
Pierre-Antoine Rouby 870cba5005 Geometry: Fix width_approximation when rg and rd is missing. 2024-01-17 11:02:44 +01:00
Pierre-Antoine Rouby c5df959210 doc: wiki: Add annotation. 2024-01-16 15:43:15 +01:00
Pierre-Antoine Rouby 631e52b486 doc: wiki: Results add image. 2024-01-16 15:33:52 +01:00
Pierre-Antoine Rouby 5e32082fcf doc: wiki: Running solver images. 2024-01-16 14:57:17 +01:00
Pierre-Antoine Rouby 8834afa4f3 Geometry: Allow to copy point with floating point string format '*,*'. 2024-01-16 14:20:48 +01:00
Pierre-Antoine Rouby 0d88b954d8 pep8: Minor change. 2024-01-16 14:12:30 +01:00
Pierre-Antoine Rouby 46602227af Results: Fix play button image file path. 2024-01-16 14:10:56 +01:00
Pierre-Antoine Rouby 99fe5e8f74 Results: Fix results reading before solver running... (again) 2024-01-16 14:05:29 +01:00
Pierre-Antoine Rouby 9e9f56ee65 HS: Resize window and add screenshot for wiki. 2024-01-16 11:06:57 +01:00
Pierre-Antoine Rouby cf53985fed Geometry: Remove some warning when profile not fully defined. 2024-01-16 09:05:27 +01:00
Pierre-Antoine Rouby 0ace259d2d Meshing: Mage: Fix libbief extention under windows system. 2024-01-15 17:08:46 +01:00
Pierre-Antoine Rouby f73b9b06c0 HS: Basic: Translate minor change. 2024-01-15 16:37:29 +01:00
Pierre-Antoine Rouby 906ed801c7 translate: Update HS and minor change. 2024-01-15 16:35:19 +01:00
Pierre-Antoine Rouby 975f2027ed HS: Basic: Rename all HS to english and add translation. 2024-01-15 15:15:05 +01:00
Pierre-Antoine Rouby 22f3823699 pep8: Minor change. 2024-01-15 14:09:00 +01:00
Pierre-Antoine Rouby c81dfb3ccc windows: Fix posix color on windows terminal. 2024-01-15 14:04:30 +01:00
Pierre-Antoine Rouby 2c8c2699ef Geometry: Fix point paste command. 2024-01-15 13:56:58 +01:00
Pierre-Antoine Rouby 7fd570c5a7 Network: Add tests and minor change. 2024-01-12 15:01:23 +01:00
Pierre-Antoine Rouby 76ab3114f0 doc: wiki: Add numerical params window image. 2024-01-10 15:30:42 +01:00
Pierre-Antoine Rouby 76975a85e0 doc: wiki: Add reservoir images. 2024-01-10 15:09:43 +01:00
Pierre-Antoine Rouby 7b9c725f04 doc: wiki: Add sediment images. 2024-01-10 10:48:33 +01:00
Pierre-Antoine Rouby 6fea7baea2 Geometry: Minor change. 2024-01-10 10:15:30 +01:00
Pierre-Antoine Rouby 9c2b2033ec doc: wiki: Add IC window images. 2024-01-10 09:41:16 +01:00
Pierre-Antoine Rouby f67b7c6f60 doc: wiki: Add BC images. 2024-01-09 16:41:04 +01:00
Pierre-Antoine Rouby fb0f1ad866 doc: wiki: Add frictions windows images. 2024-01-09 16:01:05 +01:00
Pierre-Antoine Rouby 2b1fa93ebe doc: wiki: Add geometry window. 2024-01-09 15:09:15 +01:00
Pierre-Antoine Rouby e3140763ba doc: wiki: Update network image. 2024-01-09 14:50:44 +01:00
Pierre-Antoine Rouby e60b388930 doc: wiki: Add network window image. 2024-01-09 14:20:57 +01:00
Pierre-Antoine Rouby f4914934f2 doc: wiki: Add new study window image. 2024-01-09 14:03:40 +01:00
Pierre-Antoine Rouby 7115632d30 ci: Fix images copy command. 2024-01-09 11:59:14 +01:00
Pierre-Antoine Rouby 52112a5413 doc: wiki: Add images for the wiki documentation. 2024-01-09 11:44:41 +01:00
Pierre-Antoine Rouby 07798bbf46 Config: Disable meshing tools tab and add some self documentation for solver command line. 2024-01-09 10:53:49 +01:00
Pierre-Antoine Rouby 134c66d51c Geometry: Fix pep8. 2024-01-09 10:20:34 +01:00
Pierre-Antoine Rouby 84cf693528 HS: Add HS name on BHS edit window title. 2024-01-09 09:20:08 +01:00
Pierre-Antoine Rouby 7ef2df8535 Geometry: Window update minor change. 2024-01-08 17:27:12 +01:00
Pierre-Antoine Rouby 4d95e42d20 Geometry: Make import button an undo command. 2024-01-08 17:11:10 +01:00
Pierre-Antoine Rouby 30702cb118 Geometry: Fixed #29 with a hacky solution. 2024-01-08 16:30:56 +01:00
Pierre-Antoine Rouby e930bcaa91 Package: Add windows 'libbief.dll'. 2024-01-08 15:46:47 +01:00
Pierre-Antoine Rouby 1e2432e298 Package: Update mage version. 2024-01-08 15:35:58 +01:00
Pierre-Antoine Rouby 1243b2dc88 Meshing: Mage: Fix pep8. 2024-01-08 15:27:23 +01:00
Pierre-Antoine Rouby f2b97b68bd Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2024-01-08 15:20:06 +01:00
Pierre-Antoine Rouby 2149fa0dcb IC: Change generate button text. 2024-01-08 15:15:50 +01:00
Pierre-Antoine Rouby 6293c6206c IC: Generator dialog text and size. 2024-01-08 15:13:24 +01:00
Theophile Terraz f451731877 add point number in profiles table for geometry 2023-12-21 15:57:36 +01:00
Theophile Terraz d74c78eff5 get GL order for meshing 2023-12-21 15:56:59 +01:00
Theophile Terraz af347349e1 add purge after interpolation 2023-12-21 14:56:56 +01:00
Theophile Terraz 2f47b190ac improve interpolation 2023-12-20 17:56:43 +01:00
Pierre-Antoine Rouby 655982e908 Geometry: Make meshing method to undo command. 2023-12-20 14:36:41 +01:00
Theophile Terraz 82eba020ac Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-12-20 14:11:26 +01:00
Pierre-Antoine Rouby eb65ce4c1b Meshing: Mage: Fix so file path for packages. 2023-12-20 12:13:28 +01:00
Pierre-Antoine Rouby 691ec4f3bd pep8: Minor fix. 2023-12-20 12:05:37 +01:00
Pierre-Antoine Rouby c1069adc2f packages: Add libbief. 2023-12-20 11:59:04 +01:00
Pierre-Antoine Rouby 097b5eb7fc Geometry: Add meshing action with mage internal meshing functions. 2023-12-20 11:36:46 +01:00
Pierre-Antoine Rouby e965e2b4c1 Script: Meshing: Minor change. 2023-12-20 10:53:48 +01:00
Theophile Terraz d81f341303 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-12-20 10:43:40 +01:00
Pierre-Antoine Rouby 1ea6fd7c54 Script: Fix missing files and minor change. 2023-12-20 09:45:11 +01:00
Theophile Terraz 3025c995b6 bords ponts Tuto1 2023-12-20 09:38:37 +01:00
Theophile Terraz ecc75c45eb Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-12-20 09:37:34 +01:00
Pierre-Antoine Rouby 09dcf486d8 Script: Add mage meshing tool. 2023-12-19 17:28:34 +01:00
Pierre-Antoine Rouby 592c1e5dbc MainWindow: Minor fix of file name '.pamhyr' detection. 2023-12-19 11:59:21 +01:00
Pierre-Antoine Rouby cd3baf2870 Results, RunSolver: Stop timer at window close. 2023-12-19 09:45:05 +01:00
Pierre-Antoine Rouby 93734ff1b9 SolverRun: Try catch read results. 2023-12-19 09:17:26 +01:00
Pierre-Antoine Rouby dfb7d37cfb Results: Resize window to respect 16:9. 2023-12-19 09:11:28 +01:00
Pierre-Antoine Rouby 83aa6a5791 Results, Plots: Fix icon paths. 2023-12-19 09:11:01 +01:00
Pierre-Antoine Rouby 45f020edaa Solver: Fix install dir path. 2023-12-19 08:52:24 +01:00
Pierre-Antoine Rouby ad1c5c487e mage: Update mage version. 2023-12-18 17:22:55 +01:00
Theophile Terraz 5c323b28e2 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-12-18 16:15:22 +01:00
Theophile Terraz da2250df3a work on tuto 2023-12-18 16:15:19 +01:00
Pierre-Antoine Rouby cb1d6b4db7 pep8: Minor fixes. 2023-12-18 15:44:49 +01:00
Pierre-Antoine Rouby f96cee145c HS: Fix Plot relim at update. 2023-12-18 15:37:22 +01:00
Pierre-Antoine Rouby e4670e4a4d Results: Add current timestamps on hydrograph. 2023-12-18 15:28:22 +01:00
Pierre-Antoine Rouby 5c0f90b43e Results: Fix sl results display. 2023-12-18 15:11:56 +01:00
Pierre-Antoine Rouby e6de528b7f Mage: Update mage gra file reader for mage 83. 2023-12-18 14:56:16 +01:00
Pierre-Antoine Rouby dfff8d2fcb Geometry: Copy disable headers. 2023-12-18 11:26:58 +01:00
Pierre-Antoine Rouby 33a1fd2b52 Geometry: Profile copy/paste minor change. 2023-12-18 11:17:16 +01:00
Pierre-Antoine Rouby f083b7f6ef Geometry: Fix copy/paste command. 2023-12-18 10:44:11 +01:00
Pierre-Antoine Rouby 25de73812b Config: Fix reopen latest study. 2023-12-18 10:25:24 +01:00
Pierre-Antoine Rouby 6b232d2971 Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-18 10:14:24 +01:00
Theophile Terraz 9c0ffa8356 add option to let Mage generate initial condition 2023-12-15 15:36:17 +01:00
Pierre-Antoine Rouby ffbd2e2413 Mage: Minor code style refactoring. 2023-12-13 16:44:44 +01:00
Pierre-Antoine Rouby 58300b8c1a Mage: Minor indent fixes. 2023-12-13 16:31:57 +01:00
Pierre-Antoine Rouby cd2fda8224 HS, Mage: Rewrite some code for coding style. 2023-12-13 16:30:18 +01:00
Pierre-Antoine Rouby 73ae571de1 Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-13 16:01:23 +01:00
Pierre-Antoine Rouby 7aee4c64a3 Solver: Fix running pipeline. 2023-12-13 15:57:47 +01:00
Pierre-Antoine Rouby c3cae35de4 pep8: Fixes code style. 2023-12-13 14:53:58 +01:00
Pierre-Antoine Rouby 2736d2f399 SolverRun: Keep in configuration the last solver name used. 2023-12-13 14:48:01 +01:00
Pierre-Antoine Rouby 00afc6c06b SolverRun: Fix bin/gra reading before solver running. 2023-12-13 14:30:29 +01:00
Theophile Terraz 4eefa88490 Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-13 11:45:01 +01:00
Theophile Terraz 92e54bf11e work on Mage export 2023-12-13 11:44:56 +01:00
Pierre-Antoine Rouby c11350d49a HS: Fix basic HS previous data delete at save. 2023-12-13 11:04:51 +01:00
Pierre-Antoine Rouby 8f5fb4cc3b Geometry: Profile: Some fixes. 2023-12-13 10:36:13 +01:00
Pierre-Antoine Rouby fc7a7bb7fd HS: Fix update relim in PlotAC and PlotKPC. 2023-12-13 10:07:46 +01:00
Pierre-Antoine Rouby 5a1c363e8a IC: Fix reach reference at loading in case of multiple reach. 2023-12-13 09:42:47 +01:00
Theophile Terraz 77a6da3024 Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-12 16:35:24 +01:00
Theophile Terraz c4a66281f6 debug output SIN 2023-12-12 16:35:17 +01:00
Pierre-Antoine Rouby 7ffc2482fc HS: Minor fixes. 2023-12-12 16:21:47 +01:00
Pierre-Antoine Rouby f37da68a67 HS: Basic: Minor fixes. 2023-12-12 16:08:04 +01:00
Theophile Terraz f64ed131f9 work on BHS 2023-12-12 16:00:40 +01:00
Theophile Terraz 79b31e8d08 merge 2023-12-12 15:40:54 +01:00
Theophile Terraz d1c8e3e4f5 debug SIN output 2023-12-12 15:39:43 +01:00
Theophile Terraz c253ad832d ajout ouvrages mage 2023-12-12 14:57:23 +01:00
Pierre-Antoine Rouby 6081b09267 pep8: Fixes. 2023-12-12 14:53:00 +01:00
Pierre-Antoine Rouby 592c2c9a72 HS: Minor fix. 2023-12-12 14:44:58 +01:00
Pierre-Antoine Rouby ce45776a63 HS: Basic: Fix load sql request. 2023-12-12 14:30:04 +01:00
Pierre-Antoine Rouby 02bbdf9fda HS: Basic: Add parameters table and fix save/load sql methods. 2023-12-12 14:23:36 +01:00
Pierre-Antoine Rouby 6c9e90ceaf MainWindow: Add progress dialog for save as method. 2023-12-12 13:39:38 +01:00
Pierre-Antoine Rouby b99be5a280 MainWindow: Remove cancel button. 2023-12-12 13:35:13 +01:00
Pierre-Antoine Rouby 1acd582de9 MainWindow: Add progress dialog for save process. 2023-12-12 11:57:19 +01:00
Pierre-Antoine Rouby 8ce5a4d215 Network: Change selected reach color and minor change. 2023-12-12 10:51:25 +01:00
Pierre-Antoine Rouby ccb55ff4e1 HS: Fix pep8 and minor change. 2023-12-12 10:22:52 +01:00
Pierre-Antoine Rouby 3ef4b40558 HS: Basic: Add question for BHS type change. 2023-12-12 10:13:10 +01:00
Pierre-Antoine Rouby c667d94e84 HS: Basic: Fix delete undo command. 2023-12-12 09:43:54 +01:00
Pierre-Antoine Rouby 1b601460e6 HS: Basic: Make enabled undo command. 2023-12-12 09:32:05 +01:00
Theophile Terraz 7db65f127e work on hydraulic structures 2023-12-11 16:53:53 +01:00
Theophile Terraz f302e18d71 dirty work on BHS 2023-12-11 15:44:31 +01:00
Theophile Terraz 352c0beb27 add short dict and getter in HS 2023-12-11 15:29:02 +01:00
Theophile Terraz d6561ab44d merge 2023-12-11 15:27:53 +01:00
Pierre-Antoine Rouby 5d9b6f99c6 HS: Fix case with no profile kp. 2023-12-11 15:20:46 +01:00
Pierre-Antoine Rouby 163a842384 HS: Refacto update function and fix NA value at table data set. 2023-12-11 15:19:24 +01:00
Pierre-Antoine Rouby eea355a784 pep8: Change to respect pep8 code style. 2023-12-11 14:40:54 +01:00
Pierre-Antoine Rouby 1ab1cb37b0 HS: Create a enabled undo command. 2023-12-11 11:55:27 +01:00
Theophile Terraz be19a11387 Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-11 11:20:51 +01:00
Theophile Terraz 062743d748 enable edit window 2023-12-11 11:20:47 +01:00
Pierre-Antoine Rouby ac2a2002b7 HS: Fix checkbox state at undo add command. 2023-12-11 11:12:57 +01:00
Pierre-Antoine Rouby 6951b82339 Friction: Delete useless prints. 2023-12-11 11:12:41 +01:00
Pierre-Antoine Rouby e41c23120a HS: Minor fix add method. 2023-12-11 11:00:14 +01:00
Theophile Terraz 4c5281ea30 Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-06 16:55:34 +01:00
Theophile Terraz 7b7ba2eb37 add hydraulic structures plots 2023-12-06 16:55:27 +01:00
Pierre-Antoine Rouby 4a43653d7f HydraulicStructure: Fix KP db type. 2023-12-06 14:49:50 +01:00
Pierre-Antoine Rouby 0307927fa9 PamhyrTable: Fix editable column. 2023-12-06 14:15:47 +01:00
Pierre-Antoine Rouby db11c9d968 Geometry: Resize window to respect 16:9 ratio. 2023-12-06 11:44:09 +01:00
Pierre-Antoine Rouby d85e5c4666 PamhyrDialog: Fix window list delete whene dialog is done. 2023-12-06 11:30:09 +01:00
Pierre-Antoine Rouby 45ee8a9662 Friction: Fix load method in case of multiple reaches. 2023-12-06 11:05:55 +01:00
Pierre-Antoine Rouby 5ab06dbe51 HydraulicStructure: Fix db export. 2023-12-06 09:20:18 +01:00
Theophile Terraz d73e901a96 work on hydraulic structures window 2023-12-05 16:46:50 +01:00
Theophile Terraz c17e39e3cf Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure 2023-12-05 15:14:19 +01:00
Pierre-Antoine Rouby af4cce96ef HydraulicStructure: Rename enable to enabled. 2023-12-05 14:02:10 +01:00
Pierre-Antoine Rouby 0a780e5f78 HydraulicStructure: Minor change and fixes. 2023-12-05 11:56:14 +01:00
Pierre-Antoine Rouby fb2b1f680f HydraulicStructures: Add Model files. 2023-12-05 11:13:52 +01:00
Theophile Terraz 6957986632 add hydraulic structures view files 2023-12-05 09:41:15 +01:00
Theophile Terraz 13d23502a9 Merge branch 'master' into hydraulics-structure 2023-12-04 17:41:39 +01:00
Theophile Terraz 5fa888768e add hydraulic structures ui 2023-12-04 17:41:06 +01:00
Theophile Terraz 07451899c4 export mage SIN file 2023-12-04 17:38:25 +01:00
Theophile Terraz 2aa693e4ae modif sections sliders 2023-12-04 09:35:02 +01:00
Theophile Terraz ff480fb593 add first and last button (visu) 2023-12-04 09:14:35 +01:00
Theophile Terraz d6753dc986 upgrade results slider 2023-12-01 18:37:36 +01:00
Theophile Terraz 2d2484d8fa change colors 2023-12-01 15:51:40 +01:00
Theophile Terraz bb97f1977b debug 2023-12-01 15:51:13 +01:00
Theophile Terraz eb26eba131 optim visu 2023-12-01 14:05:00 +01:00
Theophile Terraz 2d3e214514 debug 2023-12-01 14:04:46 +01:00
Theophile Terraz 894a7c8477 speed up View/Results/PlotXY 2023-11-30 15:06:39 +01:00
Theophile Terraz 21197ead23 work on vater limits for top view visualization 2023-11-30 15:06:00 +01:00
Theophile Terraz d79a0cc973 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-11-29 17:10:30 +01:00
Theophile Terraz a55669d181 modif INI format 2023-11-29 17:10:27 +01:00
Pierre-Antoine Rouby 2fd44fbfb4 IC: Fix data sorting at the end of generation. 2023-11-29 16:52:01 +01:00
Pierre-Antoine Rouby 962bfa945d Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-11-29 16:41:53 +01:00
Pierre-Antoine Rouby 65c1163a55 Reservoir: Allow to select only internal node. 2023-11-29 16:41:05 +01:00
Theophile Terraz 8d67442ca3 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-11-29 15:26:22 +01:00
Theophile Terraz f7d2ac8b86 traduction 2023-11-29 15:26:11 +01:00
Pierre-Antoine Rouby 4f91de4c97 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr. 2023-11-29 14:49:02 +01:00
Pierre-Antoine Rouby 37b04961f1 IC: Add Manning/Strickler equation for IC approximation. 2023-11-29 14:47:35 +01:00
Theophile Terraz 0a63f16f62 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-11-29 14:34:11 +01:00
Theophile Terraz 92eb729a39 add Reservoirs 2023-11-29 14:34:06 +01:00
Pierre-Antoine Rouby d891c9783d Model: Fix possible data removing durring save. 2023-11-27 16:58:46 +01:00
Pierre-Antoine Rouby 51858597cd Mage: ST export minor change. 2023-11-27 14:49:42 +01:00
Pierre-Antoine Rouby 8b3baf433f Solver run: Used merged channels to get stderr. 2023-11-27 14:31:04 +01:00
Pierre-Antoine Rouby 12e3d779c6 Mage: Fix BC export when node is not associate. 2023-11-27 11:40:59 +01:00
Pierre-Antoine Rouby c6274890a7 BC: Rename some BC types. 2023-11-27 11:29:39 +01:00
Theophile Terraz 907fc0c53a add step-by-step tutorial 2023-11-27 09:44:57 +01:00
Pierre-Antoine Rouby b4ee76416e BC, LC: Disable time delegate (fix #23). 2023-11-27 09:37:23 +01:00
Pierre-Antoine Rouby a88b42a8ef BC: Fix get_assoc_to_node in case of no results. 2023-11-27 09:21:23 +01:00
Pierre-Antoine Rouby 08f01aee69 Network: Fix #22. 2023-11-27 09:12:31 +01:00
Pierre-Antoine Rouby c69cbdb34e BC: Make node association unique (#25). 2023-11-27 08:55:38 +01:00
Pierre-Antoine Rouby 01fd7dbec8 Pamhyr2: Fix some type compare. 2023-11-22 15:47:57 +01:00
Pierre-Antoine Rouby 2af9b0018c SQL: Minor change. 2023-11-22 15:39:21 +01:00
Pierre-Antoine Rouby 7f8e8d5a9f SQL: Minor change and add exception handler. 2023-11-22 14:58:03 +01:00
Pierre-Antoine Rouby c9887a97e7 Friction: Disable name column because the value is not in database. 2023-11-22 10:20:50 +01:00
Pierre-Antoine Rouby 1a708921e3 BC: Fix #13 paste undo command. 2023-11-22 10:02:25 +01:00
Pierre-Antoine Rouby 9fe1b35a59 IC: Fix profile side effect on IC generator. 2023-11-21 16:06:37 +01:00
Pierre-Antoine Rouby edf744eee1 Geometry: Fix profiles list sorting. 2023-11-21 14:24:31 +01:00
Pierre-Antoine Rouby e400980103 Frictions: Fix plot drawing crash. 2023-11-21 11:07:36 +01:00
Pierre-Antoine Rouby b12e935a5d Geometry: Fix some translate. 2023-11-21 10:45:00 +01:00
Pierre-Antoine Rouby 1d4422e9c5 MainWindow: Disable window maximized. 2023-11-21 10:38:35 +01:00
Pierre-Antoine Rouby 1a10da9c89 MainWindow: Fix translate and re organize UI. 2023-11-21 10:36:13 +01:00
Pierre-Antoine Rouby 470eae8b92 pamhyr: Fix #20 study reload whene study is not saved on a file. 2023-11-21 09:26:57 +01:00
Pierre-Antoine Rouby 9b53b4302b BC,IC: Enable to get time int from float string (fix #21). 2023-11-21 09:11:35 +01:00
Pierre-Antoine Rouby 461202219d Window: Fix paste delimiter. 2023-11-20 17:29:37 +01:00
Pierre-Antoine Rouby ddfaa3a73f git: Add pip requirements. 2023-11-20 16:35:32 +01:00
Pierre-Antoine Rouby 3e531130fe Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-11-20 16:16:24 +01:00
Pierre-Antoine Rouby 595eb29c42 BC: Fix long type translate crash. 2023-11-20 16:15:43 +01:00
Pierre-Antoine Rouby ccbbc83502 IC: Fix sql_save as generator value type. 2023-11-20 16:10:10 +01:00
Pierre-Antoine Rouby fd0a8ddf51 BC: Fix paste command. 2023-11-20 15:55:57 +01:00
Pierre-Antoine Rouby ce5808e3ce Geometry: Fix delete profiles. 2023-11-20 15:38:52 +01:00
Pierre-Antoine Rouby 4dafa345b4 Geometry: Fix delete command crash. 2023-11-20 15:37:07 +01:00
Theophile Terraz 90776f0af9 Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr 2023-11-02 16:44:02 +01:00
Theophile Terraz 32777456b9 add scripts to use Mascaret 2023-11-02 16:43:57 +01:00
Pierre-Antoine Rouby dcaa7fafbd tools: Fix PEP8. 2023-10-30 09:30:16 +01:00
Pierre-Antoine Rouby 17eb3e8184 tools: parser: Minor change and tests fixes. 2023-10-27 17:21:09 +02:00
Pierre-Antoine Rouby 7bbca7cf54 unittests: Add parse tests for ' quote. 2023-10-27 15:10:16 +02:00
Pierre-Antoine Rouby 3c738ebcb9 Solver: Mage: Fix profile sediment export. 2023-10-27 14:32:51 +02:00
Pierre-Antoine Rouby 6522cea03f pamhyr: Set axis label color to 'black' instead 'green'. 2023-10-27 14:23:55 +02:00
Pierre-Antoine Rouby ea2dbfba3e pamhyr: Rename '_sql_*' function to '_db_*'. 2023-10-27 14:15:42 +02:00
Pierre-Antoine Rouby 8d92fbbdac pamhyr: Delete useless '__init__.py' file. 2023-10-27 14:13:01 +02:00
Pierre-Antoine Rouby 77f06aaa07 tools: Time the parser function. 2023-10-27 11:53:00 +02:00
Pierre-Antoine Rouby b79c5b30c0 tests: Add tests for flatten function. 2023-10-27 11:50:36 +02:00
Pierre-Antoine Rouby fdac834d48 Tests: Fix pep8. 2023-10-27 11:34:11 +02:00
Pierre-Antoine Rouby 4355be1a9c Solver: Mage: Split ST export function. 2023-10-27 11:31:20 +02:00
Pierre-Antoine Rouby 66f6d3505b Solver: CommandLine: Fix path replace. 2023-10-27 11:15:58 +02:00
Pierre-Antoine Rouby 65c261887c Tools: Command line parser: Add a test. 2023-10-27 11:14:10 +02:00
Pierre-Antoine Rouby 6c794d2eb4 Solver: Refactoring command line parser and add unittest. 2023-10-27 11:05:16 +02:00
Pierre-Antoine Rouby 51c912f3a8 Solver: Code refactoring. 2023-10-27 09:33:32 +02:00
Pierre-Antoine Rouby 76e90f417e Script: Fix pep8. 2023-10-24 15:26:55 +02:00
Pierre-Antoine Rouby e556bcff54 Script: Add script command list solver. 2023-10-24 15:13:35 +02:00
Pierre-Antoine Rouby 4833685e2e Script: Add run/export script. 2023-10-24 15:05:05 +02:00
Pierre-Antoine Rouby 2d7681086d ci: Add configure stage. 2023-10-24 11:11:34 +02:00
Pierre-Antoine Rouby f44ac69d68 ci: Change stages order (tests before build). 2023-10-24 10:58:22 +02:00
Pierre-Antoine Rouby 32684af292 tests: Minor change. 2023-10-24 10:56:23 +02:00
Pierre-Antoine Rouby 862ec88191 tests: Add test script and fix pep8 in unittest. 2023-10-24 10:48:54 +02:00
Pierre-Antoine Rouby d36a9cd340 tests: Fix test env path. 2023-10-24 10:43:33 +02:00
Pierre-Antoine Rouby afafbb0c5e tests: Add unittest for Model and minor change. 2023-10-24 10:38:34 +02:00
Pierre-Antoine Rouby e3f01b575a Solver: Mage: Fix minor in ST file export. 2023-10-23 10:31:59 +02:00
Pierre-Antoine Rouby d6924998d9 Results: CustomPlot: Fix pep8. 2023-10-20 17:25:36 +02:00
Pierre-Antoine Rouby 0ae5c02ea0 Friction: Fix open stricker edit. 2023-10-20 17:20:03 +02:00
Pierre-Antoine Rouby e395f9f575 BC, LC: Fix sub window open. 2023-10-20 17:16:37 +02:00
Pierre-Antoine Rouby f074e1fdf2 Geometry: Fix profile sub window open. 2023-10-20 17:01:28 +02:00
Pierre-Antoine Rouby 4d1eb0fecc View: Fix results window open. 2023-10-20 16:57:32 +02:00
Pierre-Antoine Rouby f5fdde9a5d Merge branch 'results-custom-plot'. 2023-10-20 16:51:26 +02:00
Pierre-Antoine Rouby 32aa5bece5 Results: CustomPlot: Add legend and change axes label fontsize for each plot. 2023-10-20 16:48:21 +02:00
Pierre-Antoine Rouby cdfb867037 Results: CustomPlot: Add custom time axes. 2023-10-20 16:27:07 +02:00
Pierre-Antoine Rouby 021971816a Results: CustomPlot: Implement plot with time on y axes. 2023-10-20 15:09:24 +02:00
Pierre-Antoine Rouby e4386e20a3 Network: Fix item selection. 2023-10-20 11:45:28 +02:00
Pierre-Antoine Rouby 8760cd364d Pamhyr: Implement window duplication deny mechanism with hash (#7). 2023-10-20 10:48:07 +02:00
Pierre-Antoine Rouby 4c40f675b5 IC: Fix #14. 2023-10-20 09:25:19 +02:00
Pierre-Antoine Rouby 325bb9ed02 Solver: Mage: Fix warning. 2023-10-18 16:43:01 +02:00
Pierre-Antoine Rouby 505d1aeb48 Solver: Add @output command line parameters. 2023-10-18 16:40:28 +02:00
Pierre-Antoine Rouby 1dd189cbd4 Results: Implement results reload (for same solver) #16. 2023-10-18 16:00:32 +02:00
Pierre-Antoine Rouby fa7490dee8 pep8: Minor fix. 2023-10-18 14:55:32 +02:00
Pierre-Antoine Rouby 7fda5b6b4a Mage: Fix #17 ST file export format. 2023-10-18 14:45:38 +02:00
Pierre-Antoine Rouby 3ff0883eca RunSolver: Fix #15 and minor change. 2023-10-18 14:24:14 +02:00
Pierre-Antoine Rouby 04c8f1ae5f Results: CustomPlot: Minor change to fix warnings. 2023-10-18 14:02:55 +02:00
Pierre-Antoine Rouby f73000056c Results: CustomPlot: Fix kp / elevation, water_elevation and discharge drawing. 2023-10-18 10:53:57 +02:00
Pierre-Antoine Rouby 4605950b94 Results: CustomPlot: Minor change. 2023-10-17 17:10:58 +02:00
Pierre-Antoine Rouby ae40097b51 Results: Fix pep8 format. 2023-10-17 11:27:00 +02:00
Pierre-Antoine Rouby daaa9b193e Resutls: CustomPlot: Prepare ploting mecanisme. 2023-10-17 11:25:30 +02:00
Pierre-Antoine Rouby 98ee3ee6ec CustomPlot: Add translation. 2023-10-16 17:25:08 +02:00
Pierre-Antoine Rouby b77aed2395 results: Add custom plot dialog scheme. 2023-10-16 15:52:29 +02:00
Pierre-Antoine Rouby 45afdc25f9 packages: Fix motd.txt missing and pip version in linux.sh. 2023-10-16 11:41:59 +02:00
Pierre-Antoine Rouby 2ae681cebc ci: Add a full requirements for doc build. 2023-10-11 16:52:09 +02:00
Pierre-Antoine Rouby cc465a050c ci: Allow doc build failed. 2023-10-11 16:50:14 +02:00
Pierre-Antoine Rouby 1fd840d33f ci: Update pip. 2023-10-11 16:47:52 +02:00
Pierre-Antoine Rouby cc237fffa8 pamhyr: Fix package requirements list. 2023-10-11 16:37:57 +02:00
Pierre-Antoine Rouby bb27d4ec20 ci: Fix env install package. 2023-10-11 16:26:43 +02:00
Pierre-Antoine Rouby 255f7302ea ci: Fix remove option -U from pip install 2023-10-11 16:24:45 +02:00
Pierre-Antoine Rouby 9e0b4fd243 ci: Fix missing package for pdoc, fix requirements and pep8. 2023-10-11 16:22:45 +02:00
Pierre-Antoine Rouby 2e926c9ece debug: Switch from QPlainTextEdit to PamhyrPythonEditor. 2023-10-11 16:17:21 +02:00
Pierre-Antoine Rouby bcc2d2f4d4 ci: Allow pep8 failed. 2023-10-11 15:16:04 +02:00
Pierre-Antoine Rouby e3555b2c51 pep8: Fix all pep8 format error. 2023-10-11 15:08:33 +02:00
Pierre-Antoine Rouby e99037223b pep8: Fix some View code format. 2023-10-11 11:56:48 +02:00
Pierre-Antoine Rouby 9f2b81d385 pep8: Fix code format for model. 2023-10-11 11:47:09 +02:00
Pierre-Antoine Rouby 2c592b25b9 pep8: Fix code format. 2023-10-11 11:23:46 +02:00
Pierre-Antoine Rouby bf05b5ddc1 ci: Add pep8 test job. 2023-10-11 11:12:32 +02:00
Pierre-Antoine Rouby fa2454d079 pep8: Some modifications to respect pep8 standard code. 2023-10-11 11:06:45 +02:00
Pierre-Antoine Rouby 8544dd1144 doc: Disactive documentation display in Pamhyr2 for lighter packages. 2023-10-11 10:40:58 +02:00
Pierre-Antoine Rouby 1f8b0bddb4 ui: Fix geometry cross section window lang. 2023-10-11 08:52:05 +02:00
Pierre-Antoine Rouby 5b2ee80329 geometry, results, configure: Some fixes. 2023-10-11 08:40:54 +02:00
Pierre-Antoine Rouby acfb876da0 doc: Change the Firefox button to an open button. 2023-10-10 15:28:59 +02:00
Pierre-Antoine Rouby ab9ebc6400 pamhyr: Add just-in-time database geometry loading. 2023-10-10 15:17:53 +02:00
Pierre-Antoine Rouby a603c3a63f git: Update gitignore. 2023-10-10 09:51:57 +02:00
Pierre-Antoine Rouby d0ea629c10 pamhyr: Fix execution without argument. 2023-10-10 09:36:45 +02:00
Pierre-Antoine Rouby b35be16268 ci: Fix windows exe generator script. 2023-10-10 09:30:40 +02:00
Pierre-Antoine Rouby 7644927de9 pamhyr: Allow Pamhyr2 script run on tty mode. 2023-10-09 17:03:23 +02:00
Pierre-Antoine Rouby 242b1a4e50 pamhyr: Put debug info as logger debug handler. 2023-10-09 16:55:54 +02:00
Pierre-Antoine Rouby 397b5b0cab debug: Display qt5 path in terminal. 2023-10-09 16:22:16 +02:00
Pierre-Antoine Rouby 8da1cb622f ci: Install and update pip packages. 2023-10-09 15:22:28 +02:00
Pierre-Antoine Rouby 7365bf70b6 doc: Add mage documentation open action. 2023-10-09 14:51:19 +02:00
Pierre-Antoine Rouby 2825d02cb2 doc: Fix path for build version. 2023-10-09 14:29:40 +02:00
Pierre-Antoine Rouby 24cb32c96c ci: Fix linux ci. 2023-10-09 13:44:15 +02:00
Pierre-Antoine Rouby 820adf2bb7 ci: Fix linux ci. 2023-10-09 12:08:58 +02:00
Pierre-Antoine Rouby 4211855732 ci: Update ci build instruction. 2023-10-09 12:05:29 +02:00
Pierre-Antoine Rouby 44b057c522 Merge branch 'doc-dev' with refactoring and user/dev documentation. 2023-10-09 11:17:13 +02:00
Pierre-Antoine Rouby f4d580a000 doc: Doc in format html or pdf, back/forward button and firefox button. 2023-10-09 11:11:23 +02:00
Pierre-Antoine Rouby a77c342e69 doc: Fix window display for version PyQt5 > 5.5 2023-10-06 16:21:23 +02:00
Pierre-Antoine Rouby 559d7dc006 doc: Keep doc html and add doc window in Pamhyr2. 2023-10-06 15:54:27 +02:00
Pierre-Antoine Rouby 1a47bbe19d Results: Allow to open last results from mainwindow. 2023-10-06 14:54:17 +02:00
Pierre-Antoine Rouby b1c658d711 refactoring: Delete deprecated unused files. 2023-10-06 14:34:15 +02:00
Pierre-Antoine Rouby 2ff4f63d23 refactoring: refactor Results. 2023-10-06 14:25:44 +02:00
Pierre-Antoine Rouby ba087f12a5 refactoring: Apply table refacto on checklist. 2023-10-06 10:40:18 +02:00
Pierre-Antoine Rouby a64a9867ef refactoring: refacto solver parameters 2023-10-04 17:01:31 +02:00
Pierre-Antoine Rouby 63d6c114c0 refactoring: refacto SL reach and profile window. 2023-10-04 16:23:06 +02:00
Pierre-Antoine Rouby 1d45ccb8b8 refactoring: refacto SL list & edit. 2023-10-04 15:19:27 +02:00
Pierre-Antoine Rouby 4ce597a2a0 refactoring: refacto frictions & stricklers. 2023-10-04 14:34:07 +02:00
Pierre-Antoine Rouby b430cbb62b refactoring: refacto IC. 2023-10-04 13:51:01 +02:00
Pierre-Antoine Rouby 500885ec4d refactoring: refacto LC. 2023-10-04 11:26:43 +02:00
Pierre-Antoine Rouby ea3654f1f8 refactoring: refacto BC. 2023-10-04 10:35:54 +02:00
Pierre-Antoine Rouby 7a5b4779e9 refactoring: Minor fix in geometry. 2023-10-03 17:11:06 +02:00
Pierre-Antoine Rouby c744797c6f refactoring: Minor fix in geometry. 2023-10-03 16:39:31 +02:00
Pierre-Antoine Rouby 11a7486a9c Refactoring: Use ui file in Geometry profile edit window. 2023-10-03 16:26:50 +02:00
Pierre-Antoine Rouby 44ccf99d48 Refactoring: Use ui file for geometry reach window. 2023-10-03 15:10:46 +02:00
Pierre-Antoine Rouby ef672798ef refactoring: Start refactoring plot. 2023-09-29 11:17:08 +02:00
Pierre-Antoine Rouby 245a5057c3 refactoring: Update BC. 2023-09-29 10:14:40 +02:00
Pierre-Antoine Rouby e06610756a model: geometry: Fix 'sl' setter. 2023-09-29 08:33:23 +02:00
Pierre-Antoine Rouby dbc256be1a ui, doc: Update Pamhyr2 debug repl. 2023-09-27 16:49:00 +02:00
Pierre-Antoine Rouby e589fcdd3d doc: dev: Complete dev documentation. 2023-09-27 16:42:42 +02:00
Pierre-Antoine Rouby d20cdfc47f doc: dev: Complete Architecture section. 2023-09-27 15:55:45 +02:00
Pierre-Antoine Rouby ab2e307e3d doc: dev: Update graphs. 2023-09-27 12:10:47 +02:00
Pierre-Antoine Rouby a81564e582 doc: dev: Write Plot section. 2023-09-27 09:20:17 +02:00
Pierre-Antoine Rouby f93f3fe122 doc: dev: Update Table and UndoCommand. 2023-09-27 09:00:18 +02:00
Pierre-Antoine Rouby 2e94348bb8 refactoring: Add PamhyrTranslate class for GUI translation and document it. 2023-09-26 17:16:53 +02:00
Pierre-Antoine Rouby e7fd2077bd doc: dev: Update with PamhyrWindow, and minor change in hash computation. 2023-09-26 14:19:22 +02:00
Pierre-Antoine Rouby 624e9b6f71 refactoring: Apply PamhyrWindow on Debug window. 2023-09-26 12:07:10 +02:00
Pierre-Antoine Rouby ca10f19fe5 refactoring: Continue apply PamhyrWindow. 2023-09-26 12:03:41 +02:00
Pierre-Antoine Rouby 1a36d78ee2 refactoring: Apply PamhyrWindow to SL. 2023-09-26 09:34:26 +02:00
Pierre-Antoine Rouby 809a0dd9cb refarctoring: Apply PamhyrWindow to frictions. 2023-09-25 17:01:59 +02:00
Pierre-Antoine Rouby b2b5c971c3 refactoring: Apply new Pamhyr tools on IC. 2023-09-25 16:38:14 +02:00
Pierre-Antoine Rouby 7c4ba10871 refactoring: Continue refacto using PamhyrWindow. 2023-09-25 15:57:53 +02:00
Pierre-Antoine Rouby cc9f853a34 refactoring: Add PamhyrWidget and continue refacto using PamhyrWindow. 2023-09-25 15:31:41 +02:00
Pierre-Antoine Rouby fa32e42933 refactoring: Add PamhyrWindow and PamhyrDialog (WIP). 2023-09-25 15:10:30 +02:00
Pierre-Antoine Rouby 9c7f1f7ba9 doc: Try with system package. 2023-09-22 11:51:00 +02:00
Pierre-Antoine Rouby 3842e689ac doc: Fix build package missing. 2023-09-22 11:45:12 +02:00
Pierre-Antoine Rouby d461cb8001 doc: Fix htmlize into html build. 2023-09-22 11:29:04 +02:00
Pierre-Antoine Rouby 2bb783b5d4 ci: Add HTML documentation. 2023-09-22 11:09:55 +02:00
Pierre-Antoine Rouby edc5b65234 Scripts: Convert plot_3DST.py to Pamhyr2 script. 2023-09-22 11:03:07 +02:00
Pierre-Antoine Rouby 0237c5a80a MainWindow: Connect menu close model. 2023-09-22 09:25:47 +02:00
Pierre-Antoine Rouby 1201184669 packages: windows: Add Desktop shortcuts and update wine script. 2023-09-22 09:05:35 +02:00
Pierre-Antoine Rouby 36adba84e7 config: Fix arguments in default mage solver. 2023-09-20 17:25:34 +02:00
Pierre-Antoine Rouby afa21c9057 doc: dev: View section (UI, window). 2023-09-20 16:46:37 +02:00
Pierre-Antoine Rouby 42dfdcc3b1 doc: dev: Complete Model section. 2023-09-20 15:32:04 +02:00
Pierre-Antoine Rouby 6c9481296b doc: dev: Add SQL section with examples. 2023-09-20 15:21:46 +02:00
Pierre-Antoine Rouby 89353b656f doc: dev: Some minor change. 2023-09-20 11:52:53 +02:00
Pierre-Antoine Rouby 48851c7d71 ci: Fix documentations dependencies. 2023-09-20 10:10:41 +02:00
Pierre-Antoine Rouby d30028c57d ci: Disable package building at master branch. 2023-09-20 09:34:12 +02:00
324 changed files with 27633 additions and 6429 deletions

No files matched your search

+336
View File
@@ -1,6 +1,7 @@
### CUSTOM ### ### CUSTOM ###
*.exe *.exe
*.msi
*.tar.xz *.tar.xz
*.zip *.zip
*.spec *.spec
@@ -9,15 +10,35 @@
tmp tmp
*.tar
*.tar.* *.tar.*
*.tgz
*.zip *.zip
*.html
*.pdf
*.odt
!doc/**/*.pdf
doc/dev/images/auto_*
doc/dev/documentation.*
!doc/dev/*.org
doc/dev/images/auto_*
doc/users/documentation.*
!doc/users/*.org
TAGS
pamhyrBuild pamhyrBuild
wine-pamhyr-build* wine-pamhyr-build*
_PAMHYR_ _PAMHYR_
__old__ __old__
*-venv
### END CUSTOM ### ### END CUSTOM ###
# Created by https://www.toptal.com/developers/gitignore/api/python # Created by https://www.toptal.com/developers/gitignore/api/python
@@ -309,3 +330,318 @@ compile_commands.json
*_qmlcache.qrc *_qmlcache.qrc
# End of https://www.toptal.com/developers/gitignore/api/qt # End of https://www.toptal.com/developers/gitignore/api/qt
# Created by https://www.toptal.com/developers/gitignore/api/latex
# Edit at https://www.toptal.com/developers/gitignore?templates=latex
### LaTeX ###
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
*.slg
*.slo
*.sls
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplot
*.gnuplot
*.table
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# svg
svg-inkscape/
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# titletoc
*.ptc
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib
### LaTeX Patch ###
# LIPIcs / OASIcs
*.vtc
# glossaries
*.glstex
# End of https://www.toptal.com/developers/gitignore/api/latex
+164 -55
View File
@@ -16,8 +16,9 @@
stages: stages:
- downloads - downloads
- build - configure
- test - test
- build
- package - package
- release - release
@@ -25,6 +26,23 @@ stages:
# DOWNLOADS # # DOWNLOADS #
############# #############
variables:
MAGE_VERSION: "v8.3.3"
dl-mage-doc:
stage: downloads
tags:
- linux
rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
script:
- mkdir -p doc
- cd doc
- curl -L -o mage8.pdf https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_VERSION/downloads/documents/Mage-8_Documentation.pdf
artifacts:
paths:
- doc/mage8.pdf
dl-mage-linux: dl-mage-linux:
stage: downloads stage: downloads
tags: tags:
@@ -32,7 +50,7 @@ dl-mage-linux:
rules: rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
script: script:
- curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/Test6/downloads/packages/mage_linux.tgz - curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_VERSION/downloads/packages/mage_linux.tgz
- mkdir -p mage-linux - mkdir -p mage-linux
- cd mage-linux - cd mage-linux
- tar xvf ../mage.tgz - tar xvf ../mage.tgz
@@ -40,7 +58,8 @@ dl-mage-linux:
paths: paths:
- mage-linux/mage - mage-linux/mage
- mage-linux/mage_extraire - mage-linux/mage_extraire
- mage-linux/mailleurPF - mage-linux/mailleurTT
- mage-linux/libbief.so
dl-mage-windows: dl-mage-windows:
stage: downloads stage: downloads
@@ -49,7 +68,7 @@ dl-mage-windows:
rules: rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
script: script:
- curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/Test6/downloads/packages/mage_windows.tgz - curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_VERSION/downloads/packages/mage_windows.tgz
- mkdir -p mage-windows - mkdir -p mage-windows
- cd mage-windows - cd mage-windows
- tar xvf ../mage.tgz - tar xvf ../mage.tgz
@@ -57,14 +76,15 @@ dl-mage-windows:
paths: paths:
- mage-windows/mage.exe - mage-windows/mage.exe
- mage-windows/mage_extraire.exe - mage-windows/mage_extraire.exe
- mage-windows/mailleurPF.exe - mage-windows/mailleurTT.exe
- mage-windows/libbief.dll
######### #############
# BUILD # # CONFIGURE #
######### #############
set-version: set-version:
stage: build stage: configure
tags: tags:
- linux - linux
script: script:
@@ -75,7 +95,7 @@ set-version:
- VERSION - VERSION
build-lang: build-lang:
stage: build stage: configure
tags: tags:
- linux - linux
script: script:
@@ -85,27 +105,114 @@ build-lang:
paths: paths:
- src/lang/*.qm - src/lang/*.qm
#########
# TESTS #
#########
unittest:
stage: test
tags:
- linux
needs:
- job: set-version
artifacts: true
script:
- python3 -m venv venv
- . venv/bin/activate
- pip3 install -U pip
- pip3 install -r ./full-requirements.txt
- pip3 install -U -r ./full-requirements.txt
- cd src
- python3 -m unittest discover -t .
test-pep8:
stage: test
tags:
- linux
needs:
- job: set-version
artifacts: true
- job: unittest
script:
# Setup virtual env
- python3 -m venv venv
- . venv/bin/activate
- pip3 install -U pip
- pip3 install -r ./requirements.txt
- pip3 install -U -r ./requirements.txt
- pip3 install pycodestyle
- pycodestyle --exclude="*_to_*.py" ./src
allow_failure: true
#########
# BUILD #
#########
build-users-doc: build-users-doc:
stage: build stage: build
tags: tags:
- linux - linux
needs:
- job: set-version
artifacts: true
script: script:
- cd ./doc/users/ - cd ./doc/users/
- ./build.sh - ./build.sh
artifacts: artifacts:
paths: paths:
- doc/users/documentation.pdf - doc/users/documentation.pdf
- doc/users/documentation.html
- doc/users/images/
allow_failure: true
build-td:
stage: build
tags:
- linux
needs:
- job: set-version
artifacts: true
script:
- cd ./doc/users/Tuto1/
- ./build.sh
artifacts:
paths:
- doc/users/Tuto1/step-by-step.pdf
- doc/users/Tuto1/pas-a-pas.pdf
- doc/users/Tuto1/data/
allow_failure: true
build-developers-doc: build-developers-doc:
stage: build stage: build
tags: tags:
- linux - linux
needs:
- job: set-version
artifacts: true
script: script:
- cd ./doc/dev/ - cd ./doc/dev/
- ./build.sh - ./build.sh
# Create html documentation
- cd ../../src
- python3 -m venv doc-venv
- . doc-venv/bin/activate
- pip3 install -U pip
- pip3 install -r ../full-requirements.txt
- pip3 install -U -r ../full-requirements.txt
- pip3 install pdoc3
- pdoc --html .
# Create archive
- tar cf html.tar ./html
- cd ../doc/dev
- mv ../../src/html.tar ./
artifacts: artifacts:
paths: paths:
- doc/dev/documentation.pdf - doc/dev/documentation.pdf
- doc/dev/documentation.html
- doc/dev/html.tar
- doc/dev/images/
allow_failure: true
build-linux: build-linux:
stage: build stage: build
@@ -116,6 +223,8 @@ build-linux:
needs: needs:
- job: dl-mage-linux - job: dl-mage-linux
artifacts: true artifacts: true
- job: dl-mage-doc
artifacts: true
- job: set-version - job: set-version
artifacts: true artifacts: true
- job: build-lang - job: build-lang
@@ -124,45 +233,70 @@ build-linux:
artifacts: true artifacts: true
- job: build-users-doc - job: build-users-doc
artifacts: true artifacts: true
- job: build-td
artifacts: true
script: script:
- mkdir -p linux - mkdir -p linux
- cd linux - cd linux
# Setup virtual env # Setup virtual env
- python3 -m venv linux-venv - python3 -m venv linux-venv
- . linux-venv/bin/activate - . linux-venv/bin/activate
- pip3 install -U pip
- pip3 install -r ../requirements.txt - pip3 install -r ../requirements.txt
- pip3 install -U -r ../requirements.txt
# Run Pyinstaller # Run Pyinstaller
- pyinstaller -y --paths linux-venv/lib/python3.8/site-packages ../src/pamhyr.py - pyinstaller -y --paths linux-venv/lib/python3.8/site-packages ../src/pamhyr.py
# Create directory # Create directory
- mkdir -p pamhyr - mkdir -p pamhyr
- mkdir -p pamhyr/pamhyr - mkdir -p pamhyr/pamhyr
- mkdir -p pamhyr/pamhyr/_internal
# Copy Pamhyr info # Copy Pamhyr info
- cp -v ../VERSION pamhyr/pamhyr/ - cp -v ../VERSION pamhyr/pamhyr/_internal/
- cp -v ../AUTHORS pamhyr/pamhyr/ - cp -v ../AUTHORS pamhyr/pamhyr/_internal/
- cp -v ../LICENSE pamhyr/pamhyr/ - cp -v ../LICENSE pamhyr/pamhyr/_internal/
- cp -v ../src/motd.txt pamhyr/pamhyr/_internal/
# Copy mage # Copy mage
- mkdir -p pamhyr/mage - mkdir -p pamhyr/mage
- cp -v ../mage-linux/* pamhyr/mage/ - cp -v ../mage-linux/* pamhyr/mage/
# Copy Pamhyr # Copy Pamhyr
- cp -r dist/pamhyr pamhyr/ - cp -r dist/pamhyr pamhyr/
# Copy Pamhyr resources # Copy Pamhyr resources
- mkdir -p pamhyr/pamhyr/View - mkdir -p pamhyr/pamhyr/_internal/View
- mkdir -p pamhyr/pamhyr/View/ui - mkdir -p pamhyr/pamhyr/_internal/View/ui
- mkdir -p pamhyr/pamhyr/View/ui/Widgets - mkdir -p pamhyr/pamhyr/_internal/View/ui/Widgets
- cp -r ../src/View/ui/*.ui pamhyr/pamhyr/View/ui/ - cp -r ../src/View/ui/*.ui pamhyr/pamhyr/_internal/View/ui/
- cp -r ../src/View/ui/ressources/ pamhyr/pamhyr/View/ui - cp -r ../src/View/ui/ressources/ pamhyr/pamhyr/_internal/View/ui
- cp -r ../src/View/ui/Widgets/*.ui pamhyr/pamhyr/View/ui/Widgets - cp -r ../src/View/ui/Widgets/*.ui pamhyr/pamhyr/_internal/View/ui/Widgets
# Copy lang # Copy lang
- mkdir -p pamhyr/pamhyr/lang - mkdir -p pamhyr/pamhyr/_internal/lang
- cp -r ../src/lang/*.qm pamhyr/pamhyr/lang - cp -r ../src/lang/*.qm pamhyr/pamhyr/_internal/lang
# Copy tests cases # Copy tests cases
- mkdir -p pamhyr/tests_cases/ - mkdir -p pamhyr/tests_cases/
- mkdir -p pamhyr/tests_cases/Saar - mkdir -p pamhyr/tests_cases/Saar
- cp ../tests_cases/Saar/Saar.pamhyr pamhyr/tests_cases/Saar/ - cp ../tests_cases/Saar/Saar.pamhyr pamhyr/tests_cases/Saar/
# Copy documentations # Copy documentations
- mkdir -p pamhyr/doc/ - mkdir -p pamhyr/doc/
- cp ../doc/users/documentation.pdf pamhyr/doc/Pamhyr2-users.pdf - mkdir -p pamhyr/doc/images/
- mkdir -p pamhyr/doc/html/
# - cp ../doc/users/documentation.pdf pamhyr/doc/Pamhyr2-users.pdf
# - cp ../doc/users/documentation.html pamhyr/doc/Pamhyr2-users.html
- cp ../doc/mage8.pdf pamhyr/doc/mage8.pdf
- cp ../doc/dev/documentation.pdf pamhyr/doc/Pamhyr2-dev.pdf - cp ../doc/dev/documentation.pdf pamhyr/doc/Pamhyr2-dev.pdf
- cp ../doc/dev/documentation.html pamhyr/doc/Pamhyr2-dev.html
#- cp ../doc/users/images/* pamhyr/doc/images
- cp -r ../doc/dev/images/* pamhyr/doc/images
- cp -r ../doc/images/* pamhyr/doc/images
# Copy Tuto
- mkdir -p pamhyr/doc/Tuto1/
- mkdir -p pamhyr/doc/Tuto1/data
- cp ../doc/users/Tuto1/Hogneau_Engees2022.pdf pamhyr/doc/Tuto1/Hogneau_Engees2022.pdf
- cp ../doc/users/Tuto1/step-by-step.pdf pamhyr/doc/Tuto1/Tuto1-en.pdf
- cp ../doc/users/Tuto1/pas-a-pas.pdf pamhyr/doc/Tuto1/Tuto1-fr.pdf
- cp ../doc/users/Tuto1/*.pamhyr pamhyr/doc/Tuto1/
- cp ../doc/users/Tuto1/data/* pamhyr/doc/Tuto1/data/
# Copy TP charriage
- mkdir -p pamhyr/doc/TP_charriage/
- cp ../doc/users/TP_charriage/* pamhyr/doc/TP_charriage
# Create running script # Create running script
- echo "#!/bin/sh" > pamhyr/Pamhyr2 - echo "#!/bin/sh" > pamhyr/Pamhyr2
- echo "./pamhyr/pamhyr $@" >> pamhyr/Pamhyr2 - echo "./pamhyr/pamhyr $@" >> pamhyr/Pamhyr2
@@ -180,6 +314,8 @@ build-windows:
needs: needs:
- job: dl-mage-windows - job: dl-mage-windows
artifacts: true artifacts: true
- job: dl-mage-doc
artifacts: true
- job: set-version - job: set-version
artifacts: true artifacts: true
- job: build-lang - job: build-lang
@@ -188,11 +324,14 @@ build-windows:
artifacts: true artifacts: true
- job: build-users-doc - job: build-users-doc
artifacts: true artifacts: true
- job: build-td
artifacts: true
script: script:
- mkdir windows - mkdir windows
- cd windows - cd windows
# Setup env # Setup env
- python -m pip install -r ..\requirements.txt - python -m pip install -r ..\requirements.txt
- python -m pip install -U -r ..\requirements.txt
# Run Pyinstaller # Run Pyinstaller
- pyinstaller -y ..\src\pamhyr.py - pyinstaller -y ..\src\pamhyr.py
# Create directory # Create directory
@@ -204,36 +343,6 @@ build-windows:
paths: paths:
- windows/pamhyr - windows/pamhyr
#########
# TESTS #
#########
# test-windows:
# stage: test
# tags:
# - wine
# needs:
# - job: set-version
# artifacts: true
# - job: build-windows
# artifacts: true
# script:
# - cd windows\pamhyr
# - pamhyr\pamhyr.exe hello
# test-linux:
# stage: test
# tags:
# - linux
# needs:
# - job: set-version
# artifacts: true
# - job: build-linux
# artifacts: true
# script:
# - cd linux/pamhyr
# - ./Pamhyr2 hello
############ ############
# PACKAGES # # PACKAGES #
############ ############
@@ -248,7 +357,7 @@ linux-package-tar:
- job: build-linux - job: build-linux
artifacts: true artifacts: true
rules: rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
artifacts: artifacts:
paths: paths:
- linux/pamhyr-gnulinux.tar.xz - linux/pamhyr-gnulinux.tar.xz
@@ -266,7 +375,7 @@ windows-package-zip:
- job: build-windows - job: build-windows
artifacts: true artifacts: true
rules: rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
artifacts: artifacts:
paths: paths:
- windows/pamhyr-windows.zip - windows/pamhyr-windows.zip
@@ -284,7 +393,7 @@ windows-package-exe:
- job: build-windows - job: build-windows
artifacts: true artifacts: true
rules: rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
artifacts: artifacts:
paths: paths:
- windows/pamhyr-windows.exe - windows/pamhyr-windows.exe
+21 -6
View File
@@ -10,35 +10,50 @@ modelling of rivers.
+ Define boundary conditions + Define boundary conditions
+ Define lateral contribution + Define lateral contribution
+ Edit river friction + Edit river friction
+ Add reservoirs
+ Add hydraulic structures
+ Generate initial conditions + Generate initial conditions
+ Edit river sedimentary layers + Edit river sedimentary layers
+ Save the study in a unique file + Save the study in a unique file
+ Run Mage 8 on a study and visualize results + Run Mage 8 on a study and visualize results
Let see the
[documentation](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home)
for more details.
## Install ## Install
### GNU/Linux ### GNU/Linux
Downloads [last Downloads the [last
realease](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/permalink/latest) realease](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/permalink/latest)
GNU/Linux binary archive. GNU/Linux binary archive.
```shell ```shell
tar xf pamhyr-gnulinux-amd64.tar.xz tar xf pamhyr-gnulinux.tar.xz
cd pamhyr cd pamhyr
./pamhyr ./Pamhyr2
``` ```
### Windows ### Windows
Downloads [last Downloads the [last
realease](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/permalink/latest) realease](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/permalink/latest)
Windows installer. Windows installer or ZIP archive.
### From source code ### From source code
```shell ```shell
# Get source code # Get mage
mkdir mage
cd mage
curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/v8.3.2/downloads/packages/mage_linux.tgz
tar xf mage.tgz
cd ..
# Get Pamhyr2 source code
git clone https://gitlab.irstea.fr/theophile.terraz/pamhyr/ git clone https://gitlab.irstea.fr/theophile.terraz/pamhyr/
cd pamhyr cd pamhyr
+11 -3
View File
@@ -1,10 +1,18 @@
#! /bin/sh #! /bin/sh
# Build the PDF echo " PDF documentation.org"
emacs -nw --batch \
emacs -Q -q -nw --batch \
--eval "(require 'org)" \ --eval "(require 'org)" \
--eval "(require 'ox-latex)" \ --eval "(require 'ox-latex)" \
--eval "(load-file \"../tools/setup.el\")" \ --eval "(load-file \"../tools/setup.el\")" \
--file ./documentation.org \ --file ./documentation.org \
-f org-latex-export-to-pdf -f org-latex-export-to-pdf
echo " HTML documentation.org"
emacs -nw --batch \
--eval "(require 'org)" \
--eval "(require 'ox-latex)" \
--eval "(require 'ox-html)" \
--eval "(load-file \"../tools/setup.el\")" \
--file ./documentation.org \
-f org-html-export-to-html
+906 -122
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
#! /bin/sh
pdflatex -no-shell-escape step-by-step.tex
pdflatex -no-shell-escape pas-a-pas.tex
File diff suppressed because it is too large. Load diff
+442
View File
@@ -0,0 +1,442 @@
1 0 0 8 31090.0000
31090.0000 0.0000 23.7300
31090.0000 2.5000 20.2800 rg
31090.0000 2.5000 19.2900
31090.0000 4.4000 19.2900
31090.0000 10.7000 19.5900
31090.0000 10.7000 20.5900 rd
31090.0000 14.5000 21.7100
31090.0000 17.6000 23.7300
999.9990 999.9990 999.9990
2 0 0 8 31165.0000
31165.0000 0.0000 22.8400
31165.0000 2.5000 20.1300 rg
31165.0000 2.5000 19.2300
31165.0000 4.4000 19.2300
31165.0000 10.7000 19.5300
31165.0000 10.7000 20.5300 rd
31165.0000 14.5000 21.7500
31165.0000 17.6000 23.5000
999.9990 999.9990 999.9990
3 0 0 10 31425.0000
31425.0000 -1.0000 22.8000
31425.0000 0.0000 21.9000
31425.0000 1.7000 20.3600 rg
31425.0000 2.5000 19.6300
31425.0000 2.5000 19.0300
31425.0000 4.4000 19.0300
31425.0000 10.7000 19.3300
31425.0000 10.7000 20.3300 rd
31425.0000 14.5000 21.9200
31425.0000 17.6000 23.4200
999.9990 999.9990 999.9990
4 0 0 10 31590.0000
31590.0000 -1.0000 22.7500
31590.0000 0.0000 22.0500
31590.0000 1.6700 20.2200 rg
31590.0000 2.5000 19.3100
31590.0000 2.5000 18.9000
31590.0000 4.4000 18.9000
31590.0000 10.7000 19.2000
31590.0000 10.7000 20.2000 rd
31590.0000 14.5000 22.0200
31590.0000 17.6000 23.2500
999.9990 999.9990 999.9990
5 0 0 10 31780.0000
31780.0000 -1.0000 22.7000
31780.0000 0.0000 22.0500
31780.0000 1.6000 20.0500 rg
31780.0000 2.5000 18.9400
31780.0000 2.5000 18.7500
31780.0000 4.4000 18.7500
31780.0000 10.7000 19.0500
31780.0000 10.7000 20.0500 rd
31780.0000 14.5000 22.1400
31780.0000 17.6000 23.0000
999.9990 999.9990 999.9990
6 0 0 9 31874.0000
31874.0000 0.0000 22.9900
31874.0000 0.0000 22.6900
31874.0000 2.5000 19.6900 rg
31874.0000 2.5000 18.6900
31874.0000 4.4000 18.6900
31874.0000 10.7000 18.9900
31874.0000 10.7000 19.9900 rd
31874.0000 14.5000 22.1900
31874.0000 17.6000 22.9900
999.9990 999.9990 999.9990
7 0 0 9 31875.0000 PontRD101m
31875.0000 0.5400 23.0000
31875.0000 0.5400 21.8900
31875.0000 2.5000 19.6900 rg
31875.0000 2.5000 18.6900
31875.0000 4.4000 18.6900
31875.0000 10.7000 18.9900
31875.0000 10.7000 19.9900 rd
31875.0000 13.8900 21.8900
31875.0000 13.8900 23.0000
999.9990 999.9990 999.9990
8 0 0 9 31885.0000 PontRD101v
31885.0000 0.5400 23.0000
31885.0000 0.5400 21.8900
31885.0000 2.5000 19.6900 rg
31885.0000 2.5000 18.6900
31885.0000 4.4000 18.6900
31885.0000 10.7000 18.9900
31885.0000 10.7000 19.9900 rd
31885.0000 13.8900 21.8900
31885.0000 13.8900 23.0000
999.9990 999.9990 999.9990
9 0 0 9 31886.0000
31886.0000 0.0000 22.9900
31886.0000 0.0000 22.6900
31886.0000 2.5000 19.6900 rg
31886.0000 2.5000 18.6900
31886.0000 4.4000 18.6900
31886.0000 10.7000 18.9900
31886.0000 10.7000 19.9900 rd
31886.0000 14.5000 22.1900
31886.0000 17.6000 22.9900
999.9990 999.9990 999.9990
10 0 0 13 32015.0000
32015.0000 0.0000 22.6400
32015.0000 0.2000 22.2200
32015.0000 1.3000 20.9900
32015.0000 2.0000 19.8800 rg
32015.0000 3.0000 18.6600
32015.0000 3.0000 18.5800
32015.0000 5.5000 18.5800
32015.0000 10.0000 18.9100
32015.0000 11.5000 19.2500
32015.0000 11.5000 20.0800 rd
32015.0000 15.1000 22.0600
32015.0000 17.6000 22.5100
32015.0000 18.0000 22.8100
999.9990 999.9990 999.9990
11 0 0 13 32205.0000
32205.0000 0.0000 22.3300
32205.0000 0.2000 22.1800
32205.0000 1.5000 21.0600
32205.0000 2.5000 19.7700 rg
32205.0000 3.6000 18.5100
32205.0000 3.6000 18.4500
32205.0000 6.9000 18.4500
32205.0000 8.8000 19.0500
32205.0000 12.5000 19.5700 rd
32205.0000 12.5000 20.1800
32205.0000 15.8000 21.9000
32205.0000 18.1000 22.4000
32205.0000 18.6000 22.5500
999.9990 999.9990 999.9990
12 0 0 13 32460.0000
32460.0000 0.0000 22.1500
32460.0000 0.3000 22.1300
32460.0000 1.8000 21.1600
32460.0000 3.0000 19.6400 rg
32460.0000 4.4000 18.3100
32460.0000 4.4000 18.2800
32460.0000 8.7000 18.2800
32460.0000 10.4000 19.2400 rd
32460.0000 13.7000 19.9900
32460.0000 13.7000 20.3300
32460.0000 16.8000 21.6800
32460.0000 18.9000 22.2500
32460.0000 19.3000 22.5500
999.9990 999.9990 999.9990
13 0 0 13 32655.0000
32655.0000 0.0000 22.4500
32655.0000 0.3000 22.0900
32655.0000 2.1000 21.2300
32655.0000 3.4000 19.5300 rg
32655.0000 5.0000 18.1600
32655.0000 5.0000 18.1400
32655.0000 10.1000 18.1400
32655.0000 11.6000 19.3900 rd
32655.0000 14.7000 20.3100
32655.0000 14.7000 20.4300
32655.0000 17.5000 21.5200
32655.0000 19.4000 22.1400
32655.0000 19.8000 22.4500
999.9990 999.9990 999.9990
14 0 0 13 32755.0000
32755.0000 0.0000 22.4500
32755.0000 0.3000 22.0900
32755.0000 2.1000 21.2300
32755.0000 3.4000 19.5300 rg
32755.0000 4.0000 18.0500
32755.0000 5.0000 18.0100
32755.0000 10.1000 18.0100
32755.0000 13.0000 19.3900 rd
32755.0000 14.7000 20.3100
32755.0000 14.7000 20.4300
32755.0000 17.5000 21.5200
32755.0000 19.4000 22.1400
32755.0000 19.8000 22.4500
999.9990 999.9990 999.9990
15 0 0 10 32770.0000 PontA2
32770.0000 0.0000 25.0000
32770.0000 1.9000 25.0000
32770.0000 1.9000 21.2700
32770.0000 3.3000 19.4700 rg
32770.0000 5.0000 18.0100
32770.0000 10.5000 18.0100
32770.0000 12.0000 19.4700 rd
32770.0000 19.4000 21.4700
32770.0000 19.4000 25.0000
32770.0000 20.3000 25.0000
999.9990 999.9990 999.9990
16 0 0 10 32800.0000 PontA2
32800.0000 0.0000 25.0000
32800.0000 1.9000 25.0000
32800.0000 1.9000 21.2700
32800.0000 3.3000 19.4700 rg
32800.0000 5.0000 18.0100
32800.0000 10.5000 18.0100
32800.0000 12.0000 19.4700 rd
32800.0000 19.4000 21.4700
32800.0000 19.4000 25.0000
32800.0000 20.3000 25.0000
999.9990 999.9990 999.9990
17 0 0 13 32820.0000
32820.0000 0.0000 22.4500
32820.0000 0.3000 22.0900
32820.0000 2.1000 21.2300
32820.0000 3.4000 19.5300 rg
32820.0000 4.0000 18.0500
32820.0000 5.0000 18.0100
32820.0000 10.1000 18.0100
32820.0000 13.0000 19.3900 rd
32820.0000 14.7000 20.3100
32820.0000 14.7000 20.4300
32820.0000 17.5000 21.5200
32820.0000 19.4000 22.1400
32820.0000 19.8000 22.4500
999.9990 999.9990 999.9990
18 0 0 11 32915.0000
32915.0000 0.0000 22.5500
32915.0000 0.4000 21.9500
32915.0000 1.7000 21.2200
32915.0000 2.4000 20.9700
32915.0000 3.8000 19.4100 rg
32915.0000 3.9000 19.3100
32915.0000 5.8000 18.0100
32915.0000 11.0000 18.0100
32915.0000 12.4000 19.3400 rd
32915.0000 19.4000 21.9900
32915.0000 19.7000 22.5500
999.9990 999.9990 999.9990
19 0 0 10 33140.0000
33140.0000 0.4000 21.7700
33140.0000 1.9000 20.7600
33140.0000 2.7000 20.5100
33140.0000 4.2000 19.1500 rg
33140.0000 4.3000 19.0600
33140.0000 6.4000 17.9200
33140.0000 11.3000 17.9200
33140.0000 12.6000 19.1400 rd
33140.0000 18.9000 21.8700
33140.0000 19.2000 22.1800
999.9990 999.9990 999.9990
20 0 0 10 33425.0000
33425.0000 0.0000 21.6800
33425.0000 0.5000 21.5300
33425.0000 2.2000 20.1600
33425.0000 3.0000 19.9400
33425.0000 4.8000 18.8200 rg
33425.0000 4.9000 18.7500
33425.0000 7.2000 17.8000
33425.0000 11.7000 17.8000
33425.0000 12.8000 18.8800 rd
33425.0000 18.2000 21.6800
999.9990 999.9990 999.9990
21 0 0 10 33685.0000
33685.0000 0.0000 21.5300
33685.0000 0.5000 21.3200
33685.0000 2.4000 19.6200
33685.0000 3.3000 19.4200
33685.0000 5.2000 18.5300 rg
33685.0000 5.4000 18.4700
33685.0000 7.9000 17.7000
33685.0000 12.0000 17.7000
33685.0000 12.9000 18.6500 rd
33685.0000 17.6000 21.5300
999.9990 999.9990 999.9990
22 0 0 9 33920.0000
33920.0000 0.6000 20.9800
33920.0000 2.6000 19.1300
33920.0000 3.6000 18.9400
33920.0000 5.7000 18.2600 rg
33920.0000 5.8000 18.2200
33920.0000 8.5000 17.6000
33920.0000 12.3000 17.6000
33920.0000 13.1000 18.4400 rd
33920.0000 17.0000 21.1300
999.9990 999.9990 999.9990
23 0 0 9 34095.0000
34095.0000 0.6000 20.9500
34095.0000 2.7000 18.7700
34095.0000 3.8000 18.5900
34095.0000 6.0000 18.0600 rg
34095.0000 6.1000 18.0300
34095.0000 9.0000 17.5300
34095.0000 12.5000 17.5300
34095.0000 13.2000 18.2800 rd
34095.0000 16.6000 20.9800
999.9990 999.9990 999.9990
24 0 0 10 34295.0000
34295.0000 0.0000 21.3600
34295.0000 0.6000 20.8300
34295.0000 2.4000 18.3500
34295.0000 3.5000 18.1900
34295.0000 5.8000 17.8300 rg
34295.0000 6.5000 17.3400
34295.0000 9.5000 17.3600
34295.0000 12.8000 17.4100
34295.0000 14.0000 18.1000 rd
34295.0000 16.1000 21.3600
999.9990 999.9990 999.9990
25 0 0 10 34334.0000 amontPontThivencel
34334.0000 0.0000 21.3600
34334.0000 0.6000 20.8300
34334.0000 2.4000 18.3500
34334.0000 3.5000 18.1900
34334.0000 5.8000 17.8300 rg
34334.0000 6.5000 17.3400
34334.0000 9.5000 17.3600
34334.0000 12.8000 17.4100
34334.0000 14.0000 18.1000 rd
34334.0000 16.1000 21.1300
999.9990 999.9990 999.9990
26 0 0 9 34335.0000 PontmThivencelle
34335.0000 2.9000 22.0000
34335.0000 2.9000 20.7400
34335.0000 2.9000 18.2900 rg
34335.0000 6.4000 17.7900
34335.0000 9.6000 17.2600
34335.0000 12.8000 17.2600
34335.0000 12.8000 18.3100 rd
34335.0000 12.8000 20.7400
34335.0000 12.8000 22.0000
999.9990 999.9990 999.9990
27 0 0 9 34343.0000 PontvThivencelle
34343.0000 2.9000 22.0000
34343.0000 2.9000 20.7400
34343.0000 2.9000 18.2900 rg
34343.0000 6.4000 17.7900
34343.0000 9.6000 17.2600
34343.0000 12.8000 17.2600
34343.0000 12.8000 18.2900 rd
34343.0000 12.8000 20.7400
34343.0000 12.8000 22.0000
999.9990 999.9990 999.9990
28 0 0 10 34345.0000 avalPontThivencell
34345.0000 0.0000 21.3600
34345.0000 0.6000 20.8300
34345.0000 2.4000 18.3500
34345.0000 3.5000 18.1900
34345.0000 5.8000 17.8300 rg
34345.0000 6.5000 17.3400
34345.0000 9.5000 17.2600
34345.0000 12.8000 17.4100
34345.0000 14.0000 18.1000 rd
34345.0000 16.1000 21.1300
999.9990 999.9990 999.9990
29 0 0 7 34405.0000
34405.0000 0.0000 21.1400
34405.0000 2.9000 17.8400 rg
34405.0000 6.4000 17.4400
34405.0000 9.6000 17.2000
34405.0000 12.8000 17.2200
34405.0000 13.9000 17.8400 rd
34405.0000 19.0000 21.0000
999.9990 999.9990 999.9990
30 0 0 7 34535.0000
34535.0000 0.0000 20.5900
34535.0000 2.9000 17.7400 rg
34535.0000 6.4000 17.2400
34535.0000 9.6000 17.0300
34535.0000 12.8000 17.0300
34535.0000 13.5000 17.7400 rd
34535.0000 15.8000 20.6000
999.9990 999.9990 999.9990
31 0 0 7 34705.0000
34705.0000 0.0000 20.5000
34705.0000 2.9000 17.6100 rg
34705.0000 6.4000 17.1100
34705.0000 9.6000 16.8500
34705.0000 12.8000 16.8500
34705.0000 14.0000 18.0000 rd
34705.0000 16.2000 20.5300
999.9990 999.9990 999.9990
32 0 0 7 34825.0000
34825.0000 0.0000 20.6200
34825.0000 2.9000 17.5200 rg
34825.0000 6.4000 17.0200
34825.0000 9.6000 16.7100
34825.0000 12.8000 16.7100
34825.0000 13.5000 17.5200 rd
34825.0000 16.2000 20.5000
999.9990 999.9990 999.9990
33 0 0 7 34995.0000
34995.0000 0.0000 20.3900
34995.0000 2.9000 17.3900 rg
34995.0000 6.4000 16.8900
34995.0000 9.6000 16.5300
34995.0000 12.8000 16.5300
34995.0000 13.6000 17.4300 rd
34995.0000 16.2000 20.3200
999.9990 999.9990 999.9990
34 0 0 7 35135.0000
35135.0000 0.0000 20.1600
35135.0000 2.9000 17.2900 rg
35135.0000 6.4000 16.7900
35135.0000 9.6000 16.4300
35135.0000 12.8000 16.4300
35135.0000 13.9000 17.3700 rd
35135.0000 16.2000 20.0600
999.9990 999.9990 999.9990
35 0 0 7 35360.0000
35360.0000 0.0000 19.8600
35360.0000 2.9000 17.1200 rg
35360.0000 6.4000 16.6200
35360.0000 9.6000 16.2600
35360.0000 12.8000 16.2600
35360.0000 13.7000 17.1200 rd
35360.0000 16.2000 19.4600
999.9990 999.9990 999.9990
36 0 0 7 35580.0000
35580.0000 0.0000 20.0000
35580.0000 2.9000 16.9500 rg
35580.0000 3.0000 16.0900
35580.0000 11.5000 16.0500
35580.0000 20.0000 16.0900
35580.0000 21.0000 17.0300 rd
35580.0000 23.0000 19.5000
999.9990 999.9990 999.9990
37 0 0 7 35920.0000
35920.0000 0.0000 20.0000
35920.0000 2.2000 16.0200 rg
35920.0000 3.0000 14.5500
35920.0000 11.5000 14.5000
35920.0000 20.0000 14.5500
35920.0000 20.9000 16.0200 rd
35920.0000 23.0000 19.5000
999.9990 999.9990 999.9990
38 0 0 7 36270.0000 S1
36270.0000 0.0000 20.0000
36270.0000 1.8000 17.0100 rg
36270.0000 3.0000 15.0800
36270.0000 11.5000 15.0500
36270.0000 20.0000 15.0800
36270.0000 21.3000 17.0100 rd
36270.0000 23.0000 19.5000
999.9990 999.9990 999.9990
39 0 0 7 36271.0000 S1bis
36271.0000 0.0000 20.0000
36271.0000 1.8000 17.0100 rg
36271.0000 3.0000 13.0800
36271.0000 11.5000 13.0500
36271.0000 20.0000 13.0800
36271.0000 21.3000 17.0100 rd
36271.0000 23.0000 19.5000
999.9990 999.9990 999.9990
+2
View File
@@ -0,0 +1,2 @@
0:00:00:00 15
0:00:01:00 15
+25
View File
@@ -0,0 +1,25 @@
0:00:00:00 5,53
0:11:37:00 5,72
0:16:17:00 5,82
0:22:57:00 5,92
1:00:00:00 6,6
1:00:57:00 8,04
1:02:29:00 14,3
1:04:38:00 24,4
1:08:48:00 40
1:11:27:00 46,3
1:13:47:00 48,8
1:16:07:00 47,9
1:17:17:00 44,8
1:20:23:00 27,8
1:21:57:00 24,3
2:01:15:00 19,2
2:05:15:00 15,8
2:11:25:00 11,5
2:11:57:00 11,1
2:13:17:00 10,5
2:19:07:00 9,84
2:23:59:00 8,43
3:04:51:00 7,02
3:09:43:00 5,61
3:14:35:00 5,53
+25
View File
@@ -0,0 +1,25 @@
**************** SINGULARITES **********************
*BieSec Nb Longueur Cote dev Cote charg Coef deb Impression
*===---===----------==========----------==========-----------------------------
*****************************************************
* Bief n° 1
*****************************************************
* Ouvrage au pk 36270.0 seuil_aval
*SeuilR type D
D 1 36270.00 18.250 15.500 0.000 0.400 99999.000 seuil palplanches
* Ouvrage au pk 31875.0 PontRS101
*OrificeR type O
O 1 31875.00 9.660 18.710 21.890 0.400 9999.000
*SeuilR type D
D 1 31875.00 14.000 22.890 0.000 0.400 99999.000
* Ouvrage au pk 34335.0 PontThivencelle
*SeuilR type D
D 1 34335.00 13.000 21.740 0.000 0.400 99999.000
*OrificeR type O
O 1 34335.00 9.070 17.280 20.740 0.400 9999.000
*****************************************************
* Bief n° 3
*****************************************************
* Ouvrage au pk 0.0 Orifice
*OrificeR type O
*O 3 0.000 6.000 19.000 19.001 0.400 20.000 Clapet_001
+1
View File
@@ -0,0 +1 @@
$Clapet_001 clapet
+2
View File
@@ -0,0 +1,2 @@
0:00:00:00 4
0:00:01:00 4
+24
View File
@@ -0,0 +1,24 @@
16,03 0
16,13 1,29
16,23 3,64
16,33 6,7
16,43 10,31
16,53 14,41
16,63 18,94
16,73 23,87
16,83 29,16
16,93 34,79
17,03 40,75
17,13 47,01
17,23 53,57
17,33 60,4
17,43 67,5
17,53 74,86
17,63 82,47
17,73 90,33
17,83 98,41
17,93 106,73
18,03 115,26
18,13 124,01
18,23 132,98
18,33 142,14
+9
View File
@@ -0,0 +1,9 @@
0:00:00:00 4
0:01:16:48 4
0:16:00:00 50
1:11:46:28 36,8
2:07:27:22 23,3
5:04:24:58 13,8
10:03:00:06 9,38
20:02:19:58 7,29
30:01:54:37 5,97
+10
View File
@@ -0,0 +1,10 @@
0:00:00:00 4
0:01:49:48 4
0:16:00:00 35
1:11:25:48 25
2:07:30:00 16,4
5:03:55:12 9,66
10:03:00:00 6,56
27:00:54:00 4,91
30:01:48:36 4
31:06:00:00 4
Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

+299
View File
@@ -0,0 +1,299 @@
%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,french]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=2cm}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{hyperref}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand{\noun}[1]{\textsc{#1}}
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
\makeatother
\usepackage{babel}
\addto\extrasfrench{%
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\begin{document}
\includegraphics[width=5cm]{img/Logo-INRAE_Transparent.png}
~
~
~
\begin{center}
Tutoriel pour Pamhyr2
Janvier 2024
\par\end{center}
~
~
\begin{center}
\textbf{\LARGE Modélisation 1D de la rivière } \\
\textbf{\LARGE Hogneau (Nord, France) avec Pamhyr2}
\par\end{center}{\LARGE \par}
~
~
\begin{center}
{\large INRAE Lyon-Grenoble Auvergne-Rhône-Alpes}
\par\end{center}{\large \par}
\begin{center}
RiverLy, Hydraulique des rivières
\par\end{center}
~
~
~
~
~
~
\begin{center}
\begin{tabular}{lll}
Autors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
& Théophile TERRAZ & theophile.terraz@inrae.fr\tabularnewline
& Lionel Pénard & lionel.penard@inrae.fr\tabularnewline
\end{tabular}
\par\end{center}
~
\pagebreak{}
\begin{center}
\tableofcontents{}
\par\end{center}
~
\pagebreak{}
% \section{Introduction}
%
% TODO
%
% \pagebreak{}
\section{Installer Pamhyr2}
Pamhyr2 peut être téléchargé ici : \url{https://gitlab.irstea.fr/theophile.terraz/pamhyr}.
\begin{center}
\includegraphics[width=15cm]{img/dl.png}
\par\end{center}
Utilisez le bouton de téléchargement GNU Linux ou Windows en fonction de votre système. Sous Windows, lancez le programme d'installation. Sous Linux, décompressez l'archive et lancez Pamhyr2.
\section{Créer une première étude}
Dans la fenêtre principale, cliquez sur \texttt{[Fichier] => [Nouvelle étude]} pour créer une nouvelle étude. Choisissez un nom, par exemple Hogneau, et validez
Cliquez sur \texttt{[Réseau] => [Editer le réseau]} pour créer les biefs de votre rivière. Dans cette fenêtre, vous devez définir un graphe orienté qui représente les biefs de votre réseau fluvial : les arêtes sont les biefs et les n½uds sont soit des conditions limites amont, soit des conditions limites aval, soit des jonctions entre biefs.
Appuyez sur le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} pour entrer dans le mode \textit{Ajout}. Créez deux n½uds en cliquant dans la zone grise de la fenêtre, et créez un lien en cliquant à nouveau sur chaque n½ud. Appuyez à nouveau sur \includegraphics[width=0.5cm]{img/gtk_add.png} pour quitter le mode \textit{Ajout}. Vous avez créé votre premier bief, avec un n½ud amont et un n½ud aval. Dans la partie inférieure de la fenêtre \textit{Editer le réseau hydrographique}, vous pouvez renommer les n½uds et les biefs. Comme le bief que vous avez créé est automatiquement sélectionné, toutes les étapes suivantes s'appliqueront à ce bief. La fenêtre doit se présenter comme suit :
\begin{center}
\includegraphics[width=15cm]{img/network.png}
\par\end{center}
Fermer la fenêtre \textit{Editer le réseau}.
\section{Editer la géometrie de la rivière}
Cliquez sur \texttt{[Géometrie] => [Editer la géometrie]} pour définir la géométrie du bief sélectionné. Cliquez sur le bouton \texttt{[Importer]} et sélectionnez le fichier \texttt{Data/Bief\_1.st}. Vous devriez voir :
\begin{center}
\includegraphics[width=15cm]{img/Geo.png}
\par\end{center}
Le panneau de gauche contient une liste de toutes les sections en travers avec leur nom et leur abscisse longitudinale (PK). Dans le graphique en haut à gauche, vous pouvez voir la vue de dessus de la rivière, dans le panneau en haut à droite, la coupe longitudinale de la rivière et dans le graphique en bas, vous pouvez voir la section en travers sélectionnée (bleu) ainsi que la suivante (pointillés violets) et la précédente (pointillés noirs). Vous pouvez vous déplacer dans la liste des sections en cliquant dans le tableau ou à l'aide de l'ascenseur situé entre le tableau et les graphiques.
Vous pouvez éditer la section en travers sélectionnée en cliquant sur l'icône \includegraphics[width=0.5cm]{"img/edit.png"}.
Sélectionnez la section en travers nommée \textit{PontRD101m} et ouvrez la fenêtre d'édition. Vous devriez voir :
\begin{center}
\includegraphics[width=15cm]{img/editsect.png}
\par\end{center}
Sur le panneau de gauche se trouve la liste de tous les points de la section, avec leurs coordonnées, leur nom et leur abscisse transversale. La coordonnée Z du point le plus haut est inscrite en bleu et celle du point le plus bas en rouge. Les points peuvent avoir un nom. Si un point portant le même nom existe dans toutes les sections d'un bief, il forme une ligne longitudinale (ou ligne directrice). Par exemple, nous avons ici \textit{rg} et \textit{rd} qui représentent la rive gauche et la rive droite du lit mineur.
Sur le graphique figure une projection de la section en travers. Vous pouvez utiliser \texttt{[ctrl + clic]} pour sélectionner un point dans le tracé et \texttt{[maj + clic]} pour sélectionner une ligne d'eau et visualiser des données géométriques utiles. Vous pouvez fermer la fenêtre d'édition de la section en travers et la fenêtre d'édition de la géométrie.
\section{Editer les conditions aux limites}
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions aux limites et apports ponctuels]} :
\begin{center}
\includegraphics[width=15cm]{img/boundary.png}
\par\end{center}
Utilisez le bouton \textit{ajouter} en haut à gauche de la fenêtre pour ajouter une condition limite pour le liquide.
Sur la nouvelle ligne, on peut cliquer pour sélectionner la ligne entière, et double-cliquer pour sélectionner la cellule.
Sélectionnez la cellule \textit{Type} pour donner un nom à la condition limite. Ici, nous définirons le débit mesuré lors de la crue de février 2002. Vous pouvez nommer cette condition limite "crue2002".
Sélectionner la cellule \textit{Type} et utiliser la combo box pour mettre une loi Q(t).
Sélectionnez la cellule \textit{Noeud} et attribuez cette condition au noeud amont.
Les noms des noeuds sont rappelés dans le réseau du panneau de droite.
Sélectionnez maintenant la ligne entière et cliquez sur le bouton d'édition \includegraphics[width=0.5cm]{"img/edit.png"}. Vous avez ouvert la fenêtre \textit{Éditer les conditions aux limites}.
Dans un éditeur de texte, ouvrez le fichier \texttt{Données/Fevrier\_2002.txt}. Copiez le contenu du fichier (par exemple avec \textit{ctrl+a} puis \textit{ctrl+c}) et collez-le dans le panneau gauche de la fenêtre \textit{Éditer les conditions aux limites} avec \textit{ctrl+v}. Vous pouvez maintenant voir la courbe de débit :
\begin{center}
\includegraphics[width=15cm]{img/fev2002.png}
\par\end{center}
Fermer cette fenêtre. Revenir sur la fenêtre \textit{Conditions aux limites}. Ajouter une nouvelle ligne, lui donner un nom, lui donner le type \textit{Z(T)} et l'associer au noeud aval du réseau. Ouvrez la fenêtre \textit{Éditer les conditions aux limites} (\includegraphics[width=0.5cm]{"img/edit.png"}). Ajoutez deux lignes. Dans la première, entrez le temps : 0.00.00 et Z : 15.000.
Dans la seconde, saisissez le temps : 1.00.00 et Z : 15.000. Cela crée une côte constante de l'eau en aval. Pour le calcul, Mage extrapolera continuellement l'élévation de l'eau.
Vous pouvez fermer les fenêtres \textit{Éditer les conditions aux limites} et \textit{Conditions aux limites}.
\section{Créer les conditions initiales}
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions initiales]}.
Si vous ne connaissez pas les conditions initiales de la côte de l'eau et du débit de la rivière, vous pouvez utiliser les boutons \texttt{[Générer une hauteur minimale]} ou \texttt{[Générer un débit constant]} pour laisser Pamhyr2 estimer une condition initiale à l'aide de la formule de Manning-Strickler.
Cliquez sur \texttt{[Générer à partir du débit]} et saisissez un débit de $4 m^3$ dans la fenêtre contextuelle pour générer une condition initiale de hauteur d'eau basée sur la formule de Manning-Strickler et un débit uniforme de $4 m^3$. Vous devriez voir :
\begin{center}
\includegraphics[width=15cm]{img/ic.png}
\par\end{center}
Fermer la fenêtre \textit{Conditions initiales}
\section{Editer les coefficients de frottement}
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Editer les frottements]}.
Vous devez d'abord définir des jeux de coefficients de Strickler. Cliquez sur \includegraphics[width=0.5cm]{"img/edit.png"} pour ouvrir la fenêtre \textit{Strickler}. Vous pouvez y créer des couples de coefficients de Strickler, le premier pour le lit mineur, le second pour le lit moyen. Cliquez quatre fois sur \textit{add} pour créer quatre nouveaux couples. Donnez-leur les valeurs suivantes :
\begin{center}
\includegraphics[width=15cm]{img/K.png}
\par\end{center}
Fermez la fenêtre \textit{Strickler}. Dans la fenêtre \textit{Editer les frottements}, ajoutez quatre lignes avec le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} pour créer quatre zones de frottement. Chaque zone est définie par un PK \textit{début} et de \textit{fin} PK et un couple \textit{begin} et \textit{end} couple de Strickler. Les couples de coefficients de Strickler à l'intérieur d'une zone sont interpolés à partir des couples \textit{begin} et \textit{end}. Dans notre cas, nous utiliserons des coefficients constants par zone. Définissez les zones comme suit :
\begin{center}
\includegraphics[width=15cm]{img/frictions.png}
\par\end{center}
La zone sélectionnée est surlignée en bleu. Fermez la fenêtre \textit{Editer les frottements}.
\section{Modélisation des ouvrages hydrauliques}
Parfois, il peut y avoir des sections en travers dans lesquelles les équations de Saint-Venant ne peuvent pas être utilisées pour modéliser l'écoulement de l'eau. Dans ce cas, nous devons définir une autre loi pour relier la côte de l'eau et le débit. C'est le cas, par exemple, au niveau des ponts lorsque la hauteur d'eau est trop élevée, ce qui entraîne un écoulement en charge. Pamhyr2 permet de définir différents ouvrages hydrauliques avec des lois paramétrables. Dans notre cas, on doit représenter un seuil et deux ponts comme ouvrages hydrauliques.
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Ouvrages hydrauliques]} pour ouvrir la fenêtre des ouvrages hydrauliques. Cliquez trois fois sur le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} pour créer trois ouvrages hydrauliques. Chaque structure peut avoir un nom et doit avoir une portée et un PK. Définissez-les comme suit :
\begin{center}
\includegraphics[width=15cm]{img/hs.png}
\par\end{center}
Sélectionnez le seuil aval et cliquez sur \includegraphics[width=0.5cm]{"img/edit.png"} pour modifier les lois de cette ouvrage. Les ouvrages hydrauliques sont composés d'ouvrages hydrauliques élémentaires. Vous pouvez combiner les lois de plusieurs ouvrages hydrauliques élémentaires pour créer votre ouvrage. Pour ce seuil, nous n'avons besoin que d'un ouvrage hydraulique élémentaire de type déversoir. Cliquez sur \includegraphics[width=0.5cm]{img/gtk_add.png} pour ajouter un nouvel ouvrage hydraulique élémentaire, donnez-lui le type \textit{seuil} et configurez-le comme suit :
\begin{center}
\includegraphics[width=15cm]{img/seuil.png}
\par\end{center}
Retournez à la fenêtre \textit{Ouvrages hydrauliques}.
Sélectionnez le pont RS101 et cliquez sur \includegraphics[width=0.5cm]{"img/edit.png"} pour éditer les lois de cet ouvrage. Un pont peut être modélisé comme une combinaison d'un orifice pour l'écoulement sous le pont et d'un déversoir pour l'écoulement au-dessus du pont. Créez deux ouvrages hydrauliques élémentaires et définissez-les comme suit :
\begin{center}
\includegraphics[width=15cm]{img/seuilRS101.png}
\includegraphics[width=15cm]{img/orificeRS101.png}
\par\end{center}
Revenez à la fenêtre \textit{Ouvrages hydrauliques} et appliquez la même procédure pour le pont de Thivencelle :
\begin{center}
\includegraphics[width=15cm]{img/orificeThivencelle.png}
\includegraphics[width=15cm]{img/seuilThivencelle.png}
\par\end{center}
Vous pouvez maintenant fermer les fenêtres \textit{Ouvrages hydrauliques}.
\section{Paramètres du solveur}
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Parameters numériques des solveurs]}.
Dans la fenêtre \textit{Paramètres du solveur}, sélectionnez l'onglet \textit{Mage v8}. Réglez les paramètres du solveur comme suit :
\begin{center}
\includegraphics[width=15cm]{img/param.png}
\par\end{center}
Fermer la fenêtre \textit{Paramètres du solveur}.
\section{Lancer la simulation}
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Lancer le solveur]}.
Sélectionnez \textit{Defaut-Mage - (Mage8)} et cliquez sur le bouton \textit{Exécuter}.
Deux fenêtres s'ouvrent : la fenêtre \textit{check list} et la fenêtre \textit{Log du solveur}.
La fenêtre \textit{Check list} donne quelques indications sur la validité de votre modèle, et la fenêtre \textit{Log du solveur} affiche les résultats du solveur.
À partir de la fenêtre \textit{Log du solveur}, vous pouvez réexécuter le calcul, et vous pouvez cliquer sur le bouton \textit{Résultats} pour ouvrir la fenêtre \textit{Résultats}.
\section{Visualiser les résultats}
il est aussi possible d'ouvrir la fenêtre \textit{Résultats} si vous avez fermé la fenêtre \textit{Log du solveur}, en cliquant sur \texttt{[Résultats] => [Visualiser les derniers résultats]} à partir de la fenêtre principale. Le panneau supérieur vous permet de sélectionner le bief, le panneau inférieur gauche vous permet de sélectionner une section en travers dans ce bief. Les trois diagrammes sur la droite montrent le bief et la section en travers de la même manière que dans la fenêtre \textit{Géométrie}. Vous pouvez utiliser le curseur du bas pour visualiser la côte de l'eau à différents pas de temps.
Pour visualiser le débit, passez à l'onglet \textit{Hydrogramme}.
Pour créer des tracés 2D personnalisés, cliquez sur le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} en haut à gauche de la fenêtre. Sélectionnez les valeurs que vous voulez sur les axes $X$ et $Y$ et cliquez sur \textit{OK}.
Vous pouvez maintenant voir un nouvel onglet avec le tracé 2D personnalisé dans le panneau droit de la fenêtre \textit{Results}.
\pagebreak{}
\end{document}
+268
View File
@@ -0,0 +1,268 @@
%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,french]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=2cm}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{hyperref}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand{\noun}[1]{\textsc{#1}}
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
\makeatother
\usepackage{babel}
\addto\extrasfrench{%
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\begin{document}
\includegraphics[width=5cm]{img/Logo-INRAE_Transparent.png}
~
~
~
\begin{center}
Tutorial for Pamhyr2
January 2024
\par\end{center}
~
~
\begin{center}
\textbf{\LARGE 1D Modeling of the Hogneau River (Nord, France)}
using Pamhyr2
\par\end{center}{\LARGE \par}
~
~
\begin{center}
{\large INRAE Lyon-Grenoble Auvergne-Rhône-Alpes}
\par\end{center}{\large \par}
\begin{center}
RiverLy, river hydraulics
\par\end{center}
~
~
~
~
~
~
\begin{center}
\begin{tabular}{lll}
Authors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
& Théophile Terraz & theophile.terraz@inrae.fr\tabularnewline
& Lionel Pénard & lionel.penard@inrae.fr\tabularnewline
\end{tabular}
\par\end{center}
~
\pagebreak{}
\begin{center}
\tableofcontents{}
\par\end{center}
~
\pagebreak{}
% \section{Introduction}
%
% TODO
%
% \pagebreak{}
\section{Install Pamhyr2}
Pamhyr2 can be downloaded from \url{https://gitlab.irstea.fr/theophile.terraz/pamhyr}.
\begin{center}
\includegraphics[width=15cm]{img/dl.png}
\par\end{center}
Use the GNU Linux or the Windows download button depending on your system. On windows, launch the installer. On Linux, unpack the archive and launch Pamhyr2.
\section{Create your first study}
On the main windows, click on \texttt{[Files] => [New Study]} to create a new study.
Click on \texttt{[River Network] => [Edit River Network]} to create the reaches of your river. In this window, you must define an oriented graph that represents the reaches of your river network: the edges are the reaches and the nodes are either upstream boundary conditions, downstream boundary conditions or junctions.
Press the \includegraphics[width=0.5cm]{img/gtk_add.png} to enter the \textit{add} mode. Create two nodes by clicking in the grey zone of the window, and create a link by clicking again on each node. press \includegraphics[width=0.5cm]{img/gtk_add.png} again to exit the \textit{add} mode. You created your first reach, with an upstream node and a downstream node. In the lower part of the \textit{Edit River Network} window you can rename the nodes and the reaches. As the reach you created is automaticaly selected, all the next steps will apply to this reach. The window should look like that:
\begin{center}
\includegraphics[width=15cm]{img/network.png}
\par\end{center}
Close the \textit{Edit River Network} window.
\section{Edit the river geometry}
Click on \texttt{[Geometry] => [Edit Geometry]} to define the geometry of the selected bief. Click on the \texttt{[Import]} button and select the file \texttt{Data/Bief\_1.st}. You should see:
\begin{center}
\includegraphics[width=15cm]{img/Geo.png}
\par\end{center}
On the left panel is a list of all the cross sections with their name and longitudinal abscisa. In the top left plot you can see the top view of the river, on the top right panel the longitudinal cross-section of the river and in the bottom plot you can see the selected cross-section (blue) along with the next one (dashed purple) and previous one (dashed black). You can move in the section list using the slider at the very right of the window.
You can edit the selected cross section by clicking on the \includegraphics[width=0.5cm]{"img/edit.png"} icon.
select the cross section named \textit{PontRD101m} and open the edition window. You should see:
\begin{center}
\includegraphics[width=15cm]{img/editsect.png}
\par\end{center}
On the left panel is the list of all the points of the section, with their coordinates, their name and their transversal absisa. The Z coordinate of the highest point is written in blue and the lowest in red. Points can have a name. If a point with the same name exists in every section in a reach, it forms a longitudinal line. For example, here we have \textit{rg} and \textit{rd} which represent the left bank and the right bank of the main chanel.
On the plot is a projection of the cross section. You can use \texttt{[ctrl + click]} to select a point in the plot and \texttt{[shift + click]} to select a water line and visualize usefull geometric data. You can close the cross section edition window and the geometry edition window.
\section{Edit the boundary conditions}
From the main window, click on \texttt{[Hydraulics] => [Boundary conditions and punctual contributions]}.You should see:
\begin{center}
\includegraphics[width=15cm]{img/boundary.png}
\par\end{center}
Use the \textit{add} button on the top left of the window to add a liquid boundary condition.
On the new line, click to select the whole line, double click to select the cell.
Select the \textit{Type} cell to give a name to the boundary condition. here, we will define the flow discharge mesured during the february 2002 flood. You can name this boundary condition "flood2002".
Select the \textit{Type} cell and use the combo box to put a Q(t) law.
Select the \textit{Node} cell and atribute this condition to the upstream node.
Names of the nodes are recalled in network in the right panel.
Now select the whole line and click on the edit button \includegraphics[width=0.5cm]{"img/edit.png"}. You opened the \textit{Edit Boundary Conditions} window.
On a text editor, open the \texttt{Data/Fevrier\_2002.txt} file. Copy the content of the file (for example with \textit{ctrl+a ctrl+c}) and paste it in the left panel of the \textit{Edit Boundary Conditions} window with \textit{ctrl+v}. You can now see the flow discharge curve:
\begin{center}
\includegraphics[width=15cm]{img/fev2002.png}
\par\end{center}
Close this window. Go back on the \textit{Boundary Conditions} window. Add a new line, give it a name, give it the textit{Z(T)} type and associate it to the downstream node of the network. Open the \textit{Edit Boundary Conditions} window (\includegraphics[width=0.5cm]{"img/edit.png"}). Add two lines. In the first one, enter time: 0.00.00 and Z: 15.000.
On the second one, time: 1.00.00 and Z: 15.000. It creates a constant downstream water elevation. For the computaion, Mage will extrapolate continuously the water elevation, that's why we only need to define one hour.
You can close the the \textit{Edit Boundary Conditions} and the \textit{Boundary Conditions} window.
\section{Create initial conditions}
From the main window, click on \texttt{[Hydraulics] => [Initial conditions]}.
If you don't know the initial conditions in water elevation and flow discharge of the river, you can use \texttt{[Generate minimal height]} or \texttt{[Generate from discharge]} buttons to let Pamhyr2 estimate an initial condition using the Manning-Strickler formula.
Click on \texttt{[Generate from discharge]} and enter a discharge of $4 m^3$ in the pop-up window to generate an initial water height condition based on the Manning-Strickler formula and a uniform discharge of $4 m^3$. You should see:
\begin{center}
\includegraphics[width=15cm]{img/ic.png}
\par\end{center}
Close the \textit{Initial conditions} window.
\section{Edit friction coefficients}
From the main window, click on \texttt{[Hydraulics] => [Edit friction]}.
You fist have to define sets of Strickler coefficients. Click on \includegraphics[width=0.5cm]{"img/edit.png"} to open the \textit{Strickler} window. Here you can create couples of Strickler coefficients, the first one for the minor bed, the second one for the medium bed. Click on \textit{add} four times to create four new couple. Give them the folowing values:
\begin{center}
\includegraphics[width=15cm]{img/K.png}
\par\end{center}
Close the \textit{Strickler} window. On the \textit{Edit friction} window, add four lines with the button \includegraphics[width=0.5cm]{img/gtk_add.png} to create four friction zones. Each zone is defined by a \textit{begin} and \textit{end} KP and a \textit{begin} and \textit{end} Strickler couple. The strickler coefficient couples inside a zone are interpolated from the \textit{begin} and \textit{end} couples. In our case, we will use constant coefficients per zone. Set the zones as follow:
\begin{center}
\includegraphics[width=15cm]{img/frictions.png}
\par\end{center}
The selected zone is highlighted in blue. Close the \textit{Edit friction} window.
\section{Model hydraulic structures}
Sometimes there can be cross-sections in which Shallow water equations can not be used to model the water flow. In that case, we have to define an other law to link the water elevation and the flow discharge. This is the case, for example, under bridges when the water elevation is too high, leading to a flow in charge. Pamhyr2 enables to define various hydraulic structures with laws that can be parametrized. In our case, a weir and two bridges have to be represented as hydraulic structures.
From the main window, click on \texttt{[Hydraulics] => [Hydraulic structures]} to open the hydraulic structures window. Click tree times on the \includegraphics[width=0.5cm]{img/gtk_add.png} button to create three hydraulic structures. Each structure can have a name and must have a reach and a KP. Set them as follow:
\begin{center}
\includegraphics[width=15cm]{img/hs.png}
\par\end{center}
Select the downstream weir and click on \includegraphics[width=0.5cm]{"img/edit.png"} to edit the laws of this structure. Hydraulic structures are composed of basic hydraulic structures. You can combine the laws of several basic hydraulic structures to setup your structure. For this weir, we only need a weir basic hydraulic structure. Click on \includegraphics[width=0.5cm]{img/gtk_add.png} to add a new basic hydraulic structure, give it the \textit{weir} type and set it up as folow:
\begin{center}
\includegraphics[width=15cm]{img/seuil.png}
\par\end{center}
Go back to the \textit{hydraulic structures} window.
Select the RS101 bridge and click on \includegraphics[width=0.5cm]{"img/edit.png"} to edit the laws of this structure. A bridge can be modeled as a combination of an orifice for the flow under the bridge and a weir for the flow over the bridge. Create two basic hydraulic structures and set them as folow:
\begin{center}
\includegraphics[width=15cm]{img/seuilRS101.png}
\includegraphics[width=15cm]{img/orificeRS101.png}
\par\end{center}
Go back to the \textit{hydraulic structures} window and aply the same procedure for the Thivencelle bridge:
\begin{center}
\includegraphics[width=15cm]{img/orificeThivencelle.png}
\includegraphics[width=15cm]{img/seuilThivencelle.png}
\par\end{center}
You can now close the \textit{hydraulic structures} windows.
\section{Solver parameters}
From the main window, click on \texttt{[Execute] => [Numerical parameters for solvers]}.
In the window \textit{solver parameters} select the \textit{Mage v8} tab. Set the solver parameters as follow:
\begin{center}
\includegraphics[width=15cm]{img/param.png}
\par\end{center}
Close the \textit{solver parameters} window.
\section{Run the simulation}
From the main window, click on \texttt{[Execute] => [Run solver]}.
Select \textit{Defaut-Mage - (Mage8)} anc click on the \textit{Run} button.
It will open two windows: the \textit{Check list} window and the \textit{Solver log} window.
The \textit{Check list} window gives som hints about the validity of your model, and the \textit{Solver log} window displays the outputs of the solver.
From the \textit{Solver log} window you can re-run the computation, and from the textit{Solver log} window you can click on the \textit{Results} button to open the \textit{Results} window.
\section{Visualize the results}
If you closed the \textit{Solver log} window, you can click on \texttt{[Results] => [Visualize last results]} from the main window to open the \textit{Results} window. The top lets panel let you select your reach, the bottom left panel lets you select a cross-section in that reach. the three plots on the right show the reach and the cross-section the same way than in the \textit{Geometry} window. You can use the bottom slider to visualize the water elevation at different timesteps.
To visualize the flow discharge, switch to the \textit{Hydrograph} tab.
To create custom 2D plots, click on the \includegraphics[width=0.5cm]{img/gtk_add.png} button on the top left of the window. Select the values you want on the $X$ and $Y$ axis and click on \textit{OK}.
You can now see a new tab with the custom 2D plot in the right panel of the \textit{Results} window.
\pagebreak{}
\end{document}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11 -3
View File
@@ -1,10 +1,18 @@
#! /bin/sh #! /bin/sh
# Build the PDF echo " PDF documentation.org"
emacs -nw --batch \
emacs -Q -q -nw --batch \
--eval "(require 'org)" \ --eval "(require 'org)" \
--eval "(require 'ox-latex)" \ --eval "(require 'ox-latex)" \
--eval "(load-file \"../tools/setup.el\")" \ --eval "(load-file \"../tools/setup.el\")" \
--file ./documentation.org \ --file ./documentation.org \
-f org-latex-export-to-pdf -f org-latex-export-to-pdf
echo " HTML documentation.org"
emacs -nw --batch \
--eval "(require 'org)" \
--eval "(require 'ox-latex)" \
--eval "(require 'ox-html)" \
--eval "(load-file \"../tools/setup.el\")" \
--file ./documentation.org \
-f org-html-export-to-html
View File
Whitespace-only changes.
+12
View File
@@ -0,0 +1,12 @@
PyQt5==5.15.4
PyQt5-Qt5==5.15.2
PyQt5-sip==12.12.2
PyQtWebEngine==5.15.6
QScintilla>=2.14.1
pyqtgraph>=0.12.1
matplotlib>=3.4.1
numpy>=1.24.2
colorama>=0.4.3
pyinstaller>=5.11.0
shapely>=2.0.1
lxml>=4.9.3
+30 -13
View File
@@ -25,6 +25,7 @@ echo " *** SETUP ENV"
python3 -m venv linux-pamhyr-venv python3 -m venv linux-pamhyr-venv
. linux-pamhyr-venv/bin/activate . linux-pamhyr-venv/bin/activate
pip3 install -U pip
pip3 install -r ../requirements.txt pip3 install -r ../requirements.txt
echo " *** PYINSTALL" echo " *** PYINSTALL"
@@ -43,18 +44,22 @@ cd $OLD_PWD
echo " *** COPY DATA" echo " *** COPY DATA"
mkdir -p dist/pamhyr/View/ui mkdir -p dist/pamhyr/_internal/View/ui
mkdir -p dist/pamhyr/View/ui/Widgets mkdir -p dist/pamhyr/_internal/View/ui/Widgets
cp -r ../src/View/ui/ressources/ dist/pamhyr/View/ui/ cp -r ../src/View/ui/ressources/ dist/pamhyr/_internal/View/ui/
cp -r ../src/View/ui/Widgets/*.ui dist/pamhyr/View/ui/Widgets/ cp -r ../src/View/ui/Widgets/*.ui dist/pamhyr/_internal/View/ui/Widgets/
cp -r ../src/View/ui/*.ui dist/pamhyr/View/ui/ cp -r ../src/View/ui/*.ui dist/pamhyr/_internal/View/ui/
mkdir -p dist/pamhyr/lang mkdir -p dist/pamhyr/lang
cp -r ../src/lang/*.qm dist/pamhyr/lang/ cp -r ../src/lang/*.qm dist/pamhyr/lang/
cp ../VERSION dist/pamhyr/ mkdir dist/pamhyr/_internal/
cp ../AUTHORS dist/pamhyr/ #cp ../VERSION dist/pamhyr/_internal/
cp ../LICENSE dist/pamhyr/ VERSION=$(cat ../VERSION)
echo "local-build-$VERSION" > dist/pamhyr/_internal/VERSION
cp ../AUTHORS dist/pamhyr/_internal/
cp ../LICENSE dist/pamhyr/_internal/
cp ../src/motd.txt dist/pamhyr/_internal/
mkdir -p dist/pamhyr/mage/ mkdir -p dist/pamhyr/mage/
cp ../mage/mage dist/pamhyr/mage/ cp ../mage/mage dist/pamhyr/mage/
@@ -65,6 +70,18 @@ mkdir -p dist/pamhyr/tests_cases/
mkdir -p dist/pamhyr/tests_cases/Saar mkdir -p dist/pamhyr/tests_cases/Saar
cp ../tests_cases/Saar/Saar.pamhyr dist/pamhyr/tests_cases/Saar/ cp ../tests_cases/Saar/Saar.pamhyr dist/pamhyr/tests_cases/Saar/
mkdir -p dist/pamhyr/doc/
cp ../doc/dev/documentation.pdf dist/pamhyr/doc/Pamhyr2-dev.pdf
cp ../doc/dev/documentation.html dist/pamhyr/doc/Pamhyr2-dev.html
cp ../doc/users/documentation.pdf dist/pamhyr/doc/Pamhyr2-users.pdf
cp ../doc/users/documentation.html dist/pamhyr/doc/Pamhyr2-users.html
mkdir -p dist/pamhyr/doc/images
cp ../doc/users/images/* dist/pamhyr/doc/images/
cp ../doc/dev/images/* dist/pamhyr/doc/images/
cp ../doc/images/* dist/pamhyr/doc/images/
echo " *** MAKE SRC PACKAGE" echo " *** MAKE SRC PACKAGE"
OLD_PWD=$PWD OLD_PWD=$PWD
@@ -76,11 +93,11 @@ mv ../pamhyr-src.tar.gz ./
echo " *** MAKE BIN PACKAGE" echo " *** MAKE BIN PACKAGE"
OLD_PWD=$PWD # OLD_PWD=$PWD
cd dist/ # cd dist/
tar --xz -cf pamhyr-gnulinux-amd64.tar.xz pamhyr --checkpoint=.100 # tar --xz -cf pamhyr-gnulinux-amd64.tar.xz pamhyr --checkpoint=.100
cd $OLD_PWD # cd $OLD_PWD
mv dist/pamhyr-gnulinux-amd64.tar.xz ./ # mv dist/pamhyr-gnulinux-amd64.tar.xz ./
echo " *** DONE" echo " *** DONE"
+35 -13
View File
@@ -16,32 +16,34 @@ rem along with this program. If not, see <https://www.gnu.org/licenses/>.
@ECHO ON @ECHO ON
mkdir pamhyr\pamhyr mkdir pamhyr\pamhyr\_internal
xcopy /s /e /y dist\pamhyr pamhyr\pamhyr xcopy /s /e /y dist\pamhyr pamhyr\pamhyr
rem Copy data rem Copy data
mkdir pamhyr\pamhyr\lang mkdir pamhyr\pamhyr\_internal\lang
mkdir pamhyr\pamhyr\View\ui\ressources mkdir pamhyr\pamhyr\_internal\View\ui\ressources
mkdir pamhyr\pamhyr\View\ui\Widgets mkdir pamhyr\pamhyr\_internal\View\ui\Widgets
rem UI rem UI
copy /y ..\src\View\ui\ressources\ pamhyr\pamhyr\View\ui\ressources copy /y ..\src\View\ui\ressources\ pamhyr\pamhyr\_internal\View\ui\ressources
copy /y ..\src\View\ui\Widgets\*.ui pamhyr\pamhyr\View\ui\Widgets copy /y ..\src\View\ui\Widgets\*.ui pamhyr\pamhyr\_internal\View\ui\Widgets
copy /y ..\src\View\ui\*.ui pamhyr\pamhyr\View\ui\ copy /y ..\src\View\ui\*.ui pamhyr\pamhyr\_internal\View\ui\
rem Lang rem Lang
copy /y ..\src\lang\*.qm pamhyr\pamhyr\lang\ copy /y ..\src\lang\*.qm pamhyr\pamhyr\_internal\lang\
rem Information rem Information
copy /y ..\VERSION pamhyr\pamhyr copy /y ..\VERSION pamhyr\pamhyr\_internal
copy /y ..\AUTHORS pamhyr\pamhyr copy /y ..\AUTHORS pamhyr\pamhyr\_internal
copy /y ..\LICENSE pamhyr\pamhyr copy /y ..\LICENSE pamhyr\pamhyr\_internal
copy /y ..\src\motd.txt pamhyr\pamhyr\_internal
rem MAGE rem MAGE
mkdir pamhyr\mage mkdir pamhyr\mage
copy /y ..\mage-windows\mage.exe pamhyr\mage\ copy /y ..\mage-windows\mage.exe pamhyr\mage\
copy /y ..\mage-windows\mage_extraire.exe pamhyr\mage\ copy /y ..\mage-windows\mage_extraire.exe pamhyr\mage\
copy /y ..\mage-windows\mailleurPF.exe pamhyr\mage\ copy /y ..\mage-windows\mailleurTT.exe pamhyr\mage\
copy /y ..\mage-windows\libbief.dll pamhyr\mage\
rem Copy tests_cases rem Copy tests_cases
mkdir pamhyr\tests_cases mkdir pamhyr\tests_cases
@@ -50,5 +52,25 @@ copy /y ..\tests_cases\Saar\Saar.pamhyr pamhyr\tests_cases\Saar\
rem Documentations rem Documentations
mkdir pamhyr\doc mkdir pamhyr\doc
copy /y ..\doc\users\documentation.pdf pamhyr\doc\Pamhyr2-users.pdf mkdir pamhyr\doc\images
rem copy /y ..\doc\users\documentation.pdf pamhyr\doc\Pamhyr2-users.pdf
copy /y ..\doc\dev\documentation.pdf pamhyr\doc\Pamhyr2-dev.pdf copy /y ..\doc\dev\documentation.pdf pamhyr\doc\Pamhyr2-dev.pdf
copy /y ..\doc\mage8.pdf pamhyr\doc\mage8.pdf
rem copy /y ..\doc\users\documentation.html pamhyr\doc\Pamhyr2-users.html
copy /y ..\doc\dev\documentation.html pamhyr\doc\Pamhyr2-dev.html
copy /y ..\doc\users\images\* pamhyr\doc\images
copy /y ..\doc\dev\images\* pamhyr\doc\images
copy /y ..\doc\images\* pamhyr\doc\images
rem Tuto
mkdir pamhyr\doc\Tuto1\
mkdir pamhyr\doc\Tuto1\data
copy /y ..\doc\users\Tuto1\Hogneau_Engees2022.pdf pamhyr\doc\Tuto1\Hogneau_Engees2022.pdf
copy /y ..\doc\users\Tuto1\step-by-step.pdf pamhyr\doc\Tuto1\Tuto1-en.pdf
copy /y ..\doc\users\Tuto1\pas-a-pas.pdf pamhyr\doc\Tuto1\Tuto1-fr.pdf
copy /y ..\doc\users\Tuto1\*.pamhyr pamhyr\doc\Tuto1\
copy /y ..\doc\users\Tuto1\data\* pamhyr\doc\Tuto1\data\
rem TP charriage
mkdir pamhyr\doc\TP_charriage
copy /y ..\doc\users\TP_charriage\ pamhyr\doc\TP_charriage
+6 -2
View File
@@ -5,7 +5,7 @@
Name "Pamhyr2" Name "Pamhyr2"
OutFile "pamhyr-windows.exe" OutFile "pamhyr-windows.exe"
LicenseData "pamhyr\pamhyr\LICENSE" LicenseData "pamhyr\pamhyr\_internal\LICENSE"
LicenseText "I Agree" LicenseText "I Agree"
RequestExecutionLevel admin RequestExecutionLevel admin
@@ -39,11 +39,14 @@ Section "Pamhyr2"
SectionEnd SectionEnd
Section "Start Menu Shortcuts" Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\Pamhyr2" CreateDirectory "$SMPROGRAMS\Pamhyr2"
CreateShortcut "$SMPROGRAMS\Pamhyr2\Uninstall.lnk" "$INSTDIR\uninstall.exe" CreateShortcut "$SMPROGRAMS\Pamhyr2\Uninstall.lnk" "$INSTDIR\uninstall.exe"
CreateShortcut "$SMPROGRAMS\Pamhyr2\Pamhyr2.lnk" "$INSTDIR\pamhyr\pamhyr.exe" CreateShortcut "$SMPROGRAMS\Pamhyr2\Pamhyr2.lnk" "$INSTDIR\pamhyr\pamhyr.exe"
SectionEnd
Section "Desktop Shortcuts"
SetShellVarContext all
CreateShortcut "$desktop\Pamhyr2.lnk" "$instdir\pamhyr\pamhyr.exe"
SectionEnd SectionEnd
Section "Uninstall" Section "Uninstall"
@@ -51,6 +54,7 @@ Section "Uninstall"
DeleteRegKey HKLM SOFTWARE\NSIS_Pamhyr2 DeleteRegKey HKLM SOFTWARE\NSIS_Pamhyr2
Delete "$SMPROGRAMS\Pamhyr2\*.lnk" Delete "$SMPROGRAMS\Pamhyr2\*.lnk"
Delete "$desktop\Pamhyr2.lnk"
RMDir "$SMPROGRAMS\Pamhyr2" RMDir "$SMPROGRAMS\Pamhyr2"
RMDir /R "$INSTDIR" RMDir /R "$INSTDIR"
+45 -16
View File
@@ -81,13 +81,42 @@ wine pyinstaller ../src/pamhyr.py -y
echo " *** COPY DATA" echo " *** COPY DATA"
mkdir -p dist/pamhyr/View/ui mkdir -p pamhyr
cp -r ../src/View/ui/ressources/ dist/pamhyr/View/ui/ mkdir -p pamhyr/pamhyr
cp -r ../src/View/ui/Widgets/*.ui dist/pamhyr/View/ui/
cp -r ../src/View/ui/*.ui dist/pamhyr/View/ui/
cp ../VERSION dist/pamhyr/ # Copy Pamhyr info
cp ../AUTHORS dist/pamhyr/ cp -v ../VERSION pamhyr/pamhyr/
cp -v ../AUTHORS pamhyr/pamhyr/
cp -v ../LICENSE pamhyr/pamhyr/
# Copy mage
mkdir -p pamhyr/mage
cp -v ../mage/* pamhyr/mage/
# Copy Pamhyr
cp -r dist/pamhyr pamhyr/
# Copy Pamhyr resources
mkdir -p pamhyr/pamhyr/View
mkdir -p pamhyr/pamhyr/View/ui
mkdir -p pamhyr/pamhyr/View/ui/Widgets
cp -r ../src/View/ui/*.ui pamhyr/pamhyr/View/ui/
cp -r ../src/View/ui/ressources/ pamhyr/pamhyr/View/ui
cp -r ../src/View/ui/Widgets/*.ui pamhyr/pamhyr/View/ui/Widgets
# Copy lang
mkdir -p pamhyr/pamhyr/lang
cp -r ../src/lang/*.qm pamhyr/pamhyr/lang
# Copy tests cases
mkdir -p pamhyr/tests_cases/
mkdir -p pamhyr/tests_cases/Saar
cp ../tests_cases/Saar/Saar.pamhyr pamhyr/tests_cases/Saar/
# Copy documentations
mkdir -p pamhyr/doc/
cp ../doc/users/documentation.pdf pamhyr/doc/Pamhyr2-users.pdf
cp ../doc/dev/documentation.pdf pamhyr/doc/Pamhyr2-dev.pdf
# Update TS and build QM files # Update TS and build QM files
OLD_PWD=$PWD OLD_PWD=$PWD
@@ -102,19 +131,19 @@ echo " *** MAKE PACKAGES"
echo " TAR pamhyr-win-amd64.tar.xz" echo " TAR pamhyr-win-amd64.tar.xz"
OLD_PWD=$PWD # OLD_PWD=$PWD
cd dist/ # cd dist/
tar --xz -cf pamhyr-win-amd64.tar.xz pamhyr --checkpoint=.100 # tar --xz -cf pamhyr-win-amd64.tar.xz pamhyr --checkpoint=.100
cd $OLD_PWD # cd $OLD_PWD
mv dist/pamhyr-win-amd64.tar.xz ./ # mv dist/pamhyr-win-amd64.tar.xz ./
echo " ZIP pamhyr-win-amd64.zip" echo " ZIP pamhyr-win-amd64.zip"
OLD_PWD=$PWD # OLD_PWD=$PWD
cd dist/ # cd dist/
zip -r pamhyr-win-amd64.zip pamhyr/ # zip -r pamhyr-win-amd64.zip pamhyr/
cd $OLD_PWD # cd $OLD_PWD
mv dist/pamhyr-win-amd64.zip ./ # mv dist/pamhyr-win-amd64.zip ./
echo " *** MAKE INSTALLER" echo " *** MAKE INSTALLER"
+4 -1
View File
@@ -1,9 +1,12 @@
PyQt5==5.15.4 PyQt5==5.15.4
PyQt5-Qt5==5.15.2 PyQt5-Qt5==5.15.2
PyQt5-sip==12.8.1 PyQt5-sip==12.12.2
#PyQtWebEngine==5.15.6
QScintilla>=2.14.1
pyqtgraph>=0.12.1 pyqtgraph>=0.12.1
matplotlib>=3.4.1 matplotlib>=3.4.1
numpy>=1.24.2 numpy>=1.24.2
colorama>=0.4.3 colorama>=0.4.3
pyinstaller>=5.11.0 pyinstaller>=5.11.0
shapely>=2.0.1 shapely>=2.0.1
lxml>=4.9.3
+8
View File
@@ -20,12 +20,14 @@ from enum import Enum
from Model.Except import NotImplementedMethodeError from Model.Except import NotImplementedMethodeError
class STATUS(Enum): class STATUS(Enum):
UNKNOWN = -1 UNKNOWN = -1
OK = 0 OK = 0
WARNING = 1 WARNING = 1
ERROR = 2 ERROR = 2
class AbstractModelChecker(object): class AbstractModelChecker(object):
def __init__(self): def __init__(self):
self._name = "" self._name = ""
@@ -62,6 +64,12 @@ class AbstractModelChecker(object):
# Abstract function # Abstract function
def _run(self, study):
from Model.Study import Study
thread_study = Study.open(study._filename)
self.run(thread_study)
def run(self, study): def run(self, study):
"""Run checker function """Run checker function
+55 -3
View File
@@ -24,11 +24,13 @@ from tools import flatten, timer
from PyQt5.QtCore import QCoreApplication from PyQt5.QtCore import QCoreApplication
from Checker.Checker import AbstractModelChecker, STATUS from Checker.Checker import AbstractModelChecker, STATUS
from Checker.Study import StudyGeometryChecker
_translate = QCoreApplication.translate _translate = QCoreApplication.translate
class MageNetworkGraphChecker(AbstractModelChecker): class MageNetworkGraphChecker(AbstractModelChecker):
def __init__(self, connectivity = True): def __init__(self, connectivity=True):
super(MageNetworkGraphChecker, self).__init__() super(MageNetworkGraphChecker, self).__init__()
self._mode_conn = connectivity self._mode_conn = connectivity
@@ -38,8 +40,10 @@ class MageNetworkGraphChecker(AbstractModelChecker):
else: else:
mode = "cycle" mode = "cycle"
self._name = _translate("Checker", f"Mage network graph {mode} checker") self._name = _translate(
self._description = _translate("Checker", "Check if the network graph is valid") "Checker", f"Mage network graph {mode} checker")
self._description = _translate(
"Checker", "Check if the network graph is valid")
@timer @timer
def _connectivity(self, summary, status, graph): def _connectivity(self, summary, status, graph):
@@ -192,3 +196,51 @@ class MageNetworkGraphChecker(AbstractModelChecker):
self._summary = summary self._summary = summary
self._status = status self._status = status
return True return True
class MageGeometryGuideLineChecker(StudyGeometryChecker):
def __init__(self):
super(MageGeometryGuideLineChecker, self).__init__()
self._name = _translate("Checker", "Mage geometry guide line checker")
self._description = _translate(
"Checker",
"Check if exists geometry guide line is correctly defined \
for each reaches of the study"
)
self._reachs = []
def run(self, study):
ok = super(MageGeometryGuideLineChecker, self).run(study)
if not ok:
return ok
river = study.river
edges = river.enable_edges()
gls = []
for edge in edges:
comp, incomp = edge.reach.compute_guidelines()
if len(incomp) != 0:
self._status = STATUS.WARNING
self._summary = "incomplete_guideline"
return False
gls.append(comp)
profiles = edge.reach.profiles
for profile in profiles:
if not profile.has_standard_named_points():
self._status = STATUS.WARNING
self._summary = "no_standard_guileline_defined"
return False
for gl in gls[1:]:
if len(gls[0].symmetric_difference(gl)) != 0:
self._status = STATUS.WARNING
self._summary = "no_all_reaches_do_not_have_same_defined"
return False
return ok
+9 -5
View File
@@ -30,7 +30,8 @@ class StudyNetworkReachChecker(AbstractModelChecker):
super(StudyNetworkReachChecker, self).__init__() super(StudyNetworkReachChecker, self).__init__()
self._name = _translate("Checker", "Study network reach checker") self._name = _translate("Checker", "Study network reach checker")
self._description = _translate("Checker", "Check if exists at least one reach for study") self._description = _translate(
"Checker", "Check if exists at least one reach for study")
def run(self, study): def run(self, study):
if study is None: if study is None:
@@ -54,12 +55,14 @@ class StudyNetworkReachChecker(AbstractModelChecker):
self._status = STATUS.OK self._status = STATUS.OK
return True return True
class StudyGeometryChecker(AbstractModelChecker): class StudyGeometryChecker(AbstractModelChecker):
def __init__(self): def __init__(self):
super(StudyGeometryChecker, self).__init__() super(StudyGeometryChecker, self).__init__()
self._name = _translate("Checker", "Study geometry checker") self._name = _translate("Checker", "Study geometry checker")
self._description = _translate("Checker", "Check if exists geometry for each reach of study") self._description = _translate(
"Checker", "Check if exists geometry for each reach of study")
self._reachs = [] self._reachs = []
def run(self, study): def run(self, study):
@@ -79,15 +82,15 @@ class StudyGeometryChecker(AbstractModelChecker):
self._summary = "no_river_found" self._summary = "no_river_found"
return False return False
edges = list(filter(lambda e: e.is_enable(), river.edges())) edges = river.enable_edges()
if len(edges) == 0: if len(edges) == 0:
self._status = STATUS.ERROR self._status = STATUS.ERROR
self._summary = "no_reach_defined" self._summary = "no_reach_defined"
return False return False
for edge in edges: for edge in edges:
if edge.is_enable() and len(edge.reach.profiles) < 3: if len(edge.reach.profiles) < 2:
summary = f"no_geometry_defined" summary = "no_geometry_defined"
status = STATUS.ERROR status = STATUS.ERROR
ok = False ok = False
self._reachs.append(edge) self._reachs.append(edge)
@@ -128,6 +131,7 @@ class DummyWARNING(AbstractModelChecker):
return True return True
class DummyERROR(AbstractModelChecker): class DummyERROR(AbstractModelChecker):
def __init__(self): def __init__(self):
super(DummyERROR, self).__init__() super(DummyERROR, self).__init__()
+27
View File
@@ -0,0 +1,27 @@
# AMeshingTool.py -- Pamhyr
# Copyright (C) 2023 INRAE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
from Model.Except import NotImplementedMethodeError
class AMeshingTool(object):
def __init__(self):
super(AMeshingTool, self).__init__()
def meshing(self, reach, **kwargs):
raise NotImplementedMethodeError(self, self.meshing)
+322
View File
@@ -0,0 +1,322 @@
# Mage.py -- Pamhyr
# Copyright (C) 2023 INRAE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
import os
import logging
import tempfile
from ctypes import (
cdll,
byref, Structure,
c_char_p, c_wchar_p,
create_string_buffer,
POINTER, c_void_p,
c_int, c_double, c_bool
)
from PyQt5.QtCore import QProcess
from tools import logger_color_red, logger_color_reset
from Meshing.AMeshingTool import AMeshingTool
logger = logging.getLogger()
class MeshingWithMage(AMeshingTool):
def __init__(self):
super(MeshingWithMage, self).__init__()
self._init_bief_lib()
def _init_bief_lib(self):
self._bief_lib = cdll.LoadLibrary(self._lib_path())
self._init_c_init_bief_from_geo_file()
self._init_c_get_nb_sections()
self._init_c_get_nb_points_section()
self._init_c_set_bief_name()
self._init_c_st_to_m_compl()
self._init_c_interpolate_profils_pas_transversal()
self._init_c_purge()
self._init_c_output_bief()
@classmethod
def _lib_path(cls):
ext = "so" if os.name == "posix" else "dll"
return os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..", "..", "..", "mage", f"libbief.{ext}"
)
)
def _init_c_init_bief_from_geo_file(self):
self._c_init_bief_from_geo_file = getattr(
self._bief_lib, 'c_init_bief_from_geo_file'
)
self._c_init_bief_from_geo_file.argtypes = [
c_char_p, POINTER(c_int), POINTER(c_int)
]
self._c_init_bief_from_geo_file.restype = None
def _init_c_get_nb_sections(self):
self._c_get_nb_sections = getattr(self._bief_lib, 'c_get_nb_sections')
self._c_get_nb_sections.argtypes = [POINTER(c_int)]
self._c_get_nb_sections.restype = None
def _init_c_get_nb_points_section(self):
self._c_get_nb_points_section = getattr(
self._bief_lib, 'c_get_nb_points_section'
)
self._c_get_nb_points_section.argtypes = [
POINTER(c_int), POINTER(c_int)
]
self._c_get_nb_points_section.restype = None
def _init_c_set_bief_name(self):
self._c_set_bief_name = getattr(self._bief_lib, 'c_set_bief_name')
self._c_set_bief_name.argtypes = [c_char_p]
self._c_set_bief_name.restype = None
def _init_c_st_to_m_compl(self):
self._c_st_to_m_compl = getattr(self._bief_lib, 'c_st_to_m_compl')
self._c_st_to_m_compl.argtypes = [POINTER(c_int), c_char_p, c_char_p]
self._c_st_to_m_compl.restype = None
def _init_c_interpolate_profils_pas_transversal(self):
self._c_interpolate_profils_pas_transversal = getattr(
self._bief_lib, 'c_interpolate_profils_pas_transversal'
)
self._c_interpolate_profils_pas_transversal.argtypes = [
POINTER(c_int), POINTER(c_int),
c_char_p, c_char_p,
POINTER(c_double), POINTER(c_bool),
POINTER(c_int), POINTER(c_bool)
]
self._c_interpolate_profils_pas_transversal.restype = None
def _init_c_purge(self):
self._c_purge = getattr(self._bief_lib, 'c_purge')
self._c_purge.argtypes = None
self._c_purge.restype = None
def _init_c_output_bief(self):
self._c_output_bief = getattr(self._bief_lib, 'c_output_bief')
self._c_output_bief.argtypes = [c_char_p]
self._c_output_bief.restype = None
#####################
# Binding functions #
#####################
def init_bief_from_geo_file(self, name, with_charriage, with_water):
cname = create_string_buffer(name.encode())
self._c_init_bief_from_geo_file(
cname,
byref(c_int(with_charriage)),
byref(c_int(with_water))
)
def get_nb_sections(self):
nb_sections = c_int(0)
self._c_get_nb_sections(byref(nb_sections))
return nb_sections.value
def get_nb_points_section(self, section):
nb_points = c_int(0)
self._c_get_nb_points_section(
byref(c_int(section)), byref(nb_points)
)
return nb_points.value
def set_bief_name(self, name):
cname = create_string_buffer(name.encode())
self._c_set_bief_name(cname)
def st_to_m_compl(self, npoints, tag1=' ', tag2=' '):
cnpoints = c_int(npoints)
ctag1 = create_string_buffer(tag1.encode())
ctag2 = create_string_buffer(tag2.encode())
self._c_st_to_m_compl(byref(cnpoints), ctag1, ctag2)
def interpolate_profils_pas_transversal(self, limite1, limite2,
directrice1, directrice2,
pas, lplan=False,
lm=3, lineaire=False):
climite1 = c_int(limite1)
climite2 = c_int(limite2)
cpas = c_double(pas)
clplan = c_bool(lplan)
clm = c_int(lm)
clineaire = c_bool(lineaire)
cdirectrice1 = create_string_buffer(directrice1.encode())
cdirectrice2 = create_string_buffer(directrice2.encode())
self._c_interpolate_profils_pas_transversal(
byref(climite1), byref(climite2),
cdirectrice1, cdirectrice2,
byref(cpas), byref(clplan),
byref(clm), byref(clineaire)
)
def output_bief(self, name):
cname = create_string_buffer(name.encode())
self._c_output_bief(cname)
###########
# Meshing #
###########
def meshing(self, reach, step: float = 50):
if reach is None or len(reach.profiles) == 0:
return reach
with tempfile.TemporaryDirectory() as tmp:
st_file = self.export_reach_to_st(reach, tmp)
m_file = st_file.rsplit(".ST", 1)[0] + ".M"
self.load_st_file(st_file)
ns, npts_max = self.get_reach_stat()
gl = reach.compute_guidelines()
# we make sure that the lines are in the left-to-right order
guide_list = [
x.name
for x in reach.profiles[0].named_points()
if x.name in gl[0]
]
self.complete_cross_section(guide_list)
self.interpolate_cross_section(ns, step)
self.purge()
self.export_to_m(m_file)
self.import_m_file(reach, m_file)
return reach
def export_reach_to_st(self, reach, tmp):
tmp_st = os.path.join(tmp, "meshing.ST")
logger.debug(f"meshing: Export ST to {tmp_st}")
reach.export_reach(tmp_st)
return tmp_st
def load_st_file(self, st):
self.init_bief_from_geo_file(st, 0, 0)
self.set_bief_name("tmp")
def get_reach_stat(self):
ns = self.get_nb_sections()
npts_max = max(
map(
lambda i: self.get_nb_points_section(i),
range(1, ns)
)
)
return ns, npts_max
def complete_cross_section(self, gl=[]):
gl1 = ["un"] + gl
gl2 = gl + ["np"]
for gls in zip(gl1, gl2):
self.st_to_m_compl(0, gls[0], gls[1])
def interpolate_cross_section(self, ns, step: float):
self.interpolate_profils_pas_transversal(
1, ns,
'un', 'np',
step
)
def purge(self):
self._c_purge()
def export_to_m(self, m):
self.output_bief(m)
def import_m_file(self, reach, m):
reach.purge()
logger.debug(f"meshing: Import geometry from {m}")
reach.import_geometry(m)
class MeshingWithMageMailleurTT(AMeshingTool):
def __init__(self):
super(MeshingWithMageMailleurTT, self).__init__()
@classmethod
def _exe_path(cls):
ext = "" if os.name == "posix" else ".exe"
return os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..", "..", "..", "mage", f"mailleurTT{ext}"
)
)
###########
# Meshing #
###########
def meshing(self, reach, step: float = 50):
if reach is None or len(reach.profiles) == 0:
return reach
with tempfile.TemporaryDirectory() as tmp:
st_file = self.export_reach_to_st(reach, tmp)
m_file = st_file.rsplit(".ST", 1)[0] + ".M"
proc = QProcess()
proc.setWorkingDirectory(tmp)
proc.start(
self._exe_path(), [st_file, m_file, str(step)]
)
proc.waitForFinished()
errors = proc.readAllStandardError()
if len(errors) != 0:
logger.error(
f"{logger_color_red()}{errors}{logger_color_reset()}"
)
else:
self.import_m_file(reach, m_file)
return reach
def export_reach_to_st(self, reach, tmp):
tmp_st = os.path.join(tmp, "meshing.ST")
logger.debug(f"meshing: Export ST to {tmp_st}")
reach.export_reach(tmp_st)
return tmp_st
def import_m_file(self, reach, m):
reach.purge()
logger.debug(f"meshing: Import geometry from {m}")
reach.import_geometry(m)
+17
View File
@@ -0,0 +1,17 @@
# __init__.py -- Pamhyr
# Copyright (C) 2023 INRAE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
+37
View File
@@ -0,0 +1,37 @@
# test_Model.py -- Pamhyr
# Copyright (C) 2023 INRAE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
import os
import unittest
import warnings
import tempfile
from Model.Saved import SavedStatus
from Model.Study import Study
from Model.River import River
from Meshing.Mage import MeshingWithMage
mage_mesher = os.path.exists(MeshingWithMage._lib_path())
class MeshingTestCase(unittest.TestCase):
@unittest.skipIf(not mage_mesher, "libbief is not available")
def test_create_meshingtool_mage(self):
mesher = MeshingWithMage()
self.assertNotEqual(mesher, None)
@@ -25,12 +25,13 @@ from Model.Except import NotImplementedMethodeError
logger = logging.getLogger() logger = logging.getLogger()
class BoundaryCondition(SQLSubModel): class BoundaryCondition(SQLSubModel):
_sub_classes = [] _sub_classes = []
_id_cnt = 0 _id_cnt = 0
def __init__(self, id:int = -1, name:str = "", def __init__(self, id: int = -1, name: str = "",
status = None): status=None):
super(BoundaryCondition, self).__init__() super(BoundaryCondition, self).__init__()
self._status = status self._status = status
@@ -50,7 +51,7 @@ class BoundaryCondition(SQLSubModel):
BoundaryCondition._id_cnt = max(BoundaryCondition._id_cnt + 1, self.id) BoundaryCondition._id_cnt = max(BoundaryCondition._id_cnt + 1, self.id)
@classmethod @classmethod
def _sql_create(cls, execute): def _db_create(cls, execute):
execute(""" execute("""
CREATE TABLE boundary_condition( CREATE TABLE boundary_condition(
id INTEGER NOT NULL PRIMARY KEY, id INTEGER NOT NULL PRIMARY KEY,
@@ -76,7 +77,7 @@ class BoundaryCondition(SQLSubModel):
return cls._create_submodel(execute) return cls._create_submodel(execute)
@classmethod @classmethod
def _sql_update(cls, execute, version): def _db_update(cls, execute, version):
return True return True
@classmethod @classmethod
@@ -101,7 +102,7 @@ class BoundaryCondition(SQLSubModel):
return res return res
@classmethod @classmethod
def _sql_load(cls, execute, data = None): def _db_load(cls, execute, data=None):
new = [] new = []
tab = data["tab"] tab = data["tab"]
@@ -115,9 +116,9 @@ class BoundaryCondition(SQLSubModel):
t = row[2] t = row[2]
ctor = cls._get_ctor_from_type(t) ctor = cls._get_ctor_from_type(t)
bc = ctor( bc = ctor(
id = row[0], id=row[0],
name = row[1], name=row[1],
status = data['status'] status=data['status']
) )
bc.node = None bc.node = None
@@ -143,7 +144,7 @@ class BoundaryCondition(SQLSubModel):
return new return new
def _sql_save(self, execute, data = None): def _db_save(self, execute, data=None):
tab = data["tab"] tab = data["tab"]
execute(f"DELETE FROM boundary_condition WHERE id = {self.id}") execute(f"DELETE FROM boundary_condition WHERE id = {self.id}")
@@ -155,22 +156,22 @@ class BoundaryCondition(SQLSubModel):
sql = ( sql = (
"INSERT INTO " + "INSERT INTO " +
"boundary_condition(id, name, type, tab, node) "+ "boundary_condition(id, name, type, tab, node) " +
"VALUES (" + "VALUES (" +
f"{self.id}, '{self._sql_format(self._name)}', " + f"{self.id}, '{self._db_format(self._name)}', " +
f"'{self._sql_format(self._type)}', '{tab}', {node}" + f"'{self._db_format(self._type)}', '{tab}', {node}" +
")" ")"
) )
execute(sql) execute(sql)
ind = 0 ind = 0
for d in self._data: for d in self._data:
data0 = self._sql_format(str(d[0])) data0 = self._db_format(str(d[0]))
data1 = self._sql_format(str(d[1])) data1 = self._db_format(str(d[1]))
sql = ( sql = (
"INSERT INTO " + "INSERT INTO " +
"boundary_condition_data(ind, data0, data1, bc) "+ "boundary_condition_data(ind, data0, data1, bc) " +
f"VALUES ({ind}, '{data0}', {data1}, {self.id})" f"VALUES ({ind}, '{data0}', {data1}, {self.id})"
) )
execute(sql) execute(sql)
@@ -187,8 +188,13 @@ class BoundaryCondition(SQLSubModel):
@classmethod @classmethod
def time_convert(cls, data): def time_convert(cls, data):
if type(data) == str and data.count(":") == 3: if type(data) is str:
return old_pamhyr_date_to_timestamp(data) if data.count(":") == 3:
return old_pamhyr_date_to_timestamp(data)
if data.count(":") == 2:
return old_pamhyr_date_to_timestamp("00:" + data)
if data.count(".") == 1:
return round(float(data))
return int(data) return int(data)
@@ -246,7 +252,7 @@ class BoundaryCondition(SQLSubModel):
new_1 = self._default_1 new_1 = self._default_1
if len(header) != 0: if len(header) != 0:
for i in [0,1]: for i in [0, 1]:
for j in range(len(header)): for j in range(len(header)):
if self._header[i] == header[j]: if self._header[i] == header[j]:
if i == 0: if i == 0:
@@ -259,13 +265,13 @@ class BoundaryCondition(SQLSubModel):
return (new_0, new_1) return (new_0, new_1)
def add(self, index:int): def add(self, index: int):
value = (self._default_0, self._default_1) value = (self._default_0, self._default_1)
self._data.insert(index, value) self._data.insert(index, value)
self._status.modified() self._status.modified()
return value return value
def insert(self, index:int, value): def insert(self, index: int, value):
self._data.insert(index, value) self._data.insert(index, value)
self._status.modified() self._status.modified()
@@ -301,11 +307,10 @@ class BoundaryCondition(SQLSubModel):
return self.data[index] return self.data[index]
def get_range(self, _range): def get_range(self, _range):
l = [] lst = []
for r in _range: for r in _range:
l.append(r) lst.append(r)
return l return lst
def _set_i_c_v(self, index, column, value): def _set_i_c_v(self, index, column, value):
v = list(self._data[index]) v = list(self._data[index])
@@ -313,22 +318,22 @@ class BoundaryCondition(SQLSubModel):
self._data[index] = tuple(v) self._data[index] = tuple(v)
self._status.modified() self._status.modified()
def set_i_0(self, index:int, value): def set_i_0(self, index: int, value):
self._set_i_c_v(index, 0, value) self._set_i_c_v(index, 0, value)
def set_i_1(self, index:int, value): def set_i_1(self, index: int, value):
self._set_i_c_v(index, 1, value) self._set_i_c_v(index, 1, value)
@timer @timer
def convert(self, cls): def convert(self, cls):
new = cls(name = self.name, status = self._status) new = cls(name=self.name, status=self._status)
new.node = self.node new.node = self.node
for i, _ in enumerate(self.data): for i, _ in enumerate(self.data):
new.add(i) new.add(i)
for i in [0,1]: for i in [0, 1]:
for j in [0,1]: for j in [0, 1]:
if self._header[i] == new.header[j]: if self._header[i] == new.header[j]:
for ind, v in self.data: for ind, v in self.data:
try: try:
@@ -30,6 +30,7 @@ from Model.BoundaryCondition.BoundaryConditionTypes import (
Solid, Solid,
) )
class BoundaryConditionList(PamhyrModelListWithTab): class BoundaryConditionList(PamhyrModelListWithTab):
_tabs_list = ["liquid", "solid", "suspenssion"] _tabs_list = ["liquid", "solid", "suspenssion"]
_sub_classes = [ _sub_classes = [
@@ -37,21 +38,21 @@ class BoundaryConditionList(PamhyrModelListWithTab):
] ]
@classmethod @classmethod
def _sql_load(cls, execute, data = None): def _db_load(cls, execute, data=None):
new = cls(status = data['status']) new = cls(status=data['status'])
if data is None: if data is None:
data = {} data = {}
for tab in new._tabs: for tab in new._tabs:
data["tab"] = tab data["tab"] = tab
new._tabs[tab] = BoundaryCondition._sql_load( new._tabs[tab] = BoundaryCondition._db_load(
execute, data execute, data
) )
return new return new
def _sql_save(self, execute, data = None): def _db_save(self, execute, data=None):
execute("DELETE FROM boundary_condition") execute("DELETE FROM boundary_condition")
if data is None: if data is None:
@@ -60,7 +61,7 @@ class BoundaryConditionList(PamhyrModelListWithTab):
for tab in self._tabs: for tab in self._tabs:
data["tab"] = tab data["tab"] = tab
for bc in self._tabs[tab]: for bc in self._tabs[tab]:
bc._sql_save(execute, data = data) bc._db_save(execute, data=data)
return True return True
@@ -73,18 +74,31 @@ class BoundaryConditionList(PamhyrModelListWithTab):
def __copy__(self): def __copy__(self):
new = BoundaryConditionList() new = BoundaryConditionList()
for l in self._tabs: for lst in self._tabs:
new.tabs[l] = self._tabs[l].copy() new.tabs[lst] = self._tabs[lst].copy()
return new return new
def __deepcopy__(self): def __deepcopy__(self):
new = BoundaryConditionList() new = BoundaryConditionList()
for l in self._tabs: for lst in self._tabs:
new.tabs[l] = self._tabs[l].deepcopy() new.tabs[lst] = self._tabs[lst].deepcopy()
return new return new
def copy(self): def copy(self):
return copy(self) return copy(self)
def get_assoc_to_node(self, tab, node):
assoc = list(
filter(
lambda i: i.node is node,
self._tabs[tab]
)
)
if len(assoc) > 0:
return assoc[0]
return None
@@ -22,7 +22,7 @@ from Model.BoundaryCondition.BoundaryCondition import BoundaryCondition
class NotDefined(BoundaryCondition): class NotDefined(BoundaryCondition):
def __init__(self, id:int = -1, name:str = "", status = None): def __init__(self, id: int = -1, name: str = "", status=None):
super(NotDefined, self).__init__(id=id, name=name, status=status) super(NotDefined, self).__init__(id=id, name=name, status=status)
self._type = "ND" self._type = "ND"
@@ -32,9 +32,11 @@ class NotDefined(BoundaryCondition):
def _default_0(self): def _default_0(self):
return 0.0 return 0.0
class PonctualContribution(BoundaryCondition): class PonctualContribution(BoundaryCondition):
def __init__(self, id:int = -1, name:str = "", status = None): def __init__(self, id: int = -1, name: str = "", status=None):
super(PonctualContribution, self).__init__(id=id, name=name, status=status) super(PonctualContribution, self).__init__(
id=id, name=name, status=status)
self._type = "PC" self._type = "PC"
self._header = ["time", "discharge"] self._header = ["time", "discharge"]
@@ -44,8 +46,9 @@ class PonctualContribution(BoundaryCondition):
def compatibility(cls): def compatibility(cls):
return ["liquid"] return ["liquid"]
class TimeOverZ(BoundaryCondition): class TimeOverZ(BoundaryCondition):
def __init__(self, id:int = -1, name:str = "", status = None): def __init__(self, id: int = -1, name: str = "", status=None):
super(TimeOverZ, self).__init__(id=id, name=name, status=status) super(TimeOverZ, self).__init__(id=id, name=name, status=status)
self._type = "TZ" self._type = "TZ"
@@ -56,9 +59,11 @@ class TimeOverZ(BoundaryCondition):
def compatibility(cls): def compatibility(cls):
return ["liquid"] return ["liquid"]
class TimeOverDischarge(BoundaryCondition): class TimeOverDischarge(BoundaryCondition):
def __init__(self, id:int = -1, name:str = "", status = None): def __init__(self, id: int = -1, name: str = "", status=None):
super(TimeOverDischarge, self).__init__(id=id, name=name, status=status) super(TimeOverDischarge, self).__init__(
id=id, name=name, status=status)
self._type = "TD" self._type = "TD"
self._header = ["time", "discharge"] self._header = ["time", "discharge"]
@@ -68,8 +73,9 @@ class TimeOverDischarge(BoundaryCondition):
def compatibility(cls): def compatibility(cls):
return ["liquid"] return ["liquid"]
class ZOverDischarge(BoundaryCondition): class ZOverDischarge(BoundaryCondition):
def __init__(self, id:int = -1, name:str = "", status = None): def __init__(self, id: int = -1, name: str = "", status=None):
super(ZOverDischarge, self).__init__(id=id, name=name, status=status) super(ZOverDischarge, self).__init__(id=id, name=name, status=status)
self._type = "ZD" self._type = "ZD"
@@ -86,7 +92,7 @@ class ZOverDischarge(BoundaryCondition):
class Solid(BoundaryCondition): class Solid(BoundaryCondition):
def __init__(self, id:int = -1, name:str = "", status = None): def __init__(self, id: int = -1, name: str = "", status=None):
super(Solid, self).__init__(id=id, name=name, status=status) super(Solid, self).__init__(id=id, name=name, status=status)
self.d50 = 0.002 self.d50 = 0.002
+46 -5
View File
@@ -45,8 +45,9 @@ def exception_message_box(exception):
# Custom error # # Custom error #
################ ################
class ExeceptionWithMessageBox(Exception): class ExeceptionWithMessageBox(Exception):
def __init__(self, title = "Exeception"): def __init__(self, title="Exeception"):
self.title = title self.title = title
def header(self): def header(self):
@@ -72,7 +73,7 @@ class ExeceptionWithMessageBox(Exception):
class NotImplementedMethodeError(ExeceptionWithMessageBox): class NotImplementedMethodeError(ExeceptionWithMessageBox):
def __init__(self, obj, func): def __init__(self, obj, func):
super(NotImplementedMethodeError, self).__init__( super(NotImplementedMethodeError, self).__init__(
title = _translate("Exception", "Method not implemented") title=_translate("Exception", "Method not implemented")
) )
self.obj = obj self.obj = obj
@@ -81,12 +82,16 @@ class NotImplementedMethodeError(ExeceptionWithMessageBox):
self.alert() self.alert()
def __str__(self): def __str__(self):
class_type = self.obj
if self.obj.__class__ != type:
class_type = self.obj.__class__
return ( return (
_translate("Exception", "Method") + _translate("Exception", "Method") +
f" '{self.func.__name__}' " + f" '{self.func.__name__}' " +
_translate("Exception", "not implemented") + _translate("Exception", "not implemented") +
_translate("Exception", "for class") + _translate("Exception", "for class") +
f" '{self.obj.__class__ if self.obj.__class__ != type else self.obj}'" f" '{class_type}'"
) )
def header(self): def header(self):
@@ -104,10 +109,11 @@ class NotImplementedMethodeError(ExeceptionWithMessageBox):
f" '{self.obj.__class__}'" f" '{self.obj.__class__}'"
) )
class FileFormatError(ExeceptionWithMessageBox): class FileFormatError(ExeceptionWithMessageBox):
def __init__(self, filename, reason): def __init__(self, filename, reason):
super(FileFormatError, self).__init__( super(FileFormatError, self).__init__(
title = _translate("Exception", "FileFormatError") title=_translate("Exception", "FileFormatError")
) )
self.reason = reason self.reason = reason
@@ -137,7 +143,7 @@ class FileFormatError(ExeceptionWithMessageBox):
class ClipboardFormatError(ExeceptionWithMessageBox): class ClipboardFormatError(ExeceptionWithMessageBox):
def __init__(self, mime=None, header=None, data=None): def __init__(self, mime=None, header=None, data=None):
super(ClipboardFormatError, self).__init__( super(ClipboardFormatError, self).__init__(
title = _translate("Exception", "Clipboard format error") title=_translate("Exception", "Clipboard format error")
) )
self._mime = mime self._mime = mime
@@ -173,3 +179,38 @@ class ClipboardFormatError(ExeceptionWithMessageBox):
def message(self): def message(self):
return self.msg return self.msg
class ExternFileMissingError(ExeceptionWithMessageBox):
def __init__(self, module="mage", filename="libbief", path="??/libbief.so",
src_except=None):
super(ExternFileMissingError, self).__init__(
title=_translate(
"Exception", "External file dependence is missing"
)
)
self.msg = _translate(
"Exception",
"'@file' is missing for module @module:\n'@path'"
)
self.msg = self.msg.replace("@file", filename)
self.msg = self.msg.replace("@module", module)
self.msg = self.msg.replace("@path", path)
if src_except is not None:
self.msg = self.msg + "\n\n" + f"Exception: {src_except}"
self.alert()
def __str__(self):
return self.msg
def header(self):
return _translate("Exception", "External file dependence is missing")
def short_message(self):
return _translate("Exception", "External file dependence is missing")
def message(self):
return self.msg
+49 -16
View File
@@ -16,12 +16,17 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging
from tools import trace, timer from tools import trace, timer
from Model.Tools.PamhyrDB import SQLSubModel from Model.Tools.PamhyrDB import SQLSubModel
logger = logging.getLogger()
class Friction(SQLSubModel): class Friction(SQLSubModel):
def __init__(self, name:str = "", status = None): def __init__(self, name: str = "", status=None):
super(Friction, self).__init__() super(Friction, self).__init__()
self._status = status self._status = status
@@ -34,7 +39,7 @@ class Friction(SQLSubModel):
self._end_strickler = None self._end_strickler = None
@classmethod @classmethod
def _sql_create(cls, execute): def _db_create(cls, execute):
execute(""" execute("""
CREATE TABLE friction( CREATE TABLE friction(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -53,13 +58,14 @@ class Friction(SQLSubModel):
return True return True
@classmethod @classmethod
def _sql_update(cls, execute, version): def _db_update(cls, execute, version):
return True return True
@classmethod @classmethod
def _sql_load(cls, execute, data = None): def _db_load(cls, execute, data=None):
new = [] new = []
reach = data["parent"] # Reach object
reach = data["reach"]
status = data["status"] status = data["status"]
stricklers = data["stricklers"].stricklers stricklers = data["stricklers"].stricklers
@@ -68,36 +74,50 @@ class Friction(SQLSubModel):
f"FROM friction WHERE reach = {reach.id}" f"FROM friction WHERE reach = {reach.id}"
) )
for _ in table:
new.append(None)
for row in table: for row in table:
ind = row[0] ind = row[0]
# Get stricklers # Get stricklers
bs = next(filter(lambda s: s.id == row[3], stricklers)) if int(row[3]) == -1:
es = next(filter(lambda s: s.id == row[4], stricklers)) bs = None
else:
bs = next(filter(lambda s: s.id == row[3], stricklers))
if int(row[4]) == -1:
es = None
else:
es = next(filter(lambda s: s.id == row[4], stricklers))
# Create friction # Create friction
sec = cls(status = status) sec = cls(status=status)
sec.edge = reach sec.edge = reach
sec.begin_kp = row[1] sec.begin_kp = row[1]
sec.end_kp = row[2] sec.end_kp = row[2]
sec.begin_strickler = bs sec.begin_strickler = bs
sec.end_strickler = es sec.end_strickler = es
new[ind] = sec new.append((ind, sec))
return new return new
def _sql_save(self, execute, data = None): def _db_save(self, execute, data=None):
ind = data["ind"] ind = data["ind"]
b_s_id = -1
e_s_id = -1
if self._begin_strickler is not None:
b_s_id = self._begin_strickler.id
if self._end_strickler is not None:
e_s_id = self._end_strickler.id
execute( execute(
"INSERT INTO " + "INSERT INTO " +
"friction(ind, begin_kp, end_kp, reach, begin_strickler, end_strickler) " + "friction(ind, begin_kp, end_kp, " +
"reach, begin_strickler, end_strickler) " +
"VALUES (" + "VALUES (" +
f"{ind}, {self._begin_kp}, {self._end_kp}, " + f"{ind}, {self._begin_kp}, {self._end_kp}, " +
f"{self._edge.id}, " + f"{self._edge.id}, " +
f"{self._begin_strickler.id}, {self._end_strickler.id}" + f"{b_s_id}, {e_s_id}" +
")" ")"
) )
@@ -116,12 +136,16 @@ class Friction(SQLSubModel):
def edge(self): def edge(self):
return self._edge return self._edge
@property
def reach(self):
return self._edge
@edge.setter @edge.setter
def edge(self, edge): def edge(self, edge):
self._edge = edge self._edge = edge
if (edge is not None and if (edge is not None and
self._begin_kp == 0.0 and self._begin_kp == 0.0 and
self._end_kp == 0.0): self._end_kp == 0.0):
self._begin_kp = self._edge.reach.get_kp_min() self._begin_kp = self._edge.reach.get_kp_min()
self._end_kp = self._edge.reach.get_kp_max() self._end_kp = self._edge.reach.get_kp_max()
self._status.modified() self._status.modified()
@@ -129,6 +153,15 @@ class Friction(SQLSubModel):
def has_edge(self): def has_edge(self):
return self._edge is not None return self._edge is not None
def has_coefficient(self):
return (
self._begin_strickler is not None and
self._end_strickler is not None
)
def is_full_defined(self):
return self.has_edge() and self.has_coefficient()
@property @property
def begin_kp(self): def begin_kp(self):
return self._begin_kp return self._begin_kp
+35 -10
View File
@@ -28,52 +28,77 @@ from Model.Friction.Friction import Friction
logger = logging.getLogger() logger = logging.getLogger()
class FrictionList(PamhyrModelList): class FrictionList(PamhyrModelList):
_sub_classes = [ _sub_classes = [
Friction Friction
] ]
@classmethod @classmethod
def _sql_update_0_0_1(cls, execute, version): def _db_update_0_0_1(cls, execute, version):
execute("ALTER TABLE `section` RENAME TO `friction`") execute("ALTER TABLE `section` RENAME TO `friction`")
@classmethod @classmethod
def _sql_update(cls, execute, version): def _db_update(cls, execute, version):
if version == "0.0.0": if version == "0.0.0":
logger.info(f"Update friction TABLE from {version}") logger.info(f"Update friction TABLE from {version}")
cls._sql_update_0_0_1(execute, version) cls._db_update_0_0_1(execute, version)
return True return True
@classmethod @classmethod
def _sql_load(cls, execute, data = None): def _db_load(cls, execute, data=None):
new = cls(status = data['status']) new = cls(status=data['status'])
new._lst = Friction._sql_load( ilst = Friction._db_load(
execute, data execute, data
) )
new._lst = list(map(lambda x: x[1], sorted(ilst)))
return new return new
def _sql_save(self, execute, data = None): def _db_save(self, execute, data=None):
frictions = self.lst
reach = data["reach"] reach = data["reach"]
execute(f"DELETE FROM friction WHERE reach = {reach.id}") execute(f"DELETE FROM friction WHERE reach = {reach.id}")
ok = True ok = True
ind = 0 ind = 0
for friction in self._lst: for friction in frictions:
data["ind"] = ind data["ind"] = ind
ok &= friction._sql_save(execute, data = data) ok &= friction._db_save(execute, data=data)
ind += 1 ind += 1
return ok return ok
def _get_frictions_list(self):
# Frictions list generator is type (int, Point) with the first
# element the index of the Point in list
return list(
map(
lambda p: p[1],
sorted(
self._lst,
key=lambda p: p[0]
)
)
)
@property
def lst(self):
if not isinstance(self._lst, list):
self._lst = self._get_frictions_list()
return self._lst
@property @property
def frictions(self): def frictions(self):
return self.lst return self.lst
def new(self, index): def new(self, index):
n = Friction(status = self._status) n = Friction(status=self._status)
self._lst.insert(index, n) self._lst.insert(index, n)
self._status.modified() self._status.modified()
return n return n
+4 -4
View File
@@ -18,8 +18,9 @@
from Model.Except import NotImplementedMethodeError from Model.Except import NotImplementedMethodeError
class Point(object): class Point(object):
def __init__(self, name:str = "", profile=None, status = None): def __init__(self, name: str = "", profile=None, status=None):
super(Point, self).__init__() super(Point, self).__init__()
self._status = status self._status = status
@@ -28,7 +29,6 @@ class Point(object):
self._profile = profile self._profile = profile
self._sl = None self._sl = None
@property @property
def sl(self): def sl(self):
if self._sl is None: if self._sl is None:
@@ -40,8 +40,8 @@ class Point(object):
def sl(self, sl): def sl(self, sl):
if sl == self._profile.sl: if sl == self._profile.sl:
self._sl = None self._sl = None
else:
self._sl = sl self._sl = sl
@property @property
def name(self): def name(self):
Loaded 100 of 324 files, more files were not shown because too many files have changed in this diff. Show more