Write out condition number for response matrices
David Dickinson
Branch: feature/write_out_condition_numbers
Branch: 8.1-RC
Merged
Merged pull request
Merged in feature/write_out_condition_numbers (pull request #475)
Merged in feature/write_out_condition_numbers (pull request #475)
Make the condition number a property of the supercell type
Add ability to save condition number alongside response matrix dump
Make fields_local save condition number when dumping response matrix
Add option to output condition number at GK_VERBOSITY=1
Couple of ways to find out the condition number of response matrices (
field_option = ‘local’
only currently).All matrices:
Run with GK_VERBOSITY >= 1 – writes to screen
Run with
dump_response = T
– writes condition number into the dump file (view withncdump -v condition <response_file> | tail -n 2
)Ill-conditioned matrices (existing functionality) - considered ill-conditioned if
condition >= sqrt(1/epsilon(1.0))
:Written to error_unit (i.e. .error file). (Note: Need to check this actually works as not clear all procs have access to error_unit).
If
debug
true written to screenÂ
This PR also fixes a bug where the ky=kx=0 supercell would return an uninitialised array in calls to
sc_pull_rows_to_arr
. This could lead to uninitialised data being written to the dump files. This should rarely cause a problem as we don’t really use this data in most cases, but could cause problems for reusing the dump files with the implicit response matrix.