Skip to content

Commit

Permalink
[feat] add print of avg order for ctseg
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel committed Jun 10, 2024
1 parent 9637825 commit e3a85d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/solid_dmft/dmft_tools/results_to_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def _compile_information(sum_k, general_params, solver_params, solvers, map_imp_
write_to_h5['F_time_{}'.format(icrsh)] = solvers[icrsh].F_time
if solver_params[isolvsec]['measure_pert_order']:
write_to_h5['pert_order_histo_imp_{}'.format(icrsh)] = solvers[icrsh].perturbation_order_histo
write_to_h5['avg_order_imp_{}.format(icrsh)'] = solvers[icrsh].avg_pert_order
if solver_params[isolvsec]['measure_nnt']:
write_to_h5['O_NN_{}'.format(icrsh)] = solvers[icrsh].triqs_solver.results.nn_tau
if solver_params[isolvsec]['measure_statehist']:
Expand Down
5 changes: 5 additions & 0 deletions python/solid_dmft/dmft_tools/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,7 @@ def set_Gs_from_G_l():
# first print average sign
if mpi.is_master_node():
print('\nAverage sign: {}'.format(self.triqs_solver.results.sign))

# get Delta_time from solver
self.Delta_time << self.triqs_solver.Delta_tau

Expand Down Expand Up @@ -1511,5 +1512,9 @@ def set_Gs_from_G_l():

if self.solver_params['measure_pert_order']:
self.perturbation_order_histo = self.triqs_solver.results.perturbation_order_histo_Delta
bin_vec = np.arange(0, self.perturbation_order_histo.data.shape[0])
self.avg_pert_order = np.sum(bin_vec * self.perturbation_order_histo.data[:])
if mpi.is_master_node():
print(f'Average perturbation order: {self.avg_pert_order}')

return

0 comments on commit e3a85d1

Please sign in to comment.