Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Nov 10, 2023
1 parent 3fba2c2 commit e72442b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
- name: ctest
working-directory: ${{runner.workspace}}/build
shell: bash
run: OMP_NUM_THREADS=1 ctest -V
run: OMP_NUM_THREADS=1 ctest -V -R FT_TFI_square
29 changes: 22 additions & 7 deletions src/iTPS/finite_temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ void iTPS<tensor>::finite_temperature() {
measure_density(beta, "FT_");

const int num_groups = num_simple_update_groups;
if (peps_parameters.measure_interval.size() < num_groups){
while(peps_parameters.measure_interval.size() < num_groups){
peps_parameters.measure_interval.push_back(*peps_parameters.measure_interval.rbegin());
if (peps_parameters.measure_interval.size() < num_groups) {
while (peps_parameters.measure_interval.size() < num_groups) {
peps_parameters.measure_interval.push_back(
*peps_parameters.measure_interval.rbegin());
}
}

for (int group = 0; group < num_groups; ++group) {
if (peps_parameters.print_level >= PrintLevel::info) {
if(num_groups == 1){
if (num_groups == 1) {
std::cout << " Start Simple update" << std::endl;
}else{
} else {
std::cout << " Start Simple update " << group << std::endl;
}
}
Expand All @@ -48,12 +49,26 @@ void iTPS<tensor>::finite_temperature() {
Timer<> timer;

for (int int_tau = 0; int_tau < nsteps; ++int_tau) {
// DEBUG
std::cerr << int_tau << std::endl;
int debug_site_i = 0;
typename tensor::value_type v;
for (int debug_n = 0; debug_n < Tn[debug_site_i].local_size(); ++debug_n) {
mptensor::Index idx = Tn[debug_site_i].global_index(debug_n);
Tn[debug_site_i].get_value(idx, v);
for (int d = 0; d < idx.size(); ++d) {
std::cerr << idx[d] << " ";
}
std::cerr << std::scientific << std::setprecision(std::numeric_limits<double>::max_digits10) << std::real(v) << " " << std::imag(v) << std::endl;
}
std::flush(std::cerr);

auto const& evols = simple_updates;
for (auto up : evols) {
if (up.group != group) {
continue;
}
simple_update_density(up);
simple_update_density(up);
}
beta += dt * 2.0;
// local gauge fixing
Expand All @@ -76,7 +91,7 @@ void iTPS<tensor>::finite_temperature() {
}
}
} // end of for (int_tau)
if (measure_interval==0 || nsteps % measure_interval != 0) {
if (measure_interval == 0 || nsteps % measure_interval != 0) {
Timer<> timer_m;
measure_density(beta, "TE_");
time_measure += timer_m.elapsed();
Expand Down
2 changes: 1 addition & 1 deletion test/data/FT_TFI_square.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ is_real = false
output = 'output_FT_TFI_square'
measure_interval = 100
[parameter.simple_update]
num_step = 500
num_step = 2
tau = 0.005
[parameter.full_update]
num_step = 0
Expand Down

0 comments on commit e72442b

Please sign in to comment.