From d11b90aa47767eee7a82acdb4a5055df71a542cf Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Sat, 13 Oct 2018 20:09:53 -0500 Subject: [PATCH] Fixing global plot variable definitions. --- include/openmc/plot.h | 14 +++++++------- src/plot.cpp | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/openmc/plot.h b/include/openmc/plot.h index a5fc870e7..0f4b5166b 100644 --- a/include/openmc/plot.h +++ b/include/openmc/plot.h @@ -16,13 +16,13 @@ namespace openmc { class ObjectPlot; - int PLOT_LEVEL_LOWEST = -1; + extern int PLOT_LEVEL_LOWEST; - std::map plot_dict; + extern std::map plot_dict; - int n_plots; + extern int n_plots; - std::vector plots; + extern std::vector plots; enum PLOT_TYPE { SLICE = 1, @@ -55,7 +55,7 @@ namespace openmc { struct ObjectPlot { ObjectPlot(pugi::xml_node plot); - + int id; int type; int color_by; @@ -74,9 +74,9 @@ namespace openmc { }; //extern "C" int openmc_plot_geometry(); - + extern "C" void read_plots(pugi::xml_node* plot_node); - + extern "C" void create_ppm(ObjectPlot* pl); extern "C" void create_voxel(ObjectPlot *pl); diff --git a/src/plot.cpp b/src/plot.cpp index 61a22bde7..3c7d4cbb3 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -17,6 +17,14 @@ namespace openmc { + int PLOT_LEVEL_LOWEST = -1; + + std::map plot_dict; + + int n_plots; + + std::vector plots; + const int RED = 0; const int GREEN = 1; const int BLUE = 2;