|
| 1 | +# Command Line Tool |
| 2 | + |
| 3 | +## What is Diffcrash? |
| 4 | + |
| 5 | +[Diffcrash] is a software from [Sidact] which is designed for robustness |
| 6 | +analysis of simulation runs. |
| 7 | +It can be used as a set of independent executables or as a postprocessor plugin. |
| 8 | +[Diffcrash] itself must be licensed. |
| 9 | +Please therefore contact [Sidact] directly. |
| 10 | +This commmand line utility makes running a Diffcrash analysis much |
| 11 | +easier. |
| 12 | + |
| 13 | +[diffcrash]: https://www.sidact.de/diffcrash |
| 14 | +[sidact]: https://www.sidact.de/ |
| 15 | + |
| 16 | +## How to use the utility? |
| 17 | + |
| 18 | +You can get the run info by performing: |
| 19 | + |
| 20 | +```console |
| 21 | +$ python -m lasso.diffcrash.run --help |
| 22 | + |
| 23 | +==== D I F F C R A S H ==== |
| 24 | + |
| 25 | +an open lasso utility script |
| 26 | + |
| 27 | +usage: run.py [-h] --reference-run REFERENCE_RUN |
| 28 | + [--exclude-runs [EXCLUDE_RUNS [EXCLUDE_RUNS ...]]] --crash-code |
| 29 | + CRASH_CODE [--start-stage [START_STAGE]] |
| 30 | + [--end-stage [END_STAGE]] [--diffcrash-home [DIFFCRASH_HOME]] |
| 31 | + [--use-id-mapping [USE_ID_MAPPING]] |
| 32 | + [--project-dir [PROJECT_DIR]] [--config-file [CONFIG_FILE]] |
| 33 | + [--parameter-file [PARAMETER_FILE]] |
| 34 | + [--n-processes [N_PROCESSES]] |
| 35 | + [simulation_runs [simulation_runs ...]] |
| 36 | + |
| 37 | +Python utility script for Diffcrash. |
| 38 | + |
| 39 | +positional arguments: |
| 40 | +simulation_runs Simulation runs or patterns used to search for |
| 41 | + simulation runs. |
| 42 | + |
| 43 | +optional arguments: |
| 44 | +-h, --help show this help message and exit |
| 45 | +--reference-run REFERENCE_RUN |
| 46 | + filepath of the reference run. |
| 47 | +--exclude-runs [EXCLUDE_RUNS [EXCLUDE_RUNS ...]] |
| 48 | + Runs to exclude from the analysis. |
| 49 | +--crash-code CRASH_CODE |
| 50 | + Which crash code is used ('dyna', 'pam' or 'radioss'). |
| 51 | +--start-stage [START_STAGE] |
| 52 | + At which specific stage to start the analysis (SETUP, |
| 53 | + IMPORT, MATH, EXPORT, MATRIX, EIGEN, MERGE). |
| 54 | +--end-stage [END_STAGE] |
| 55 | + At which specific stage to stop the analysis (SETUP, |
| 56 | + IMPORT, MATH, EXPORT, MATRIX, EIGEN, MERGE). |
| 57 | +--diffcrash-home [DIFFCRASH_HOME] |
| 58 | + Home directory where Diffcrash is installed. Uses |
| 59 | + environment variable 'DIFFCRASHHOME' if unspecified. |
| 60 | +--use-id-mapping [USE_ID_MAPPING] |
| 61 | + Whether to use id-based mapping (default is nearest |
| 62 | + neighbour). |
| 63 | +--project-dir [PROJECT_DIR] |
| 64 | + Project dir to use for femzip. |
| 65 | +--config-file [CONFIG_FILE] |
| 66 | + Path to the config file. |
| 67 | +--parameter-file [PARAMETER_FILE] |
| 68 | + Path to the parameter file. |
| 69 | +--n-processes [N_PROCESSES] |
| 70 | + Number of processes to use (default: max-1). |
| 71 | +``` |
| 72 | + |
| 73 | +It is important to specify a `--reference-run` for the |
| 74 | +analysis. If the reference run is contained within the rest of the |
| 75 | +`simulation_runs`, it is automatically removed from that |
| 76 | +list. `simulation_runs` can be either tagged individually |
| 77 | +or by using placeholders for entire directories (e.g. '\*.fz') and |
| 78 | +subdirectories (e.g. '/\*\*/\*.fz'). |
| 79 | + |
| 80 | +!!! warning |
| 81 | + Every run clears the project directory entirely! |
| 82 | + |
| 83 | +## Example |
| 84 | + |
| 85 | +```console |
| 86 | +$ python -m lasso.diffcrash.run \ |
| 87 | +$ --reference-run ./runs/run_1.fz \ |
| 88 | +$ --crash-code dyna \ |
| 89 | +$ --project-dir diffcrash_project \ |
| 90 | +$ ./runs/*.fz |
| 91 | + |
| 92 | + |
| 93 | +==== D I F F C R A S H ==== |
| 94 | + |
| 95 | +an open lasso utility script |
| 96 | + |
| 97 | +[/] diffcrash-home : /sw/Linux/diffcrash/V6.1.24 |
| 98 | +[/] project-dir : test-example-project |
| 99 | +[/] crash-code : dyna |
| 100 | +[/] reference-run : bus/run_1.fz |
| 101 | +[/] use-id-mapping : False |
| 102 | +[/] # simul.-files : 37 |
| 103 | +[/] # excluded files: 0 |
| 104 | +[/] config-file : None |
| 105 | +[!] Config file missing. Consider specifying the path with the option '--config-file'. |
| 106 | +[/] parameter-file : None |
| 107 | +[!] Parameter file missing. Consider specifying the path with the option '--parameter-file'. |
| 108 | +[/] n-processes : 4 |
| 109 | + |
| 110 | +---- Running Routines ---- |
| 111 | + |
| 112 | +[✔] Running Setup ... done in 3.88s |
| 113 | +[✔] Running Imports ... done in 58.20s |
| 114 | +[✔] Running Math ... done in 56.22s |
| 115 | +[✔] Running Export ... done in 2.22s |
| 116 | +[✔] Running Matrix ... done in 9.78s |
| 117 | +[✔] Running Eigen ... done in 0.46s |
| 118 | +[✔] Running Merge ... done in 23.29s |
| 119 | +``` |
0 commit comments