From 9f0ea52d1a7ac6022452669967887abcd38ab2ec Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 20 Aug 2018 14:40:32 -0500 Subject: [PATCH] Move headers to include/openmc directory and openmc.h -> openmc/capi.h --- CMakeLists.txt | 2 +- {src => include/openmc}/angle_energy.h | 0 include/{openmc.h => openmc/capi.h} | 16 ++++++++-------- {src => include/openmc}/cell.h | 2 +- {src => include/openmc}/constants.h | 0 {src => include/openmc}/distribution.h | 2 +- {src => include/openmc}/distribution_angle.h | 3 ++- {src => include/openmc}/distribution_energy.h | 4 ++-- {src => include/openmc}/distribution_multi.h | 4 ++-- .../openmc}/distribution_spatial.h | 4 ++-- {src => include/openmc}/endf.h | 3 ++- {src => include/openmc}/error.h | 8 ++++---- include/openmc/finalize.h | 6 ++++++ {src => include/openmc}/geometry.h | 0 {src => include/openmc}/geometry_aux.h | 6 +++--- {src => include/openmc}/hdf5_interface.h | 2 +- {src => include/openmc}/initialize.h | 6 +++--- {src => include/openmc}/lattice.h | 4 ++-- {src => include/openmc}/material.h | 0 {src => include/openmc}/math_functions.h | 8 ++++---- {src => include/openmc}/message_passing.h | 6 +++--- {src => include/openmc}/mgxs.h | 12 ++++++------ {src => include/openmc}/mgxs_interface.h | 6 +++--- {src => include/openmc}/nuclide.h | 2 +- {src => include/openmc}/particle.h | 2 +- {src => include/openmc}/plot.h | 6 +++--- {src => include/openmc}/position.h | 0 {src => include/openmc}/random_lcg.h | 6 +++--- {src => include/openmc}/reaction.h | 3 ++- {src => include/openmc}/reaction_product.h | 7 ++++--- {src => include/openmc}/scattdata.h | 8 +++++--- {src => include/openmc}/search.h | 0 .../openmc}/secondary_correlated.h | 7 ++++--- {src => include/openmc}/secondary_kalbach.h | 7 ++++--- {src => include/openmc}/secondary_nbody.h | 2 +- .../openmc}/secondary_uncorrelated.h | 7 ++++--- {src => include/openmc}/settings.h | 0 {src => include/openmc}/simulation.h | 6 +++--- {src => include/openmc}/state_point.h | 9 +++++---- {src => include/openmc}/string_functions.h | 4 ++-- {src => include/openmc}/string_utils.h | 0 {src => include/openmc}/surface.h | 4 ++-- {src => include/openmc}/thermal.h | 10 +++++----- {src => include/openmc}/xml_interface.h | 6 +++--- {src => include/openmc}/xsdata.h | 10 +++++----- src/cell.cpp | 18 +++++++++--------- src/distribution.cpp | 10 +++++----- src/distribution_angle.cpp | 11 ++++++----- src/distribution_energy.cpp | 13 +++++++------ src/distribution_multi.cpp | 8 ++++---- src/distribution_spatial.cpp | 8 ++++---- src/endf.cpp | 9 +++++---- src/finalize.cpp | 4 ++-- src/finalize.h | 6 ------ src/geometry_aux.cpp | 12 ++++++------ src/hdf5_interface.cpp | 6 +++--- src/initialize.cpp | 13 +++++++------ src/lattice.cpp | 14 +++++++------- src/main.cpp | 4 ++-- src/material.cpp | 6 +++--- src/math_functions.cpp | 4 ++-- src/message_passing.cpp | 2 +- src/mgxs.cpp | 19 ++++++++++--------- src/mgxs_interface.cpp | 9 +++++---- src/particle.cpp | 14 +++++++------- src/plot.cpp | 2 +- src/position.cpp | 2 +- src/random_lcg.cpp | 3 ++- src/reaction.cpp | 10 +++++----- src/reaction_product.cpp | 14 +++++++------- src/scattdata.cpp | 11 ++++++----- src/secondary_correlated.cpp | 11 ++++++----- src/secondary_kalbach.cpp | 9 +++++---- src/secondary_nbody.cpp | 10 +++++----- src/secondary_uncorrelated.cpp | 8 ++++---- src/settings.cpp | 12 ++++++------ src/simulation.cpp | 2 +- src/state_point.cpp | 9 +++++---- src/string_functions.cpp | 4 ++-- src/surface.cpp | 8 ++++---- src/thermal.cpp | 14 +++++++------- src/xml_interface.cpp | 4 ++-- src/xsdata.cpp | 11 ++++++----- 83 files changed, 283 insertions(+), 261 deletions(-) rename {src => include/openmc}/angle_energy.h (100%) rename include/{openmc.h => openmc/capi.h} (97%) rename {src => include/openmc}/cell.h (99%) rename {src => include/openmc}/constants.h (100%) rename {src => include/openmc}/distribution.h (99%) rename {src => include/openmc}/distribution_angle.h (96%) rename {src => include/openmc}/distribution_energy.h (99%) rename {src => include/openmc}/distribution_multi.h (97%) rename {src => include/openmc}/distribution_spatial.h (97%) rename {src => include/openmc}/endf.h (98%) rename {src => include/openmc}/error.h (94%) create mode 100644 include/openmc/finalize.h rename {src => include/openmc}/geometry.h (100%) rename {src => include/openmc}/geometry_aux.h (98%) rename {src => include/openmc}/hdf5_interface.h (99%) rename {src => include/openmc}/initialize.h (74%) rename {src => include/openmc}/lattice.h (99%) rename {src => include/openmc}/material.h (100%) rename {src => include/openmc}/math_functions.h (98%) rename {src => include/openmc}/message_passing.h (70%) rename {src => include/openmc}/mgxs.h (98%) rename {src => include/openmc}/mgxs_interface.h (96%) rename {src => include/openmc}/nuclide.h (98%) rename {src => include/openmc}/particle.h (99%) rename {src => include/openmc}/plot.h (85%) rename {src => include/openmc}/position.h (100%) rename {src => include/openmc}/random_lcg.h (97%) rename {src => include/openmc}/reaction.h (98%) rename {src => include/openmc}/reaction_product.h (95%) rename {src => include/openmc}/scattdata.h (98%) rename {src => include/openmc}/search.h (100%) rename {src => include/openmc}/secondary_correlated.h (95%) rename {src => include/openmc}/secondary_kalbach.h (95%) rename {src => include/openmc}/secondary_nbody.h (97%) rename {src => include/openmc}/secondary_uncorrelated.h (92%) rename {src => include/openmc}/settings.h (100%) rename {src => include/openmc}/simulation.h (72%) rename {src => include/openmc}/state_point.h (74%) rename {src => include/openmc}/string_functions.h (80%) rename {src => include/openmc}/string_utils.h (100%) rename {src => include/openmc}/surface.h (99%) rename {src => include/openmc}/thermal.h (97%) rename {src => include/openmc}/xml_interface.h (90%) rename {src => include/openmc}/xsdata.h (96%) delete mode 100644 src/finalize.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 30dfe42a3..57017aa96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -422,7 +422,7 @@ add_library(libopenmc SHARED src/xsdata.cpp) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc - PUBLIC_HEADER include/openmc.h + PUBLIC_HEADER include/openmc/capi.h LINKER_LANGUAGE Fortran) target_include_directories(libopenmc diff --git a/src/angle_energy.h b/include/openmc/angle_energy.h similarity index 100% rename from src/angle_energy.h rename to include/openmc/angle_energy.h diff --git a/include/openmc.h b/include/openmc/capi.h similarity index 97% rename from include/openmc.h rename to include/openmc/capi.h index 3b3c48641..8fd89334d 100644 --- a/include/openmc.h +++ b/include/openmc/capi.h @@ -1,5 +1,5 @@ -#ifndef OPENMC_H -#define OPENMC_H +#ifndef OPENMC_CAPI_H +#define OPENMC_CAPI_H #include #include @@ -166,14 +166,14 @@ extern "C" { extern int64_t openmc_work; // Run modes - constexpr int RUN_MODE_FIXEDSOURCE {1}; - constexpr int RUN_MODE_EIGENVALUE {2}; - constexpr int RUN_MODE_PLOTTING {3}; - constexpr int RUN_MODE_PARTICLE {4}; - constexpr int RUN_MODE_VOLUME {5}; + const int RUN_MODE_FIXEDSOURCE = 1; + const int RUN_MODE_EIGENVALUE = 2; + const int RUN_MODE_PLOTTING = 3; + const int RUN_MODE_PARTICLE = 4; + const int RUN_MODE_VOLUME = 5; #ifdef __cplusplus } #endif -#endif // OPENMC_H +#endif // OPENMC_CAPI_H diff --git a/src/cell.h b/include/openmc/cell.h similarity index 99% rename from src/cell.h rename to include/openmc/cell.h index 0b42a656c..2b7534b58 100644 --- a/src/cell.h +++ b/include/openmc/cell.h @@ -10,7 +10,7 @@ #include "hdf5.h" #include "pugixml.hpp" -#include "position.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/constants.h b/include/openmc/constants.h similarity index 100% rename from src/constants.h rename to include/openmc/constants.h diff --git a/src/distribution.h b/include/openmc/distribution.h similarity index 99% rename from src/distribution.h rename to include/openmc/distribution.h index 815248a2e..ed71a1ee2 100644 --- a/src/distribution.h +++ b/include/openmc/distribution.h @@ -10,7 +10,7 @@ #include "pugixml.hpp" -#include "constants.h" +#include "openmc/constants.h" namespace openmc { diff --git a/src/distribution_angle.h b/include/openmc/distribution_angle.h similarity index 96% rename from src/distribution_angle.h rename to include/openmc/distribution_angle.h index 1797e086a..4344eb60d 100644 --- a/src/distribution_angle.h +++ b/include/openmc/distribution_angle.h @@ -6,9 +6,10 @@ #include // for vector -#include "distribution.h" #include "hdf5.h" +#include "openmc/distribution.h" + namespace openmc { //============================================================================== diff --git a/src/distribution_energy.h b/include/openmc/distribution_energy.h similarity index 99% rename from src/distribution_energy.h rename to include/openmc/distribution_energy.h index 8dc4baffe..f13bd5de4 100644 --- a/src/distribution_energy.h +++ b/include/openmc/distribution_energy.h @@ -9,8 +9,8 @@ #include "xtensor/xtensor.hpp" #include "hdf5.h" -#include "constants.h" -#include "endf.h" +#include "openmc/constants.h" +#include "openmc/endf.h" namespace openmc { diff --git a/src/distribution_multi.h b/include/openmc/distribution_multi.h similarity index 97% rename from src/distribution_multi.h rename to include/openmc/distribution_multi.h index 2d4dab42c..c93f22d7b 100644 --- a/src/distribution_multi.h +++ b/include/openmc/distribution_multi.h @@ -3,8 +3,8 @@ #include -#include "distribution.h" -#include "position.h" +#include "openmc/distribution.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/distribution_spatial.h b/include/openmc/distribution_spatial.h similarity index 97% rename from src/distribution_spatial.h rename to include/openmc/distribution_spatial.h index 7474b497c..bda4e8cf0 100644 --- a/src/distribution_spatial.h +++ b/include/openmc/distribution_spatial.h @@ -3,8 +3,8 @@ #include "pugixml.hpp" -#include "distribution.h" -#include "position.h" +#include "openmc/distribution.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/endf.h b/include/openmc/endf.h similarity index 98% rename from src/endf.h rename to include/openmc/endf.h index 369f5d5a6..7f224b24f 100644 --- a/src/endf.h +++ b/include/openmc/endf.h @@ -6,9 +6,10 @@ #include -#include "constants.h" #include "hdf5.h" +#include "openmc/constants.h" + namespace openmc { //! Convert integer representing interpolation law to enum diff --git a/src/error.h b/include/openmc/error.h similarity index 94% rename from src/error.h rename to include/openmc/error.h index 7d015d614..17b2f392e 100644 --- a/src/error.h +++ b/include/openmc/error.h @@ -1,11 +1,11 @@ -#ifndef ERROR_H -#define ERROR_H +#ifndef OPENMC_ERROR_H +#define OPENMC_ERROR_H #include #include #include -#include "openmc.h" +#include "openmc/capi.h" namespace openmc { @@ -82,4 +82,4 @@ void write_message(const std::stringstream& message, int level) } } // namespace openmc -#endif // ERROR_H +#endif // OPENMC_ERROR_H diff --git a/include/openmc/finalize.h b/include/openmc/finalize.h new file mode 100644 index 000000000..58cf75606 --- /dev/null +++ b/include/openmc/finalize.h @@ -0,0 +1,6 @@ +#ifndef OPENMC_FINALIZE_H +#define OPENMC_FINALIZE_H + +extern "C" void openmc_free_bank(); + +#endif // OPENMC_FINALIZE_H diff --git a/src/geometry.h b/include/openmc/geometry.h similarity index 100% rename from src/geometry.h rename to include/openmc/geometry.h diff --git a/src/geometry_aux.h b/include/openmc/geometry_aux.h similarity index 98% rename from src/geometry_aux.h rename to include/openmc/geometry_aux.h index fb5940d1c..a99cadc90 100644 --- a/src/geometry_aux.h +++ b/include/openmc/geometry_aux.h @@ -1,8 +1,8 @@ //! \file geometry_aux.h //! Auxilary functions for geometry initialization and general data handling. -#ifndef GEOMETRY_AUX_H -#define GEOMETRY_AUX_H +#ifndef OPENMC_GEOMETRY_AUX_H +#define OPENMC_GEOMETRY_AUX_H #include @@ -109,4 +109,4 @@ extern "C" int maximum_levels(int32_t univ); extern "C" void free_memory_geometry_c(); } // namespace openmc -#endif // GEOMETRY_AUX_H +#endif // OPENMC_GEOMETRY_AUX_H diff --git a/src/hdf5_interface.h b/include/openmc/hdf5_interface.h similarity index 99% rename from src/hdf5_interface.h rename to include/openmc/hdf5_interface.h index 6ef9a1895..0191d4ffb 100644 --- a/src/hdf5_interface.h +++ b/include/openmc/hdf5_interface.h @@ -13,7 +13,7 @@ #include "xtensor/xadapt.hpp" #include "xtensor/xarray.hpp" -#include "position.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/initialize.h b/include/openmc/initialize.h similarity index 74% rename from src/initialize.h rename to include/openmc/initialize.h index 14283fb5f..72ccc12f6 100644 --- a/src/initialize.h +++ b/include/openmc/initialize.h @@ -1,5 +1,5 @@ -#ifndef INITIALIZE_H -#define INITIALIZE_H +#ifndef OPENMC_INITIALIZE_H +#define OPENMC_INITIALIZE_H #ifdef OPENMC_MPI #include "mpi.h" @@ -17,4 +17,4 @@ void initialize_mpi(MPI_Comm intracomm); } -#endif // INITIALIZE_H +#endif // OPENMC_INITIALIZE_H diff --git a/src/lattice.h b/include/openmc/lattice.h similarity index 99% rename from src/lattice.h rename to include/openmc/lattice.h index 94d7b4387..47544938d 100644 --- a/src/lattice.h +++ b/include/openmc/lattice.h @@ -10,8 +10,8 @@ #include "hdf5.h" #include "pugixml.hpp" -#include "constants.h" -#include "position.h" +#include "openmc/constants.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/material.h b/include/openmc/material.h similarity index 100% rename from src/material.h rename to include/openmc/material.h diff --git a/src/math_functions.h b/include/openmc/math_functions.h similarity index 98% rename from src/math_functions.h rename to include/openmc/math_functions.h index 05748e031..927701bc5 100644 --- a/src/math_functions.h +++ b/include/openmc/math_functions.h @@ -7,9 +7,9 @@ #include #include -#include "constants.h" -#include "position.h" -#include "random_lcg.h" +#include "openmc/constants.h" +#include "openmc/position.h" +#include "openmc/random_lcg.h" namespace openmc { @@ -93,7 +93,7 @@ extern "C" void calc_rn_c(int n, const double uvw[3], double rn[]); extern "C" void calc_zn_c(int n, double rho, double phi, double zn[]); //============================================================================== -//! Calculate only the even order components of n-th order modified Zernike +//! Calculate only the even order components of n-th order modified Zernike //! polynomial moment with azimuthal dependency m = 0 for a given radial (rho) //! location on the unit disk. //! diff --git a/src/message_passing.h b/include/openmc/message_passing.h similarity index 70% rename from src/message_passing.h rename to include/openmc/message_passing.h index 14cf3a7cb..1dab43139 100644 --- a/src/message_passing.h +++ b/include/openmc/message_passing.h @@ -1,5 +1,5 @@ -#ifndef MESSAGE_PASSING_H -#define MESSAGE_PASSING_H +#ifndef OPENMC_MESSAGE_PASSING_H +#define OPENMC_MESSAGE_PASSING_H #ifdef OPENMC_MPI #include "mpi.h" @@ -19,4 +19,4 @@ namespace mpi { } // namespace mpi } // namespace openmc -#endif // MESSAGE_PASSING_H +#endif // OPENMC_MESSAGE_PASSING_H diff --git a/src/mgxs.h b/include/openmc/mgxs.h similarity index 98% rename from src/mgxs.h rename to include/openmc/mgxs.h index 0434bd55d..40746c291 100644 --- a/src/mgxs.h +++ b/include/openmc/mgxs.h @@ -1,15 +1,15 @@ //! \file mgxs.h //! A collection of classes for Multi-Group Cross Section data -#ifndef MGXS_H -#define MGXS_H +#ifndef OPENMC_MGXS_H +#define OPENMC_MGXS_H #include #include -#include "constants.h" -#include "hdf5_interface.h" -#include "xsdata.h" +#include "openmc/constants.h" +#include "openmc/hdf5_interface.h" +#include "openmc/xsdata.h" namespace openmc { @@ -202,4 +202,4 @@ class Mgxs { }; } // namespace openmc -#endif // MGXS_H \ No newline at end of file +#endif // OPENMC_MGXS_H diff --git a/src/mgxs_interface.h b/include/openmc/mgxs_interface.h similarity index 96% rename from src/mgxs_interface.h rename to include/openmc/mgxs_interface.h index 65afd20f9..e5f56e997 100644 --- a/src/mgxs_interface.h +++ b/include/openmc/mgxs_interface.h @@ -1,8 +1,8 @@ //! \file mgxs_interface.h //! A collection of C interfaces to the C++ Mgxs class -#ifndef MGXS_INTERFACE_H -#define MGXS_INTERFACE_H +#ifndef OPENMC_MGXS_INTERFACE_H +#define OPENMC_MGXS_INTERFACE_H #include "hdf5_interface.h" #include "mgxs.h" @@ -76,4 +76,4 @@ extern "C" double get_awr_c(int index); } // namespace openmc -#endif // MGXS_INTERFACE_H \ No newline at end of file +#endif // OPENMC_MGXS_INTERFACE_H diff --git a/src/nuclide.h b/include/openmc/nuclide.h similarity index 98% rename from src/nuclide.h rename to include/openmc/nuclide.h index 8c43d55a0..60769139f 100644 --- a/src/nuclide.h +++ b/include/openmc/nuclide.h @@ -1,7 +1,7 @@ #ifndef OPENMC_NUCLIDE_H #define OPENMC_NUCLIDE_H -#include "constants.h" +#include "openmc/constants.h" namespace openmc { diff --git a/src/particle.h b/include/openmc/particle.h similarity index 99% rename from src/particle.h rename to include/openmc/particle.h index b53397171..f351d1186 100644 --- a/src/particle.h +++ b/include/openmc/particle.h @@ -7,7 +7,7 @@ #include #include -#include "openmc.h" +#include "openmc/capi.h" namespace openmc { diff --git a/src/plot.h b/include/openmc/plot.h similarity index 85% rename from src/plot.h rename to include/openmc/plot.h index 75406b9ac..2048189f7 100644 --- a/src/plot.h +++ b/include/openmc/plot.h @@ -1,5 +1,5 @@ -#ifndef PLOT_H -#define PLOT_H +#ifndef OPENMC_PLOT_H +#define OPENMC_PLOT_H #include "hdf5.h" @@ -12,4 +12,4 @@ extern "C" void voxel_write_slice(int x, hid_t dspace, hid_t dset, extern "C" void voxel_finalize(hid_t dspace, hid_t dset, hid_t memspace); } // namespace openmc -#endif // PLOT_H +#endif // OPENMC_PLOT_H diff --git a/src/position.h b/include/openmc/position.h similarity index 100% rename from src/position.h rename to include/openmc/position.h diff --git a/src/random_lcg.h b/include/openmc/random_lcg.h similarity index 97% rename from src/random_lcg.h rename to include/openmc/random_lcg.h index 45f6ba2c0..b02deec2c 100644 --- a/src/random_lcg.h +++ b/include/openmc/random_lcg.h @@ -1,5 +1,5 @@ -#ifndef RANDOM_LCG_H -#define RANDOM_LCG_H +#ifndef OPENMC_RANDOM_LCG_H +#define OPENMC_RANDOM_LCG_H #include @@ -93,4 +93,4 @@ extern "C" int64_t openmc_get_seed(); extern "C" void openmc_set_seed(int64_t new_seed); } // namespace openmc -#endif // RANDOM_LCG_H +#endif // OPENMC_RANDOM_LCG_H diff --git a/src/reaction.h b/include/openmc/reaction.h similarity index 98% rename from src/reaction.h rename to include/openmc/reaction.h index 5efda042a..7b4d32a94 100644 --- a/src/reaction.h +++ b/include/openmc/reaction.h @@ -7,7 +7,8 @@ #include #include "hdf5.h" -#include "reaction_product.h" + +#include "openmc/reaction_product.h" namespace openmc { diff --git a/src/reaction_product.h b/include/openmc/reaction_product.h similarity index 95% rename from src/reaction_product.h rename to include/openmc/reaction_product.h index ee8b5cea5..79a22d260 100644 --- a/src/reaction_product.h +++ b/include/openmc/reaction_product.h @@ -8,9 +8,10 @@ #include // for vector #include "hdf5.h" -#include "angle_energy.h" -#include "endf.h" -#include "particle.h" + +#include "openmc/angle_energy.h" +#include "openmc/endf.h" +#include "openmc/particle.h" namespace openmc { diff --git a/src/scattdata.h b/include/openmc/scattdata.h similarity index 98% rename from src/scattdata.h rename to include/openmc/scattdata.h index efa7accb4..980238aeb 100644 --- a/src/scattdata.h +++ b/include/openmc/scattdata.h @@ -1,11 +1,13 @@ //! \file scattdata.h //! A collection of multi-group scattering data classes -#ifndef SCATTDATA_H -#define SCATTDATA_H +#ifndef OPENMC_SCATTDATA_H +#define OPENMC_SCATTDATA_H #include +#include "openmc/constants.h" + namespace openmc { // forward declarations so we can name our friend functions @@ -257,4 +259,4 @@ convert_legendre_to_tabular(ScattDataLegendre& leg, ScattDataTabular& tab, int n_mu); } // namespace openmc -#endif // SCATTDATA_H \ No newline at end of file +#endif // OPENMC_SCATTDATA_H diff --git a/src/search.h b/include/openmc/search.h similarity index 100% rename from src/search.h rename to include/openmc/search.h diff --git a/src/secondary_correlated.h b/include/openmc/secondary_correlated.h similarity index 95% rename from src/secondary_correlated.h rename to include/openmc/secondary_correlated.h index 1e3eab0ab..8ba18d3d1 100644 --- a/src/secondary_correlated.h +++ b/include/openmc/secondary_correlated.h @@ -8,9 +8,10 @@ #include "hdf5.h" #include "xtensor/xtensor.hpp" -#include "angle_energy.h" -#include "endf.h" -#include "distribution.h" + +#include "openmc/angle_energy.h" +#include "openmc/endf.h" +#include "openmc/distribution.h" namespace openmc { diff --git a/src/secondary_kalbach.h b/include/openmc/secondary_kalbach.h similarity index 95% rename from src/secondary_kalbach.h rename to include/openmc/secondary_kalbach.h index fa4c43694..a898db67c 100644 --- a/src/secondary_kalbach.h +++ b/include/openmc/secondary_kalbach.h @@ -8,9 +8,10 @@ #include "hdf5.h" #include "xtensor/xtensor.hpp" -#include "angle_energy.h" -#include "constants.h" -#include "endf.h" + +#include "openmc/angle_energy.h" +#include "openmc/constants.h" +#include "openmc/endf.h" namespace openmc { diff --git a/src/secondary_nbody.h b/include/openmc/secondary_nbody.h similarity index 97% rename from src/secondary_nbody.h rename to include/openmc/secondary_nbody.h index f80d50670..8509b0714 100644 --- a/src/secondary_nbody.h +++ b/include/openmc/secondary_nbody.h @@ -6,7 +6,7 @@ #include "hdf5.h" -#include "angle_energy.h" +#include "openmc/angle_energy.h" namespace openmc { diff --git a/src/secondary_uncorrelated.h b/include/openmc/secondary_uncorrelated.h similarity index 92% rename from src/secondary_uncorrelated.h rename to include/openmc/secondary_uncorrelated.h index 7f067fc0a..e895a17bd 100644 --- a/src/secondary_uncorrelated.h +++ b/include/openmc/secondary_uncorrelated.h @@ -8,9 +8,10 @@ #include #include "hdf5.h" -#include "angle_energy.h" -#include "distribution_angle.h" -#include "distribution_energy.h" + +#include "openmc/angle_energy.h" +#include "openmc/distribution_angle.h" +#include "openmc/distribution_energy.h" namespace openmc { diff --git a/src/settings.h b/include/openmc/settings.h similarity index 100% rename from src/settings.h rename to include/openmc/settings.h diff --git a/src/simulation.h b/include/openmc/simulation.h similarity index 72% rename from src/simulation.h rename to include/openmc/simulation.h index b7544a6da..14bb56f27 100644 --- a/src/simulation.h +++ b/include/openmc/simulation.h @@ -1,5 +1,5 @@ -#ifndef SIMULATION_H -#define SIMULATION_H +#ifndef OPENMC_SIMULATION_H +#define OPENMC_SIMULATION_H #include @@ -10,4 +10,4 @@ extern "C" int openmc_n_lost_particles; #pragma omp threadprivate(openmc_current_work) -#endif // SIMULATION_H +#endif // OPENMC_SIMULATION_H diff --git a/src/state_point.h b/include/openmc/state_point.h similarity index 74% rename from src/state_point.h rename to include/openmc/state_point.h index 459df1a67..64713ae96 100644 --- a/src/state_point.h +++ b/include/openmc/state_point.h @@ -1,10 +1,11 @@ -#ifndef STATE_POINT_H -#define STATE_POINT_H +#ifndef OPENMC_STATE_POINT_H +#define OPENMC_STATE_POINT_H #include #include "hdf5.h" -#include "openmc.h" + +#include "openmc/capi.h" namespace openmc { @@ -14,4 +15,4 @@ extern "C" void read_source_bank(hid_t group_id, int64_t* work_index, Bank* source_bank); } // namespace openmc -#endif // STATE_POINT_H +#endif // OPENMC_STATE_POINT_H diff --git a/src/string_functions.h b/include/openmc/string_functions.h similarity index 80% rename from src/string_functions.h rename to include/openmc/string_functions.h index bf30612fe..a3da179a0 100644 --- a/src/string_functions.h +++ b/include/openmc/string_functions.h @@ -1,8 +1,8 @@ //! \file string_functions.h //! A collection of helper routines for C-strings and STL strings -#ifndef STRING_FUNCTIONS_H -#define STRING_FUNCTIONS_H +#ifndef OPENMC_STRING_FUNCTIONS_H +#define OPENMC_STRING_FUNCTIONS_H #include diff --git a/src/string_utils.h b/include/openmc/string_utils.h similarity index 100% rename from src/string_utils.h rename to include/openmc/string_utils.h diff --git a/src/surface.h b/include/openmc/surface.h similarity index 99% rename from src/surface.h rename to include/openmc/surface.h index 746db5c3b..1c3811830 100644 --- a/src/surface.h +++ b/include/openmc/surface.h @@ -9,8 +9,8 @@ #include "hdf5.h" #include "pugixml.hpp" -#include "constants.h" -#include "position.h" +#include "openmc/constants.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/thermal.h b/include/openmc/thermal.h similarity index 97% rename from src/thermal.h rename to include/openmc/thermal.h index e3571a0d5..265831e10 100644 --- a/src/thermal.h +++ b/include/openmc/thermal.h @@ -1,5 +1,5 @@ -#ifndef OPENMC_THERMAL_SCATTERING_H -#define OPENMC_THERMAL_SCATTERING_H +#ifndef OPENMC_THERMAL_H +#define OPENMC_THERMAL_H #include #include @@ -7,8 +7,8 @@ #include "xtensor/xtensor.hpp" -#include "hdf5_interface.h" -#include "nuclide.h" +#include "openmc/hdf5_interface.h" +#include "openmc/nuclide.h" namespace openmc { @@ -144,4 +144,4 @@ extern "C" { } // namespace openmc -#endif // OPENMC_THERMAL_SCATTERING_H +#endif // OPENMC_THERMAL_H diff --git a/src/xml_interface.h b/include/openmc/xml_interface.h similarity index 90% rename from src/xml_interface.h rename to include/openmc/xml_interface.h index ec789cd4e..fb87ffdae 100644 --- a/src/xml_interface.h +++ b/include/openmc/xml_interface.h @@ -1,5 +1,5 @@ -#ifndef XML_INTERFACE_H -#define XML_INTERFACE_H +#ifndef OPENMC_XML_INTERFACE_H +#define OPENMC_XML_INTERFACE_H #include // for stringstream #include @@ -39,4 +39,4 @@ std::vector get_node_array(pugi::xml_node node, const char* name, } } // namespace openmc -#endif // XML_INTERFACE_H +#endif // OPENMC_XML_INTERFACE_H diff --git a/src/xsdata.h b/include/openmc/xsdata.h similarity index 96% rename from src/xsdata.h rename to include/openmc/xsdata.h index c855c67d8..156708c78 100644 --- a/src/xsdata.h +++ b/include/openmc/xsdata.h @@ -1,14 +1,14 @@ //! \file xsdata.h //! A collection of classes for containing the Multi-Group Cross Section data -#ifndef XSDATA_H -#define XSDATA_H +#ifndef OPENMC_XSDATA_H +#define OPENMC_XSDATA_H #include #include -#include "hdf5_interface.h" -#include "scattdata.h" +#include "openmc/hdf5_interface.h" +#include "openmc/scattdata.h" namespace openmc { @@ -115,4 +115,4 @@ class XsData { } //namespace openmc -#endif // XSDATA_H \ No newline at end of file +#endif // OPENMC_XSDATA_H diff --git a/src/cell.cpp b/src/cell.cpp index fb364cfdf..f172ddf3b 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -1,17 +1,17 @@ -#include "cell.h" +#include "openmc/cell.h" #include #include #include -#include "constants.h" -#include "error.h" -#include "hdf5_interface.h" -#include "lattice.h" -#include "material.h" -#include "openmc.h" -#include "surface.h" -#include "xml_interface.h" +#include "openmc/capi.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/hdf5_interface.h" +#include "openmc/lattice.h" +#include "openmc/material.h" +#include "openmc/surface.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/distribution.cpp b/src/distribution.cpp index f513701fb..f02ee1fc0 100644 --- a/src/distribution.cpp +++ b/src/distribution.cpp @@ -1,4 +1,4 @@ -#include "distribution.h" +#include "openmc/distribution.h" #include // for copy #include // for sqrt, floor, max @@ -6,10 +6,10 @@ #include // for accumulate #include // for string, stod -#include "error.h" -#include "math_functions.h" -#include "random_lcg.h" -#include "xml_interface.h" +#include "openmc/error.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/distribution_angle.cpp b/src/distribution_angle.cpp index e5263e4ac..615f84f68 100644 --- a/src/distribution_angle.cpp +++ b/src/distribution_angle.cpp @@ -1,15 +1,16 @@ -#include "distribution_angle.h" +#include "openmc/distribution_angle.h" #include // for abs, copysign #include // for vector -#include "endf.h" -#include "hdf5_interface.h" -#include "random_lcg.h" -#include "search.h" #include "xtensor/xarray.hpp" #include "xtensor/xview.hpp" +#include "openmc/endf.h" +#include "openmc/hdf5_interface.h" +#include "openmc/random_lcg.h" +#include "openmc/search.h" + namespace openmc { //============================================================================== diff --git a/src/distribution_energy.cpp b/src/distribution_energy.cpp index cadeeb3df..d5a47957b 100644 --- a/src/distribution_energy.cpp +++ b/src/distribution_energy.cpp @@ -1,16 +1,17 @@ -#include "distribution_energy.h" +#include "openmc/distribution_energy.h" #include // for max, min, copy, move #include // for size_t #include // for back_inserter -#include "endf.h" -#include "hdf5_interface.h" -#include "math_functions.h" -#include "random_lcg.h" -#include "search.h" #include "xtensor/xview.hpp" +#include "openmc/endf.h" +#include "openmc/hdf5_interface.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" +#include "openmc/search.h" + namespace openmc { //============================================================================== diff --git a/src/distribution_multi.cpp b/src/distribution_multi.cpp index 36184f752..20ee074a8 100644 --- a/src/distribution_multi.cpp +++ b/src/distribution_multi.cpp @@ -1,11 +1,11 @@ -#include "distribution_multi.h" +#include "openmc/distribution_multi.h" #include // for move #include // for sqrt, sin, cos, max -#include "constants.h" -#include "math_functions.h" -#include "random_lcg.h" +#include "openmc/constants.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" namespace openmc { diff --git a/src/distribution_spatial.cpp b/src/distribution_spatial.cpp index d870a5f93..ad61861e5 100644 --- a/src/distribution_spatial.cpp +++ b/src/distribution_spatial.cpp @@ -1,8 +1,8 @@ -#include "distribution_spatial.h" +#include "openmc/distribution_spatial.h" -#include "error.h" -#include "random_lcg.h" -#include "xml_interface.h" +#include "openmc/error.h" +#include "openmc/random_lcg.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/endf.cpp b/src/endf.cpp index 8a63893a7..fb7701ac3 100644 --- a/src/endf.cpp +++ b/src/endf.cpp @@ -1,15 +1,16 @@ -#include "endf.h" +#include "openmc/endf.h" #include // for copy #include // for log, exp #include // for back_inserter -#include "constants.h" -#include "hdf5_interface.h" -#include "search.h" #include "xtensor/xarray.hpp" #include "xtensor/xview.hpp" +#include "openmc/constants.h" +#include "openmc/hdf5_interface.h" +#include "openmc/search.h" + namespace openmc { //============================================================================== diff --git a/src/finalize.cpp b/src/finalize.cpp index 696a1e80e..3b4f26764 100644 --- a/src/finalize.cpp +++ b/src/finalize.cpp @@ -1,6 +1,6 @@ -#include "finalize.h" +#include "openmc/finalize.h" -#include "message_passing.h" +#include "openmc/message_passing.h" void openmc_free_bank() { diff --git a/src/finalize.h b/src/finalize.h deleted file mode 100644 index e606493ca..000000000 --- a/src/finalize.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef FINALIZE_H -#define FINALIZE_H - -extern "C" void openmc_free_bank(); - -#endif // FINALIZE_H diff --git a/src/geometry_aux.cpp b/src/geometry_aux.cpp index b20262071..1f2b1e677 100644 --- a/src/geometry_aux.cpp +++ b/src/geometry_aux.cpp @@ -1,14 +1,14 @@ -#include "geometry_aux.h" +#include "openmc/geometry_aux.h" #include // for std::max #include #include -#include "cell.h" -#include "constants.h" -#include "error.h" -#include "lattice.h" -#include "material.h" +#include "openmc/cell.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/lattice.h" +#include "openmc/material.h" namespace openmc { diff --git a/src/hdf5_interface.cpp b/src/hdf5_interface.cpp index 74d26a58b..cc8230739 100644 --- a/src/hdf5_interface.cpp +++ b/src/hdf5_interface.cpp @@ -1,4 +1,4 @@ -#include "hdf5_interface.h" +#include "openmc/hdf5_interface.h" #include #include @@ -9,9 +9,9 @@ #include "hdf5_hl.h" #ifdef OPENMC_MPI #include "mpi.h" -#include "message_passing.h" +#include "openmc/message_passing.h" #endif -#include "error.h" +#include "openmc/error.h" namespace openmc { diff --git a/src/initialize.cpp b/src/initialize.cpp index 62eeea409..59e13512e 100644 --- a/src/initialize.cpp +++ b/src/initialize.cpp @@ -1,4 +1,4 @@ -#include "initialize.h" +#include "openmc/initialize.h" #include #include @@ -6,15 +6,16 @@ #include #include -#include "error.h" -#include "hdf5_interface.h" -#include "message_passing.h" -#include "openmc.h" -#include "settings.h" #ifdef _OPENMP #include "omp.h" #endif +#include "openmc/capi.h" +#include "openmc/error.h" +#include "openmc/hdf5_interface.h" +#include "openmc/message_passing.h" +#include "openmc/settings.h" + // data/functions from Fortran side extern "C" void print_usage(); extern "C" void print_version(); diff --git a/src/lattice.cpp b/src/lattice.cpp index e2871d9e1..a5b56eef8 100644 --- a/src/lattice.cpp +++ b/src/lattice.cpp @@ -1,15 +1,15 @@ -#include "lattice.h" +#include "openmc/lattice.h" #include #include #include -#include "cell.h" -#include "error.h" -#include "geometry_aux.h" -#include "hdf5_interface.h" -#include "string_utils.h" -#include "xml_interface.h" +#include "openmc/cell.h" +#include "openmc/error.h" +#include "openmc/geometry_aux.h" +#include "openmc/hdf5_interface.h" +#include "openmc/string_utils.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/main.cpp b/src/main.cpp index 8d8f39e24..54b78d38d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,8 @@ -#include "error.h" #ifdef OPENMC_MPI #include "mpi.h" #endif -#include "openmc.h" +#include "openmc/capi.h" +#include "openmc/error.h" int main(int argc, char* argv[]) { diff --git a/src/material.cpp b/src/material.cpp index 409908e67..ec930f208 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -1,10 +1,10 @@ -#include "material.h" +#include "openmc/material.h" #include #include -#include "error.h" -#include "xml_interface.h" +#include "openmc/error.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/math_functions.cpp b/src/math_functions.cpp index f2a5e415d..5c1a2f4dc 100644 --- a/src/math_functions.cpp +++ b/src/math_functions.cpp @@ -1,4 +1,4 @@ -#include "math_functions.h" +#include "openmc/math_functions.h" namespace openmc { @@ -608,7 +608,7 @@ void calc_zn_rad_c(int n, double rho, double zn_rad[]) { double k2 = 2 * p * (p - 1) * (p - 2); double k3 = -q * q * (p - 1) - p * (p - 1) * (p - 2); double k4 = (-p * (p + q - 2) * (p - q - 2)) / 2.; - zn_rad[index] = + zn_rad[index] = ((k2 * rho * rho + k3) * zn_rad[index-1] + k4 * zn_rad[index-2]) / k1; } } diff --git a/src/message_passing.cpp b/src/message_passing.cpp index 2ff3952d7..aac677c6e 100644 --- a/src/message_passing.cpp +++ b/src/message_passing.cpp @@ -1,4 +1,4 @@ -#include "message_passing.h" +#include "openmc/message_passing.h" namespace openmc { namespace mpi { diff --git a/src/mgxs.cpp b/src/mgxs.cpp index 3e84f6307..eb13a55f6 100644 --- a/src/mgxs.cpp +++ b/src/mgxs.cpp @@ -1,17 +1,18 @@ +#include "openmc/mgxs.h" + #include #include #include #include - #ifdef _OPENMP - # include - #endif +#ifdef _OPENMP +#include +#endif -#include "error.h" -#include "math_functions.h" -#include "random_lcg.h" -#include "string_functions.h" -#include "mgxs.h" +#include "openmc/error.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" +#include "openmc/string_functions.h" namespace openmc { @@ -709,4 +710,4 @@ Mgxs::set_angle_index(const double uvw[3]) } } -} // namespace openmc \ No newline at end of file +} // namespace openmc diff --git a/src/mgxs_interface.cpp b/src/mgxs_interface.cpp index d87598779..f601f3c71 100644 --- a/src/mgxs_interface.cpp +++ b/src/mgxs_interface.cpp @@ -1,8 +1,9 @@ +#include "openmc/mgxs_interface.h" + #include -#include "error.h" -#include "math_functions.h" -#include "mgxs_interface.h" +#include "openmc/error.h" +#include "openmc/math_functions.h" namespace openmc { @@ -226,4 +227,4 @@ get_awr_c(int index) return nuclides_MG[index - 1].awr; } -} // namespace openmc \ No newline at end of file +} // namespace openmc diff --git a/src/particle.cpp b/src/particle.cpp index e46d06c01..51331cea0 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -1,14 +1,14 @@ -#include "particle.h" +#include "openmc/particle.h" #include #include -#include "constants.h" -#include "error.h" -#include "hdf5_interface.h" -#include "openmc.h" -#include "settings.h" -#include "simulation.h" +#include "openmc/capi.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/hdf5_interface.h" +#include "openmc/settings.h" +#include "openmc/simulation.h" namespace openmc { diff --git a/src/plot.cpp b/src/plot.cpp index 0dca6d08c..79f04c47f 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -1,4 +1,4 @@ -#include "plot.h" +#include "openmc/plot.h" namespace openmc { diff --git a/src/position.cpp b/src/position.cpp index 85e511041..18ec33e80 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1,4 +1,4 @@ -#include "position.h" +#include "openmc/position.h" namespace openmc { diff --git a/src/random_lcg.cpp b/src/random_lcg.cpp index d82738ca1..cf5d7e34b 100644 --- a/src/random_lcg.cpp +++ b/src/random_lcg.cpp @@ -1,4 +1,5 @@ -#include "random_lcg.h" +#include "openmc/random_lcg.h" + #include diff --git a/src/reaction.cpp b/src/reaction.cpp index 10e07b18a..48eca15e0 100644 --- a/src/reaction.cpp +++ b/src/reaction.cpp @@ -1,12 +1,12 @@ -#include "reaction.h" +#include "openmc/reaction.h" #include #include // for move -#include "hdf5_interface.h" -#include "endf.h" -#include "random_lcg.h" -#include "secondary_uncorrelated.h" +#include "openmc/hdf5_interface.h" +#include "openmc/endf.h" +#include "openmc/random_lcg.h" +#include "openmc/secondary_uncorrelated.h" namespace openmc { diff --git a/src/reaction_product.cpp b/src/reaction_product.cpp index ef5c746bd..7e3175343 100644 --- a/src/reaction_product.cpp +++ b/src/reaction_product.cpp @@ -1,14 +1,14 @@ -#include "reaction_product.h" +#include "openmc/reaction_product.h" #include // for unique_ptr #include // for string -#include "hdf5_interface.h" -#include "random_lcg.h" -#include "secondary_correlated.h" -#include "secondary_kalbach.h" -#include "secondary_nbody.h" -#include "secondary_uncorrelated.h" +#include "openmc/hdf5_interface.h" +#include "openmc/random_lcg.h" +#include "openmc/secondary_correlated.h" +#include "openmc/secondary_kalbach.h" +#include "openmc/secondary_nbody.h" +#include "openmc/secondary_uncorrelated.h" namespace openmc { diff --git a/src/scattdata.cpp b/src/scattdata.cpp index a316eba46..3e18c168f 100644 --- a/src/scattdata.cpp +++ b/src/scattdata.cpp @@ -1,12 +1,13 @@ +#include "openmc/scattdata.h" + #include #include #include -#include "constants.h" -#include "math_functions.h" -#include "random_lcg.h" -#include "error.h" -#include "scattdata.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" namespace openmc { diff --git a/src/secondary_correlated.cpp b/src/secondary_correlated.cpp index b1653f317..1acaf6551 100644 --- a/src/secondary_correlated.cpp +++ b/src/secondary_correlated.cpp @@ -1,16 +1,17 @@ -#include "secondary_correlated.h" +#include "openmc/secondary_correlated.h" #include // for copy #include #include // for size_t #include // for back_inserter -#include "hdf5_interface.h" #include "xtensor/xarray.hpp" #include "xtensor/xview.hpp" -#include "endf.h" -#include "random_lcg.h" -#include "search.h" + +#include "openmc/hdf5_interface.h" +#include "openmc/endf.h" +#include "openmc/random_lcg.h" +#include "openmc/search.h" namespace openmc { diff --git a/src/secondary_kalbach.cpp b/src/secondary_kalbach.cpp index e8941ff93..3e7907210 100644 --- a/src/secondary_kalbach.cpp +++ b/src/secondary_kalbach.cpp @@ -1,4 +1,4 @@ -#include "secondary_kalbach.h" +#include "openmc/secondary_kalbach.h" #include // for copy, move #include // for log, sqrt, sinh @@ -8,9 +8,10 @@ #include "xtensor/xarray.hpp" #include "xtensor/xview.hpp" -#include "hdf5_interface.h" -#include "random_lcg.h" -#include "search.h" + +#include "openmc/hdf5_interface.h" +#include "openmc/random_lcg.h" +#include "openmc/search.h" namespace openmc { diff --git a/src/secondary_nbody.cpp b/src/secondary_nbody.cpp index 44a66c6bd..45f6d3cb8 100644 --- a/src/secondary_nbody.cpp +++ b/src/secondary_nbody.cpp @@ -1,11 +1,11 @@ -#include "secondary_nbody.h" +#include "openmc/secondary_nbody.h" #include // for log -#include "constants.h" -#include "hdf5_interface.h" -#include "math_functions.h" -#include "random_lcg.h" +#include "openmc/constants.h" +#include "openmc/hdf5_interface.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" namespace openmc { diff --git a/src/secondary_uncorrelated.cpp b/src/secondary_uncorrelated.cpp index df5e8139b..3192c1e04 100644 --- a/src/secondary_uncorrelated.cpp +++ b/src/secondary_uncorrelated.cpp @@ -1,11 +1,11 @@ -#include "secondary_uncorrelated.h" +#include "openmc/secondary_uncorrelated.h" #include // for stringstream #include // for string -#include "error.h" -#include "hdf5_interface.h" -#include "random_lcg.h" +#include "openmc/error.h" +#include "openmc/hdf5_interface.h" +#include "openmc/random_lcg.h" namespace openmc { diff --git a/src/settings.cpp b/src/settings.cpp index c705ef8a7..b23013c31 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1,10 +1,10 @@ -#include "settings.h" +#include "openmc/settings.h" -#include "constants.h" -#include "error.h" -#include "openmc.h" -#include "string_utils.h" -#include "xml_interface.h" +#include "openmc/capi.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/string_utils.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/simulation.cpp b/src/simulation.cpp index e9bf81775..e1dd0ac93 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -1,4 +1,4 @@ -#include "openmc.h" +#include "openmc/capi.h" // OPENMC_RUN encompasses all the main logic where iterations are performed // over the batches, generations, and histories in a fixed source or k-eigenvalue diff --git a/src/state_point.cpp b/src/state_point.cpp index 4e6b9a9f9..1e4c8bdfd 100644 --- a/src/state_point.cpp +++ b/src/state_point.cpp @@ -1,4 +1,4 @@ -#include "state_point.h" +#include "openmc/state_point.h" #include #include @@ -6,9 +6,10 @@ #ifdef OPENMC_MPI #include "mpi.h" #endif -#include "error.h" -#include "message_passing.h" -#include "openmc.h" + +#include "openmc/capi.h" +#include "openmc/error.h" +#include "openmc/message_passing.h" namespace openmc { diff --git a/src/string_functions.cpp b/src/string_functions.cpp index f41ec40c1..f81b09aef 100644 --- a/src/string_functions.cpp +++ b/src/string_functions.cpp @@ -1,4 +1,4 @@ -#include "string_functions.h" +#include "openmc/string_functions.h" namespace openmc { @@ -27,4 +27,4 @@ void to_lower(std::string& str) for (int i = 0; i < str.size(); i++) str[i] = std::tolower(str[i]); } -} // namespace openmc \ No newline at end of file +} // namespace openmc diff --git a/src/surface.cpp b/src/surface.cpp index 421c43d48..78f2302e5 100644 --- a/src/surface.cpp +++ b/src/surface.cpp @@ -1,13 +1,13 @@ -#include "surface.h" +#include "openmc/surface.h" #include #include #include #include -#include "error.h" -#include "hdf5_interface.h" -#include "xml_interface.h" +#include "openmc/error.h" +#include "openmc/hdf5_interface.h" +#include "openmc/xml_interface.h" namespace openmc { diff --git a/src/thermal.cpp b/src/thermal.cpp index 2732b8f02..b63d2e6d1 100644 --- a/src/thermal.cpp +++ b/src/thermal.cpp @@ -1,4 +1,4 @@ -#include "thermal.h" +#include "openmc/thermal.h" #include // for sort, move, min, max, find #include // for round, sqrt, fabs @@ -11,12 +11,12 @@ #include "xtensor/xtensor.hpp" #include "xtensor/xview.hpp" -#include "constants.h" -#include "error.h" -#include "random_lcg.h" -#include "search.h" -#include "secondary_correlated.h" -#include "settings.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/random_lcg.h" +#include "openmc/search.h" +#include "openmc/secondary_correlated.h" +#include "openmc/settings.h" namespace openmc { diff --git a/src/xml_interface.cpp b/src/xml_interface.cpp index 5835c8600..18627efe3 100644 --- a/src/xml_interface.cpp +++ b/src/xml_interface.cpp @@ -1,9 +1,9 @@ -#include "xml_interface.h" +#include "openmc/xml_interface.h" #include // for transform #include -#include "error.h" +#include "openmc/error.h" namespace openmc { diff --git a/src/xsdata.cpp b/src/xsdata.cpp index 3482a316a..d9863694a 100644 --- a/src/xsdata.cpp +++ b/src/xsdata.cpp @@ -1,13 +1,14 @@ +#include "openmc/xsdata.h" + #include #include #include #include -#include "constants.h" -#include "error.h" -#include "math_functions.h" -#include "random_lcg.h" -#include "xsdata.h" +#include "openmc/constants.h" +#include "openmc/error.h" +#include "openmc/math_functions.h" +#include "openmc/random_lcg.h" namespace openmc {