Skip to content
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Added 2D block rotation support in `conduit::blueprint::mpi::mesh::to_polygonal()`.
- Added field data to the `conduit::blueprint::mpi::mesh::to_polygonal()` transformation, including communication of vertex data on hanging nodes.
- Added `conduit::blueprint::mesh::specset::to_multi_buffer_full()`, `conduit::blueprint::mesh::specset::to_uni_buffer_by_element()`, and `conduit::blueprint::mesh::specset::to_multi_buffer_by_material()`, which are converters that take species sets between the three supported species set/material set representations.
- Added `conduit::blueprint::mesh::specset::is_multi_buffer()`, `conduit::blueprint::mesh::specset::is_uni_buffer()`, `conduit::blueprint::mesh::specset::get_num_species_for_material()`, and `conduit::blueprint::mesh::specset::get_material_names()`, which are simple species set utilities.
- Fixed `conduit::blueprint::mesh::utils::topology::compute_mesh_info()` so it does not generate a floating point exception when processing 1-d meshes under the Intel 25 compiler with C++20.

### Changed
Expand All @@ -36,13 +37,17 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Updates to use Silo 4.12 and HDF5 2.0.0.
- Reworked HDF5 handle managment to avoid resource leaks with exceptions.
- Relaxed the restriction on float and double volume fractions for data being read from Silo when the length of the mixed arrays is 0 (i.e. no mixed zones/volume fractions are present).
- Added logic to enforce Overlink requirements when writing species sets to Overlink files.

### Fixed

#### Conduit
- Fixed a bug preventing explicit length 0 in `yaml` schema.
- Fixed a bug where empty objects or lists were not written correctly to `yaml` schema.

#### Relay
- Fixed a bug preventing multiple species sets from being written when writing to Overlink.

## [0.9.5] - Released 2025-09-10

### Added
Expand Down
14 changes: 14 additions & 0 deletions src/libs/blueprint/conduit_blueprint_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7108,6 +7108,20 @@ bool verify_specset_species_names(const std::string &protocol,
return res;
}

//-------------------------------------------------------------------------
bool
mesh::specset::is_multi_buffer(const Node &specset)
{
return specset.child("matset_values").dtype().is_object();
}

//-------------------------------------------------------------------------
bool
mesh::specset::is_uni_buffer(const Node &specset)
{
return specset.child("matset_values").dtype().is_number();
}

//-----------------------------------------------------------------------------
bool
mesh::specset::verify(const Node &specset,
Expand Down
14 changes: 14 additions & 0 deletions src/libs/blueprint/conduit_blueprint_mesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,11 @@ namespace specset
conduit::Node &info);

//-------------------------------------------------------------------------
bool CONDUIT_BLUEPRINT_API is_multi_buffer(const conduit::Node &specset);

//-------------------------------------------------------------------------
bool CONDUIT_BLUEPRINT_API is_uni_buffer(const conduit::Node &specset);

void CONDUIT_BLUEPRINT_API to_multi_buffer_full(const conduit::Node &src_matset,
const conduit::Node &src_specset,
const std::string &dest_matset_name,
Expand All @@ -962,7 +967,16 @@ namespace specset
const std::string &dest_matset_name,
conduit::Node &dest_specset,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
index_t CONDUIT_BLUEPRINT_API get_num_species_for_material(
const conduit::Node &specset,
const std::string &matname);

//-------------------------------------------------------------------------
void CONDUIT_BLUEPRINT_API get_material_names(const conduit::Node &specset,
std::vector<std::string> &matnames);

//-------------------------------------------------------------------------
// Converts a blueprint specset to the silo style sparse mixed slot
// representation.
Expand Down
44 changes: 44 additions & 0 deletions src/libs/blueprint/conduit_blueprint_mesh_matset_xforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,50 @@ to_multi_buffer_by_material(const conduit::Node &src_matset,
namespace specset
{
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
index_t
get_num_species_for_material(const conduit::Node &specset,
const std::string &matname)
{
if (blueprint::mesh::specset::is_multi_buffer(specset))
{
if (specset["matset_values"].has_child(matname))
{
return specset["matset_values"][matname].number_of_children();
}
else
{
return 0;
}
}
else // uni buffer
{
if (specset["species_names"].has_child(matname))
{
return specset["species_names"][matname].number_of_children();
}
else
{
return 0;
}
}
}

//-----------------------------------------------------------------------------
void
get_material_names(const conduit::Node &specset,
std::vector<std::string> &matnames)
{
if (blueprint::mesh::specset::is_multi_buffer(specset))
{
matnames = specset["matset_values"].child_names();
}
else // uni buffer
{
matnames = specset["species_names"].child_names();
}
}

//-----------------------------------------------------------------------------
void
to_silo(const conduit::Node &specset,
Expand Down
Loading