Write out condition number for response matrices

Merged
#475 · Created  · Last updated

Merged pull request

Merged in feature/write_out_condition_numbers (pull request #475)

b32db29·Author: ·Closed by: ·2021-08-05

Description

  • 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:

  1. Run with GK_VERBOSITY >= 1 – writes to screen

  2. Run with dump_response = T – writes condition number into the dump file (view with ncdump -v condition <response_file> | tail -n 2)

Ill-conditioned matrices (existing functionality) - considered ill-conditioned if condition >= sqrt(1/epsilon(1.0)):

  1. 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).

  2. 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.

0 attachments

0 comments

Loading commits...