mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-24 03:55:38 -04:00
Merge branch 'develop' into libpng
This commit is contained in:
commit
75b3d18446
29 changed files with 1405 additions and 150 deletions
12
src/plot.cpp
12
src/plot.cpp
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue