diff --git a/CMakeLists.txt b/CMakeLists.txt index 30dfe42a30..23a6176a86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -422,7 +422,6 @@ add_library(libopenmc SHARED src/xsdata.cpp) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc - PUBLIC_HEADER include/openmc.h LINKER_LANGUAGE Fortran) target_include_directories(libopenmc @@ -492,8 +491,8 @@ install(TARGETS openmc libopenmc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib - PUBLIC_HEADER DESTINATION include ) install(DIRECTORY src/relaxng DESTINATION share/openmc) install(FILES man/man1/openmc.1 DESTINATION share/man/man1) install(FILES LICENSE DESTINATION "share/doc/openmc" RENAME copyright) +install(DIRECTORY include/ DESTINATION include) 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 96% rename from include/openmc.h rename to include/openmc/capi.h index b913d31b1a..8fd89334dc 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 @@ -37,7 +37,7 @@ extern "C" { int openmc_filter_set_id(int32_t index, int32_t id); int openmc_filter_set_type(int32_t index, const char* type); int openmc_finalize(); - int openmc_find(double* xyz, int rtype, int32_t* id, int32_t* instance); + int openmc_find_cell(double* xyz, int32_t* index, int32_t* instance); int openmc_get_cell_index(int32_t id, int32_t* index); int openmc_get_filter_index(int32_t id, int32_t* index); void openmc_get_filter_next_id(int32_t* id); @@ -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 0b42a656c3..2b7534b582 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 815248a2e6..ed71a1ee2a 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 1797e086a5..4344eb60db 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 8dc4baffe4..f13bd5de45 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 2d4dab42c1..c93f22d7bc 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 7474b497ca..bda4e8cf0e 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 369f5d5a61..7f224b24fb 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 7d015d6143..17b2f392ed 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 0000000000..58cf75606d --- /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 fb5940d1c9..a99cadc902 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 6ef9a1895c..0191d4ffb5 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 14283fb5fc..72ccc12f68 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 94d7b43878..47544938d4 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 4df1a9240a..a3c9c07cf0 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,8 +93,8 @@ 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 radial components of n-th order modified Zernike -//! polynomial moment with azimuthal dependency m = 0 for a given angle +//! Calculate only the even radial components of n-th order modified Zernike +//! polynomial moment with azimuthal dependency m = 0 for a given angle //! (rho, theta) location on the unit disk. //! //! Since m = 0, n could only be even orders. Z_q0 = R_q0 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 14cf3a7cb0..1dab43139b 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 0434bd55d5..40746c291d 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 65afd20f9c..e5f56e9975 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 8c43d55a0b..60769139f7 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 b533971710..f351d11866 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 75406b9ace..2048189f79 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 45f6ba2c08..b02deec2c5 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 5efda042ad..7b4d32a94d 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 ee8b5cea5f..79a22d2609 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 efa7accb41..980238aeb5 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 1e3eab0ab5..8ba18d3d15 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 fa4c43694a..a898db67c8 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 f80d50670a..8509b07143 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 7f067fc0af..e895a17bdc 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 b7544a6da3..14bb56f27b 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 459df1a675..64713ae961 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 bf30612fe8..a3da179a06 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 746db5c3b5..1c38118304 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 e3571a0d56..265831e10e 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 ec789cd4e2..fb87ffdae1 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 c855c67d89..156708c786 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/openmc/capi/core.py b/openmc/capi/core.py index b5ada7956b..f0c5ac45e4 100644 --- a/openmc/capi/core.py +++ b/openmc/capi/core.py @@ -24,10 +24,10 @@ _dll.openmc_calculate_volumes.restype = c_int _dll.openmc_calculate_volumes.errcheck = _error_handler _dll.openmc_finalize.restype = c_int _dll.openmc_finalize.errcheck = _error_handler -_dll.openmc_find.argtypes = [POINTER(c_double*3), c_int, POINTER(c_int32), - POINTER(c_int32)] -_dll.openmc_find.restype = c_int -_dll.openmc_find.errcheck = _error_handler +_dll.openmc_find_cell.argtypes = [POINTER(c_double*3), POINTER(c_int32), + POINTER(c_int32)] +_dll.openmc_find_cell.restype = c_int +_dll.openmc_find_cell.errcheck = _error_handler _dll.openmc_hard_reset.restype = c_int _dll.openmc_hard_reset.errcheck = _error_handler _dll.openmc_init.argtypes = [c_int, POINTER(POINTER(c_char)), c_void_p] @@ -84,10 +84,10 @@ def find_cell(xyz): indicates which instance it is, i.e., 0 would be the first instance. """ - uid = c_int32() + index = c_int32() instance = c_int32() - _dll.openmc_find((c_double*3)(*xyz), 1, uid, instance) - return openmc.capi.cells[uid.value], instance.value + _dll.openmc_find_cell((c_double*3)(*xyz), index, instance) + return openmc.capi.Cell(index=index.value), instance.value def find_material(xyz): @@ -104,11 +104,15 @@ def find_material(xyz): Material containing the point, or None is no material is found """ - uid = c_int32() + index = c_int32() instance = c_int32() - _dll.openmc_find((c_double*3)(*xyz), 2, uid, instance) - return openmc.capi.materials[uid.value] if uid != 0 else None + _dll.openmc_find_cell((c_double*3)(*xyz), index, instance) + mats = openmc.capi.Cell(index=index.value).fill + if isinstance(mats, openmc.capi.Material): + return mats + else: + return mats[instance] def hard_reset(): """Reset tallies, timers, and pseudo-random number generator state.""" diff --git a/src/api.F90 b/src/api.F90 index 51cc14766c..76be2f4460 100644 --- a/src/api.F90 +++ b/src/api.F90 @@ -51,7 +51,7 @@ module openmc_api public :: openmc_filter_set_id public :: openmc_filter_set_type public :: openmc_finalize - public :: openmc_find + public :: openmc_find_cell public :: openmc_get_cell_index public :: openmc_get_keff public :: openmc_get_filter_index @@ -188,13 +188,12 @@ contains end function openmc_finalize !=============================================================================== -! OPENMC_FIND determines the ID or a cell or material at a given point in space +! OPENMC_FIND_CELL determines what cell contains a given point in space !=============================================================================== - function openmc_find(xyz, rtype, id, instance) result(err) bind(C) + function openmc_find_cell(xyz, index, instance) result(err) bind(C) real(C_DOUBLE), intent(in) :: xyz(3) ! Cartesian point - integer(C_INT), intent(in), value :: rtype ! 1 for cell, 2 for material - integer(C_INT32_T), intent(out) :: id + integer(C_INT32_T), intent(out) :: index integer(C_INT32_T), intent(out) :: instance integer(C_INT) :: err @@ -206,30 +205,22 @@ contains p % coord(1) % uvw(:) = [ZERO, ZERO, ONE] call find_cell(p, found) - id = -1 + index = -1 instance = -1 err = E_UNASSIGNED if (found) then - if (rtype == 1) then - id = cells(p % coord(p % n_coord) % cell) % id() - elseif (rtype == 2) then - if (p % material == MATERIAL_VOID) then - id = 0 - else - id = materials(p % material) % id() - end if - end if + index = p % coord(p % n_coord) % cell instance = p % cell_instance - 1 err = 0 else err = E_GEOMETRY - call set_errmsg("Could not find cell/material at position (" // & + call set_errmsg("Could not find cell at position (" // & trim(to_str(xyz(1))) // "," // trim(to_str(xyz(2))) // "," // & trim(to_str(xyz(3))) // ").") end if - end function openmc_find + end function openmc_find_cell !=============================================================================== ! OPENMC_HARD_RESET reset tallies and timers as well as the pseudorandom diff --git a/src/cell.cpp b/src/cell.cpp index fb364cfdfb..f172ddf3b4 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 f513701fb0..f02ee1fc09 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 e5263e4ac2..615f84f68a 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 cadeeb3df1..d5a47957bb 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 36184f7527..20ee074a81 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 d870a5f93a..ad61861e54 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 8a63893a79..fb7701ac3e 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 696a1e80e5..3b4f26764c 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 e606493ca1..0000000000 --- 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 b202620715..1f2b1e6777 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 74d26a58b6..cc82307398 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 62eeea4099..59e13512ec 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 e2871d9e1a..a5b56eef8e 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 8d8f39e249..54b78d38d0 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 409908e673..ec930f2082 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 f2a5e415dd..5c1a2f4dce 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 2ff3952d73..aac677c6ef 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 3e84f63072..eb13a55f61 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 d875987791..f601f3c71e 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 e46d06c011..51331cea03 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 0dca6d08cd..79f04c47f3 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 85e511041e..18ec33e803 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 d82738ca1b..cf5d7e34bd 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 10e07b18aa..48eca15e08 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 ef5c746bde..7e31753433 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 a316eba46d..3e18c168f2 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 b1653f3170..1acaf6551c 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 e8941ff93d..3e79072100 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 44a66c6bd1..45f6d3cb86 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 df5e8139b9..3192c1e04c 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 c705ef8a74..b23013c317 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 e9bf81775a..e1dd0ac934 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 4e6b9a9f9f..1e4c8bdfd4 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 f41ec40c1e..f81b09aef4 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 421c43d485..78f2302e53 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 2732b8f02a..b63d2e6d16 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 5835c8600a..18627efe38 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 3482a316a2..d9863694a7 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 {