Skip to content

Commit

Permalink
Merge pull request #147 from paulromano/openmc-properties
Browse files Browse the repository at this point in the history
Write properties file at each iteration when using OpenMC
  • Loading branch information
RonRahaman authored Aug 4, 2021
2 parents b7d69bf + a4ea733 commit d6724fe
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 219 deletions.
9 changes: 7 additions & 2 deletions src/openmc_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "openmc/capi.h"
#include "openmc/cell.h"
#include "openmc/constants.h"
#include "openmc/summary.h"
#include "openmc/tallies/filter.h"
#include "openmc/tallies/filter_material.h"
#include "openmc/tallies/tally.h"
Expand Down Expand Up @@ -208,9 +209,13 @@ void OpenmcDriver::solve_step()
void OpenmcDriver::write_step(int timestep, int iteration)
{
timer_write_step.start();
std::string filename{"openmc_t" + std::to_string(timestep) + "_i" +
std::to_string(iteration) + ".h5"};
std::string suffix{"_t" + std::to_string(timestep) + "_i" + std::to_string(iteration) +
".h5"};
std::string filename{"openmc" + suffix};
err_chk(openmc_statepoint_write(filename.c_str(), nullptr));

std::string prop_file{"properties" + suffix};
err_chk(openmc_properties_export(prop_file.c_str()));
timer_write_step.stop();
}

Expand Down
Loading

0 comments on commit d6724fe

Please sign in to comment.