Commit d021649
authored
Fix restart with ionization and add automated test (BLAST-WarpX#6291)
PR BLAST-WarpX#5481 replaced `NewIntComp` (which can be called several times with
the same real time component) with `AddIntComp` (which can only be
called only once on a real-time component, and raises an error if it is
called a second time).
As a consequence, simulations that involve field ionization now abort
during restart, with the following message:
```
AddIntComp: name 'ionizationLevel' is already present in the SoA. SIGABRT
```
as reported in BLAST-WarpX#1546
This is because `AddIntComp` is first called for `ionizationLevel` here:
https://github.com/BLAST-WarpX/warpx/blob/development/Source/Diagnostics/ParticleIO.cpp#L219
and later added again here:
https://github.com/BLAST-WarpX/warpx/blob/development/Source/Particles/PhysicalParticleContainer.cpp#L1516
This PR avoids the second call by adding an `if` condition. It also adds
a restart test. (The test fails when using the `development` branch,
because the code aborts during restart.)1 parent 10b298e commit d021649
File tree
5 files changed
+32
-9
lines changed- Examples/Tests/field_ionization
- Regression/Checksum/benchmarks_json
- Source/Particles
5 files changed
+32
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | | - | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1517 | 1519 | | |
1518 | 1520 | | |
1519 | 1521 | | |
| |||
0 commit comments