error: Mat::operator(): index out of bounds
terminate called after throwing an instance of 'std::logic_error'
what(): Mat::operator(): index out of bounds
svd function actually returns a bool flag to indicate whether decomposition was successful or not. Glimpse should check the value of the returned flag and deal with the case where the decomposition failed.
If SVD decomposition fails at https://github.com/CosmoStat/Glimpse/blob/3e01fcec1f8e8d6b53c66e33071c240724bd2ead/src/field.cpp#L936 then
s
is reset and the following instructions( 0 )
causes the program to terminate with the following error:svd
function actually returns abool
flag to indicate whether decomposition was successful or not. Glimpse should check the value of the returned flag and deal with the case where the decomposition failed.