Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Added `conduit::blueprint::mesh::matset::renumber_material_ids()`, which renumbers material ids for a material set to be in the range 0 to N - 1, where N is the number of materials.
- Added `conduit::blueprint::mesh::matset::count_materials_from_matset()`, which counts the number of materials in a given material set, taking into account the various matset layouts.
- Added `conduit::blueprint::mesh::matset::count_materials_from_specset()`, which counts the number of materials in a given species set, taking into account the various specset layouts.
- Added `conduit::blueprint::mesh::matset::to_uni_buffer_by_material()`, `conduit::blueprint::mesh::field::to_uni_buffer_by_material()`, and `conduit::blueprint::mesh::specset::to_uni_buffer_by_material()`, which for now only throw errors, but leave the door open for future support for this 4th material set layout.

### Changed

Expand All @@ -44,6 +45,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s

#### Blueprint
- Removed previously deprecated `quads_and_tris` and `hexs_and_tets` mesh types from `braid` in `blueprint::mesh::examples`.
- Renamed `conduit::blueprint::mesh::matset::to_multi_buffer_full()` to `conduit::blueprint::mesh::matset::to_multi_buffer_by_element()`.

#### Relay
- Updates to use Silo 4.12 and HDF5 2.0.0.
Expand All @@ -59,6 +61,9 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- 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.

#### Blueprint
- Fixed an issue with material set conversions where uni-buffer by material matsets would incorrectly follow the same path as multi-buffer by material matsets.

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

Expand Down
55 changes: 39 additions & 16 deletions src/libs/blueprint/conduit_blueprint_mesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,20 +807,26 @@ namespace matset
bool CONDUIT_BLUEPRINT_API is_material_dominant(const conduit::Node &matset);

//-------------------------------------------------------------------------
void CONDUIT_BLUEPRINT_API to_multi_buffer_full(const conduit::Node &src_matset,
conduit::Node &dest_matset);
// creates a multi-buffer non-sparse case
void CONDUIT_BLUEPRINT_API to_multi_buffer_by_element(const conduit::Node &src_matset,
conduit::Node &dest_matset);

//-------------------------------------------------------------------------
// creates a unibuffer case with 1st index into elements
// creates a unibuffer sparse case with 1st index into elements
void CONDUIT_BLUEPRINT_API to_uni_buffer_by_element(const conduit::Node &src_matset,
conduit::Node &dest_matset,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
// covers both the sparse and non sparse case
// creates a multi-buffer sparse case with 1st index into materials
void CONDUIT_BLUEPRINT_API to_multi_buffer_by_material(const conduit::Node &src_matset,
conduit::Node &dest_matset,
const float64 epsilon = CONDUIT_EPSILON);
//-------------------------------------------------------------------------
// throws an error as this case is not supported
void CONDUIT_BLUEPRINT_API to_uni_buffer_by_material(const conduit::Node &src_matset,
conduit::Node &dest_matset,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
// Converts a blueprint matset to the silo style sparse mixed slot
Expand Down Expand Up @@ -893,26 +899,34 @@ namespace field
std::map<std::string, std::string>& matset_names);

//-------------------------------------------------------------------------
void CONDUIT_BLUEPRINT_API to_multi_buffer_full(const conduit::Node &src_matset,
const conduit::Node &src_field,
const std::string &dest_matset_name,
conduit::Node &dest_field);
// creates a multi-buffer non-sparse case
void CONDUIT_BLUEPRINT_API to_multi_buffer_by_element(const conduit::Node &src_matset,
const conduit::Node &src_field,
const std::string &dest_matset_name,
conduit::Node &dest_field);

//-------------------------------------------------------------------------
// creates a unibuffer case with 1st index into elements
// creates a unibuffer sparse case with 1st index into elements
void CONDUIT_BLUEPRINT_API to_uni_buffer_by_element(const conduit::Node &src_matset,
const conduit::Node &src_field,
const std::string &dest_matset_name,
conduit::Node &dest_field,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
// covers both the sparse and non sparse case
// creates a multi-buffer sparse case with 1st index into materials
void CONDUIT_BLUEPRINT_API to_multi_buffer_by_material(const conduit::Node &src_matset,
const conduit::Node &src_field,
const std::string &dest_matset_name,
conduit::Node &dest_field,
const float64 epsilon = CONDUIT_EPSILON);
//-------------------------------------------------------------------------
// throws an error as this case is not supported
void CONDUIT_BLUEPRINT_API to_uni_buffer_by_material(const conduit::Node &src_matset,
const conduit::Node &src_field,
const std::string &dest_matset_name,
conduit::Node &dest_field,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
// Given a blueprint field and matset, converts the matset and the field
Expand Down Expand Up @@ -967,27 +981,36 @@ namespace 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,
conduit::Node &dest_specset);
// creates a multi-buffer non-sparse case
void CONDUIT_BLUEPRINT_API to_multi_buffer_by_element(const conduit::Node &src_matset,
const conduit::Node &src_specset,
const std::string &dest_matset_name,
conduit::Node &dest_specset);

//-------------------------------------------------------------------------
// creates a unibuffer case with 1st index into elements
// creates a unibuffer sparse case with 1st index into elements
void CONDUIT_BLUEPRINT_API to_uni_buffer_by_element(const conduit::Node &src_matset,
const conduit::Node &src_specset,
const std::string &dest_matset_name,
conduit::Node &dest_specset,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
// covers both the sparse and non sparse case
// creates a multi-buffer sparse case with 1st index into materials
void CONDUIT_BLUEPRINT_API to_multi_buffer_by_material(const conduit::Node &src_matset,
const conduit::Node &src_specset,
const std::string &dest_matset_name,
conduit::Node &dest_specset,
const float64 epsilon = CONDUIT_EPSILON);

//-------------------------------------------------------------------------
// throws an error as this case is not supported
void CONDUIT_BLUEPRINT_API to_uni_buffer_by_material(const conduit::Node &src_matset,
const conduit::Node &src_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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ using GetNMatSpecPtr = index_t (MatsetAccessor::*)(index_t, index_t) const;
index_t get_sbm_nspec_for_mat(const index_t elem_idx, const index_t mat_idx) const;

// uni-buffer by element (sparse by element)
// 0 <= elem_idx < num element
// 0 <= elem_idx < num elements
// 0 <= mat_idx < num mats for element elem_idx
// 0 <= spec_idx < num species for material mat_idx in element elem_idx
index_t get_sbe_mat_id(const index_t elem_idx, const index_t mat_idx) const;
Expand Down
Loading
Loading