Fix verbose messages
Former-commit-id: 4c8d6e95e55854925fe3b7c4fd35e9875d7a49ac
This commit is contained in:
parent
7a4887101a
commit
a662c885d5
|
@ -195,6 +195,10 @@ TMatrices_om = TMatrices_interp(freq)
|
||||||
|
|
||||||
chunkn = math.ceil(klist_full.shape[0] / chunklen)
|
chunkn = math.ceil(klist_full.shape[0] / chunklen)
|
||||||
|
|
||||||
|
if verbose:
|
||||||
|
print('Evaluating %d k-points in %d chunks' % (klist_full.shape[0], chunkn), file = sys.stderr)
|
||||||
|
sys.stderr.flush()
|
||||||
|
|
||||||
metadata = np.array({
|
metadata = np.array({
|
||||||
'maxlayer' : maxlayer,
|
'maxlayer' : maxlayer,
|
||||||
'gaussianSigma' : gaussianSigma,
|
'gaussianSigma' : gaussianSigma,
|
||||||
|
|
|
@ -479,7 +479,7 @@ def hexlattice_zsym_getSVD(lMax, TMatrices_om, epsilon_b, hexside, maxlayer, ome
|
||||||
leftmatrixlist = np.full((klist.shape[0],2,2,nelem,2,2,nelem),np.nan,dtype=complex)
|
leftmatrixlist = np.full((klist.shape[0],2,2,nelem,2,2,nelem),np.nan,dtype=complex)
|
||||||
isNaNlist = np.zeros((klist.shape[0]), dtype=bool)
|
isNaNlist = np.zeros((klist.shape[0]), dtype=bool)
|
||||||
|
|
||||||
sbtime = _time_b(verbose, step='Initializing matrices for SVD for a given list of k\'s.')
|
sbtime = _time_b(verbose, step='Initialization of matrices for SVD for a given list of k\'s')
|
||||||
# sem nějaká rozumná smyčka
|
# sem nějaká rozumná smyčka
|
||||||
for ki in range(klist.shape[0]):
|
for ki in range(klist.shape[0]):
|
||||||
k = klist[ki]
|
k = klist[ki]
|
||||||
|
@ -527,16 +527,18 @@ def hexlattice_zsym_getSVD(lMax, TMatrices_om, epsilon_b, hexside, maxlayer, ome
|
||||||
TEč, TMč = symz_indexarrays(lMax, 2)
|
TEč, TMč = symz_indexarrays(lMax, 2)
|
||||||
leftmatrixlist_TE = leftmatrixlist_s[np.ix_(np.arange(leftmatrixlist_s.shape[0]),TEč,TEč)]
|
leftmatrixlist_TE = leftmatrixlist_s[np.ix_(np.arange(leftmatrixlist_s.shape[0]),TEč,TEč)]
|
||||||
leftmatrixlist_TM = leftmatrixlist_s[np.ix_(np.arange(leftmatrixlist_s.shape[0]),TMč,TMč)]
|
leftmatrixlist_TM = leftmatrixlist_s[np.ix_(np.arange(leftmatrixlist_s.shape[0]),TMč,TMč)]
|
||||||
|
_time_e(sbtime, verbose, step='Initializing matrices for SVD for a given list of k\'s')
|
||||||
|
|
||||||
_time_e(sbtime, verbose, step='Initializing matrices for SVD for a given list of k\'s.')
|
|
||||||
sbtime = _time_b(verbose, step='Calculating SVDs for a given list of k\'s.')
|
sbtime = _time_b(verbose, step='Calculating SVDs for a given list of k\'s.')
|
||||||
if(not onlyNmin):
|
if(not onlyNmin):
|
||||||
svUfullTElist[nnlist], svSfullTElist[nnlist], svVfullTElist[nnlist] = np.linalg.svd(leftmatrixlist_TE, compute_uv=True)
|
svUfullTElist[nnlist], svSfullTElist[nnlist], svVfullTElist[nnlist] = np.linalg.svd(leftmatrixlist_TE, compute_uv=True)
|
||||||
svUfullTMlist[nnlist], svSfullTMlist[nnlist], svVfullTMlist[nnlist] = np.linalg.svd(leftmatrixlist_TM, compute_uv=True)
|
svUfullTMlist[nnlist], svSfullTMlist[nnlist], svVfullTMlist[nnlist] = np.linalg.svd(leftmatrixlist_TM, compute_uv=True)
|
||||||
_time_e(sbtime, verbose, step='Calculating SVDs for a given list of k\'s.')
|
_time_e(sbtime, verbose, step='Calculating SVDs for a given list of k\'s.')
|
||||||
|
_time_e(btime, verbose)
|
||||||
return ((svUfullTElist, svSfullTElist, svVfullTElist), (svUfullTMlist, svSfullTMlist, svVfullTMlist))
|
return ((svUfullTElist, svSfullTElist, svVfullTElist), (svUfullTMlist, svSfullTMlist, svVfullTMlist))
|
||||||
else:
|
else:
|
||||||
minsvTElist[nnlist] = np.linalg.svd(leftmatrixlist_TE, compute_uv=False)[...,-onlyNmin:]
|
minsvTElist[nnlist] = np.linalg.svd(leftmatrixlist_TE, compute_uv=False)[...,-onlyNmin:]
|
||||||
minsvTMlist[nnlist] = np.linalg.svd(leftmatrixlist_TM, compute_uv=False)[...,-onlyNmin:]
|
minsvTMlist[nnlist] = np.linalg.svd(leftmatrixlist_TM, compute_uv=False)[...,-onlyNmin:]
|
||||||
_time_e(sbtime, verbose, step='Calculating SVDs for a given list of k\'s.')
|
_time_e(sbtime, verbose, step='Calculating SVDs for a given list of k\'s.')
|
||||||
|
_time_e(btime, verbose)
|
||||||
return (minsvTElist, minsvTMlist)
|
return (minsvTElist, minsvTMlist)
|
||||||
|
|
Loading…
Reference in New Issue