diff --git a/test/python/blockstructure.py b/test/python/blockstructure.py index 34f2a808..ed34bfe3 100644 --- a/test/python/blockstructure.py +++ b/test/python/blockstructure.py @@ -3,7 +3,7 @@ from triqs.utility.h5diff import h5diff, compare, failures from triqs.gf import * from triqs.utility.comparison_tests import assert_block_gfs_are_close from scipy.linalg import expm -from triqs_dft_tools.block_structure import BlockStructure +from triqs_dft_tools.block_structure import BlockStructure, gf_struct_flatten import numpy as np @@ -176,7 +176,9 @@ cmp(m2, full = BlockStructure.full_structure( [{'up_0': [0, 1], 'up_1': [0], 'down_1': [0], 'down_0': [0, 1]}], None) -G_sumk = BlockGf(mesh=G1.mesh, gf_struct=original_bs.gf_struct_sumk[0]) +print(original_bs.gf_struct_sumk[0]) +print(gf_struct_flatten(original_bs.gf_struct_sumk[0])) +G_sumk = BlockGf(mesh=G1.mesh, gf_struct=gf_struct_flatten(original_bs.gf_struct_sumk[0])) for i in range(3): G_sumk['up'][i, i] << SemiCircular(1 if i < 2 else 2) G_sumk['down'][i, i] << SemiCircular(4 if i < 2 else 3) diff --git a/test/python/srvo3_Gloc.py b/test/python/srvo3_Gloc.py index d3d89577..ebeaf479 100644 --- a/test/python/srvo3_Gloc.py +++ b/test/python/srvo3_Gloc.py @@ -36,12 +36,11 @@ SK=SumkDFT(hdf_file='SrVO3.ref.h5',use_dft_blocks=True) num_orbitals = SK.corr_shells[0]['dim'] l = SK.corr_shells[0]['l'] spin_names = ['down','up'] -orb_names = ['%s'%i for i in range(num_orbitals)] orb_hybridized = False -gf_struct = set_operator_structure(spin_names,orb_names,orb_hybridized) -glist = [ GfImFreq(indices=inner,beta=beta) for block,inner in gf_struct] -Sigma_iw = BlockGf(name_list = [block for block,inner in gf_struct], block_list = glist, make_copies = False) +gf_struct = set_operator_structure(spin_names,num_orbitals,orb_hybridized) +glist = [ GfImFreq(target_shape=(bl_size,bl_size),beta=beta) for bl, bl_size in gf_struct] +Sigma_iw = BlockGf(name_list = [bl for bl, bl_size in gf_struct], block_list = glist, make_copies = False) SK.set_Sigma([Sigma_iw]) Gloc = SK.extract_G_loc()