Commit 2c5f295
committed
Fix _gvec not synced after solver runs, causing zero checkpoint data
After PETSc solves, solution data was copied only to _lvec (local vector)
but _gvec (global vector) was never updated. Since write_timestep and all
checkpoint methods write from _gvec, every saved field was zeros.
Fix adds _sync_lvec_to_gvec() to _BaseMeshVariable using the correct
subdm scatter pattern, and calls it:
- In all 3 base solver finalizations (SNES_Scalar, SNES_Vector, SNES_Stokes_SaddlePt)
- In all write/checkpoint methods (belt-and-suspenders)
The operation is idempotent so the double coverage is safe.
Underworld development team with AI support from Claude Code1 parent 546f48c commit 2c5f295
3 files changed
Lines changed: 40 additions & 4 deletions
File tree
- src/underworld3
- cython
- discretisation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
1673 | | - | |
| 1672 | + | |
1674 | 1673 | | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
1675 | 1677 | | |
1676 | 1678 | | |
1677 | 1679 | | |
| |||
2438 | 2440 | | |
2439 | 2441 | | |
2440 | 2442 | | |
2441 | | - | |
2442 | | - | |
| 2443 | + | |
2443 | 2444 | | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
2444 | 2448 | | |
2445 | 2449 | | |
2446 | 2450 | | |
| |||
3842 | 3846 | | |
3843 | 3847 | | |
3844 | 3848 | | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
3845 | 3855 | | |
3846 | 3856 | | |
3847 | 3857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1851 | 1851 | | |
1852 | 1852 | | |
1853 | 1853 | | |
| 1854 | + | |
1854 | 1855 | | |
1855 | 1856 | | |
1856 | 1857 | | |
| |||
1903 | 1904 | | |
1904 | 1905 | | |
1905 | 1906 | | |
| 1907 | + | |
1906 | 1908 | | |
1907 | 1909 | | |
1908 | 1910 | | |
| |||
1912 | 1914 | | |
1913 | 1915 | | |
1914 | 1916 | | |
| 1917 | + | |
1915 | 1918 | | |
1916 | 1919 | | |
1917 | 1920 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
980 | 983 | | |
981 | 984 | | |
982 | 985 | | |
| |||
1078 | 1081 | | |
1079 | 1082 | | |
1080 | 1083 | | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1081 | 1087 | | |
1082 | 1088 | | |
1083 | 1089 | | |
| |||
1601 | 1607 | | |
1602 | 1608 | | |
1603 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1604 | 1627 | | |
1605 | 1628 | | |
1606 | 1629 | | |
| |||
0 commit comments