Skip to content

Commit

Permalink
Update input.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Aug 30, 2024
1 parent 0807707 commit e851046
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,7 @@ void setup_phixs_list() {
assert_testmodeonly(tmpphixstart >= 0);
const int newphixsstart = nbftableschanged * globals::NPHIXSPOINTS;
if (globals::rank_in_node == 0) {
auto *blocktablestart = globals::allphixs + newphixsstart;
memcpy(blocktablestart, &tmpallphixs[tmpphixstart], globals::NPHIXSPOINTS * sizeof(float));
std::copy_n(&tmpallphixs[tmpphixstart], globals::NPHIXSPOINTS, blocktablestart);
std::copy_n(&tmpallphixs[tmpphixstart], globals::NPHIXSPOINTS, &globals::allphixs[newphixsstart]);
}

globals::elements[element].ions[ion].levels[level].phixsstart = newphixsstart;
Expand All @@ -1457,20 +1455,22 @@ void setup_phixs_list() {
}
}
} else {
for (int i = 0; i < globals::nbfcontinua; i++) {
globals::allcont_nu_edge[i] = nonconstallcont[i].nu_edge;
}
// phixs tables ordered by element, ion, level
for (int element = 0; element < get_nelements(); element++) {
const int nions = get_nions(element);
for (int ion = 0; ion < nions; ion++) {
const int nlevels = get_ionisinglevels(element, ion);
const int nlevels = get_nlevels(element, ion);
for (int level = 0; level < nlevels; level++) {
const int nphixstargets = get_nphixstargets(element, ion, level);
if (nphixstargets > 0) {
const int tmpphixstart = -globals::elements[element].ions[ion].levels[level].phixsstart - 1;
assert_testmodeonly(tmpphixstart >= 0);
const int newphixsstart = nbftableschanged * globals::NPHIXSPOINTS;
if (globals::rank_in_node == 0) {
auto *blocktablestart = globals::allphixs + newphixsstart;
memcpy(blocktablestart, &tmpallphixs[tmpphixstart], globals::NPHIXSPOINTS * sizeof(float));
std::copy_n(&tmpallphixs[tmpphixstart], globals::NPHIXSPOINTS, &globals::allphixs[newphixsstart]);
}

globals::elements[element].ions[ion].levels[level].phixsstart = newphixsstart;
Expand Down

0 comments on commit e851046

Please sign in to comment.