This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
battery:addtestgitlab [2025/10/29 10:56] arthur [Creating your test] |
battery:addtestgitlab [2025/10/29 10:57] (current) arthur [Creating your test] |
||
|---|---|---|---|
| Line 37: | Line 37: | ||
| Once you have designed your test and created the necessary simulation files, you must identify the important variables that indicate whether your law/element is behaving as it should. \\ | Once you have designed your test and created the necessary simulation files, you must identify the important variables that indicate whether your law/element is behaving as it should. \\ | ||
| - | These values can be obtained via the [[appendices:a9|*.ipe result file]].// \\ \\ **Be sure to print out the values you want to check at the time step(s) you see fit**. \\ To define the time steps at which you want a printing, you can use [[lagamex:auto#rd_line_14i5_-_strategy_control_data|ILSAV = 1 or 2]] in the ex.dat file. \\ Check [[appendices:a1|Appendix 1: Printing options]] and [[appendices:a9|Appendix 9: Printing files]] for more info about printing files. | + | These values can be obtained via the [[appendices:a9|*.ipe result file]]. |
| - | ==== Comparator code ==== | + | **Be sure to print out the values you want to check at the time step(s) you see fit**. \\ To define the time steps at which you want a printing, you can use [[lagamex:auto#rd_line_14i5_-_strategy_control_data|ILSAV = 1 or 2]] in the ex.dat file. \\ Check [[appendices:a1|Appendix 1: Printing options]] and [[appendices:a9|Appendix 9: Printing files]] for more info about printing files. |
| - | After you have created your test and identified the variables that need to be checked, you need to write the comparator code. \\ \\ This code should be written in a Python script. If Python is not already installed on your computer, you can download it from the official Python website: [[https://www.python.org/downloads/|https://www.python.org/downloads/]] \\ Several editors exist to facilitate coding and debugging with Python. You can use [[https://www.spyder-ide.org/|Spyder]] or [[https://code.visualstudio.com/|Visual Studio Code]] for instance.\\ | + | |
| - | + | ||
| - | For the comparator code, it is recommanded to use one of the existing comparators as an example. You can search in the Dokuwiki tests that use the same type of result files as you to find a code similar to what you should write. \\ | + | |
| ==== Adding your test to the battery ==== | ==== Adding your test to the battery ==== | ||
| Line 48: | Line 45: | ||
| To add a new test to the battery, you should: | To add a new test to the battery, you should: | ||
| * Add the new test to "http://www.lagamine.uliege.be/dokuwiki/doku.php/battery/listtests" | * Add the new test to "http://www.lagamine.uliege.be/dokuwiki/doku.php/battery/listtests" | ||
| - | * Modify the file **Test_battery.txt** on Obelix: add the name of the new test | + | * Add the folder containing your test to the test battery directory. |
| - | * Add the folder containing your test to the test battery directory. This folder should contain: | + | |
| - | * The files of simulation (with the same name as the test) | + | |
| - | * The reference simulation folder (with the same name as the test + "_ref") | + | |
| - | * The comparator python script (with the same name as the test) | + | |