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 dd6d29e commit 0fd12db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void read_phixs_data_table(std::fstream &phixsfile, const int nphixspoints_input
static_cast<float *>(malloc(globals::NPHIXSPOINTS * sizeof(float)));
assert_always(globals::elements[element].ions[lowerion].levels[lowerlevel].photoion_xs != nullptr);

auto *levelphixstable = globals::elements[element].ions[lowerion].levels[lowerlevel].photoion_xs;
auto *levelphixstable = tmpallphixs.data() + globals::elements[element].ions[lowerion].levels[lowerlevel].phixsstart;
if (phixs_file_version == 1) {
assert_always(get_nphixstargets(element, lowerion, lowerlevel) == 1);
assert_always(get_phixsupperlevel(element, lowerion, lowerlevel, 0) == 0);
Expand Down Expand Up @@ -1448,12 +1448,13 @@ void setup_phixs_list() {
globals::NPHIXSPOINTS * sizeof(float));
}

free(globals::elements[element].ions[ion].levels[level].photoion_xs);
globals::elements[element].ions[ion].levels[level].photoion_xs = blocktablestart;

nbftableschanged++;
}
}
tmpallphixs.clear();
tmpallphixs.shrink_to_fit();
assert_always(nbftableschanged == nbftables);
#ifdef MPI_ON
MPI_Barrier(MPI_COMM_WORLD);
Expand Down

0 comments on commit 0fd12db

Please sign in to comment.