mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
commit
2d90f9bd15
6 changed files with 39 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ project(openmc C CXX)
|
|||
# Set version numbers
|
||||
set(OPENMC_VERSION_MAJOR 0)
|
||||
set(OPENMC_VERSION_MINOR 13)
|
||||
set(OPENMC_VERSION_RELEASE 3)
|
||||
set(OPENMC_VERSION_RELEASE 4)
|
||||
set(OPENMC_VERSION ${OPENMC_VERSION_MAJOR}.${OPENMC_VERSION_MINOR}.${OPENMC_VERSION_RELEASE})
|
||||
configure_file(include/openmc/version.h.in "${CMAKE_BINARY_DIR}/include/openmc/version.h" @ONLY)
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ copyright = '2011-2023, Massachusetts Institute of Technology, UChicago Argonne
|
|||
# The short X.Y version.
|
||||
version = "0.13"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = "0.13.3"
|
||||
release = "0.13.4"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
|||
|
|
@ -90,6 +90,12 @@ public:
|
|||
void set_densities(
|
||||
const vector<std::string>& name, const vector<double>& density);
|
||||
|
||||
//! Clone the material by deep-copying all members, except for the ID,
|
||||
// which will get auto-assigned to the next available ID. After creating
|
||||
// the new material, it is added to openmc::model::materials.
|
||||
//! \return reference to the cloned material
|
||||
Material & clone();
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace openmc {
|
|||
constexpr int VERSION_MAJOR {@OPENMC_VERSION_MAJOR@};
|
||||
constexpr int VERSION_MINOR {@OPENMC_VERSION_MINOR@};
|
||||
constexpr int VERSION_RELEASE {@OPENMC_VERSION_RELEASE@};
|
||||
constexpr bool VERSION_DEV {false};
|
||||
constexpr bool VERSION_DEV {true};
|
||||
constexpr std::array<int, 3> VERSION {VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE};
|
||||
// clang-format on
|
||||
|
||||
|
|
|
|||
|
|
@ -38,4 +38,4 @@ from .config import *
|
|||
from openmc.model import rectangular_prism, hexagonal_prism, Model
|
||||
|
||||
|
||||
__version__ = '0.13.3'
|
||||
__version__ = '0.13.4-dev'
|
||||
|
|
|
|||
|
|
@ -353,6 +353,35 @@ Material::~Material()
|
|||
model::material_map.erase(id_);
|
||||
}
|
||||
|
||||
Material & Material::clone()
|
||||
{
|
||||
std::unique_ptr<Material> mat = std::make_unique<Material>();
|
||||
|
||||
// set all other parameters to whatever the calling Material has
|
||||
mat->name_ = name_;
|
||||
mat->nuclide_ = nuclide_;
|
||||
mat->element_ = element_;
|
||||
mat->ncrystal_mat_ = ncrystal_mat_;
|
||||
mat->atom_density_ = atom_density_;
|
||||
mat->density_ = density_;
|
||||
mat->density_gpcc_ = density_gpcc_;
|
||||
mat->volume_ = volume_;
|
||||
mat->fissionable_ = fissionable_;
|
||||
mat->depletable_ = depletable_;
|
||||
mat->p0_ = p0_;
|
||||
mat->mat_nuclide_index_ = mat_nuclide_index_;
|
||||
mat->thermal_tables_ = thermal_tables_;
|
||||
mat->temperature_ = temperature_;
|
||||
|
||||
if (ttb_)
|
||||
mat->ttb_ = std::make_unique<Bremsstrahlung>(*ttb_);
|
||||
|
||||
mat->index_ = model::materials.size();
|
||||
mat->set_id(C_NONE);
|
||||
model::materials.push_back(std::move(mat));
|
||||
return *model::materials.back();
|
||||
}
|
||||
|
||||
void Material::finalize()
|
||||
{
|
||||
// Set fissionable if any nuclide is fissionable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue