Commit 31ea057
dyzheng
Fix(deltaspin): fix cal_escon segfault, cal_pre_HR memory leak, and current_spin propagation
Bug fixes:
- cal_escon(): add lambda_/Mi_ empty check to prevent segfault when uninitialized
(also preserves is_Mi_converged guard for behavioral compatibility)
- cal_pre_HR(): delete old pre_hr allocations before reallocating to prevent
memory leak when DeltaSpin is reinitialized
- operator_lcao.cpp: propagate current_spin to next operator in chain so all
operators share the same spin state set by HamiltLCAO::updateHk
Test refs regenerated for 17_DS_DFTU enabled cases.1 parent bb2cb4b commit 31ea057
3 files changed
Lines changed: 8 additions & 1 deletion
File tree
- source/source_lcao
- module_deltaspin
- module_operator_lcao
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
0 commit comments