Merge branch 'develop' into libpng

This commit is contained in:
Paul Romano 2021-10-05 12:49:30 -05:00
commit 75b3d18446
29 changed files with 1405 additions and 150 deletions

View file

@ -125,9 +125,11 @@ extern "C" int openmc_plot_geometry()
void read_plots_xml()
{
// Check if plots.xml exists
// Check if plots.xml exists; this is only necessary when the plot runmode is
// initiated. Otherwise, we want to read plots.xml because it may be called
// later via the API. In that case, its ok for a plots.xml to not exist
std::string filename = settings::path_input + "plots.xml";
if (!file_exists(filename)) {
if (!file_exists(filename) && settings::run_mode == RunMode::PLOTTING) {
fatal_error(fmt::format("Plots XML file '{}' does not exist!", filename));
}
@ -144,6 +146,12 @@ void read_plots_xml()
}
}
void free_memory_plot()
{
model::plots.clear();
model::plot_map.clear();
}
//==============================================================================
// CREATE_IMAGE creates an image based on user input from a plots.xml <plot>
// specification in the PNG/PPM format