Loading src/sphere/sphere.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -494,7 +494,8 @@ int sphere_jxi488_cycle( // Dynamic order check const int max_lm = gconf->l_max; int l_max = gconf->l_max; const double alamb = 2.0 * pi / vk; double xi_factor = (sconf->reference_variable_name.compare("XIV") == 0) ? xi : 1.0; const double alamb = 2.0 * pi * xi_factor / vk; double size_par_lm = 2.0 * pi * sqrt(exdc) * sconf->get_max_radius() / alamb; int recommended_lm = 4 + (int)ceil(size_par_lm + 4.05 * pow(size_par_lm, 1.0 / 3.0)); if (recommended_lm != l_max) { Loading @@ -502,7 +503,7 @@ int sphere_jxi488_cycle( if (gconf->dyn_order_flag > 0) { int new_lm = recommended_lm; message = "INFO: lowering internal order from " + to_string(max_lm) + " to " + to_string(recommended_lm) + " for scale iteration " + to_string(jxi488) + ".\n"; + to_string(recommended_lm) + " for scale iteration " + to_string(jxi488 + 1) + ".\n"; logger->log(message, LOG_INFO); sid->update_order(new_lm); is_first_scale = true; Loading @@ -510,7 +511,7 @@ int sphere_jxi488_cycle( l_max = new_lm; } else { message = "WARNING: internal order " + to_string(max_lm) + " for scale iteration " + to_string(jxi488) + " too high (recommended order is " + to_string(recommended_lm) + to_string(jxi488 + 1) + " too high (recommended order is " + to_string(recommended_lm) + ").\n"; logger->log(message, LOG_WARN); } Loading @@ -536,8 +537,9 @@ int sphere_jxi488_cycle( sid->c1->dc0[ic] = sconf->get_dielectric_constant(ic, i132, jxi488); // WARNING: IDFC=0 is not tested! } else { // IDFC != 0 if (is_first_scale) { int scale_to_extract = (sconf->reference_variable_name.compare("XIV") == 0) ? 0 : jxi488; for (int ic = 0; ic < ici; ic++) { sid->c1->dc0[ic] = sconf->get_dielectric_constant(ic, i132, jxi488); sid->c1->dc0[ic] = sconf->get_dielectric_constant(ic, i132, scale_to_extract); } } } Loading src/libnptm/sph_subs.cpp +2 −2 File changed.Contains only whitespace changes. Show changes Loading
src/sphere/sphere.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -494,7 +494,8 @@ int sphere_jxi488_cycle( // Dynamic order check const int max_lm = gconf->l_max; int l_max = gconf->l_max; const double alamb = 2.0 * pi / vk; double xi_factor = (sconf->reference_variable_name.compare("XIV") == 0) ? xi : 1.0; const double alamb = 2.0 * pi * xi_factor / vk; double size_par_lm = 2.0 * pi * sqrt(exdc) * sconf->get_max_radius() / alamb; int recommended_lm = 4 + (int)ceil(size_par_lm + 4.05 * pow(size_par_lm, 1.0 / 3.0)); if (recommended_lm != l_max) { Loading @@ -502,7 +503,7 @@ int sphere_jxi488_cycle( if (gconf->dyn_order_flag > 0) { int new_lm = recommended_lm; message = "INFO: lowering internal order from " + to_string(max_lm) + " to " + to_string(recommended_lm) + " for scale iteration " + to_string(jxi488) + ".\n"; + to_string(recommended_lm) + " for scale iteration " + to_string(jxi488 + 1) + ".\n"; logger->log(message, LOG_INFO); sid->update_order(new_lm); is_first_scale = true; Loading @@ -510,7 +511,7 @@ int sphere_jxi488_cycle( l_max = new_lm; } else { message = "WARNING: internal order " + to_string(max_lm) + " for scale iteration " + to_string(jxi488) + " too high (recommended order is " + to_string(recommended_lm) + to_string(jxi488 + 1) + " too high (recommended order is " + to_string(recommended_lm) + ").\n"; logger->log(message, LOG_WARN); } Loading @@ -536,8 +537,9 @@ int sphere_jxi488_cycle( sid->c1->dc0[ic] = sconf->get_dielectric_constant(ic, i132, jxi488); // WARNING: IDFC=0 is not tested! } else { // IDFC != 0 if (is_first_scale) { int scale_to_extract = (sconf->reference_variable_name.compare("XIV") == 0) ? 0 : jxi488; for (int ic = 0; ic < ici; ic++) { sid->c1->dc0[ic] = sconf->get_dielectric_constant(ic, i132, jxi488); sid->c1->dc0[ic] = sconf->get_dielectric_constant(ic, i132, scale_to_extract); } } } Loading