SH: Remove NSTMAX#125
Conversation
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
+ Coverage 94.31% 94.33% +0.02%
==========================================
Files 42 42
Lines 5841 5862 +21
==========================================
+ Hits 5509 5530 +21
Misses 332 332
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| real(DP), allocatable :: px_temp(:, :), py_temp(:, :), pz_temp(:, :) | ||
| real(DP), allocatable :: x_prev(:, :), y_prev(:, :), z_prev(:, :), & | ||
| vx_prev(:, :), vy_prev(:, :), vz_prev(:, :) | ||
| ! TODO: Is this array needed? Are we not computing gradients for only one state? |
There was a problem hiding this comment.
@suchanj I am wondering, in LZ do you ever compute gradients for more than one state?
There was a problem hiding this comment.
No, not right now, however we might if J. Janoš implements his PES by gradient integration method.
There was a problem hiding this comment.
Okay, great, I'll remove this comment then.
| ! mod_array_size contains various array limits. | ||
| ! Modify here if you need larger arrays. | ||
| ! Most of the other arrays are allocated dynamically. | ||
| module mod_array_size |
|
|
||
| ! Initial electronic state | ||
| integer :: istate_init = 1 | ||
| integer :: istate_init = -1 |
There was a problem hiding this comment.
I have changed the default to invalid number so that users don't forget to set initial state.
| !Initial state | ||
| istate_lz = initstate_lz | ||
|
|
||
| allocate (tocalc_lz(nstate_lz)) |
There was a problem hiding this comment.
Missing deallocate in finalize routine.
There was a problem hiding this comment.
Thanks good catch. While we're here, could you check in lz_finalize that at least one of the arrays is indeed allocated? Otherwise if lz_fibalize is called before lz_init we'd get runtime error.
Allocate all SH arrays dynamically based on the number of states.