Skip to content

Commit

Permalink
Merge branch 'develop' into task/2023_08_uberenv_update
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Sep 1, 2023
2 parents bbf0df4 + a6b0b17 commit 25cc2a8
Show file tree
Hide file tree
Showing 12 changed files with 739 additions and 161 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s

### Added

#### General
- Added `conduit_json_external` protocol. Creates a json schema representation of a node that includes all addresses that the node is pointing to. Parsing this schema will create a node equivalent to `set_external()`.

#### Relay
- Added ability to read N-dimensional hyperslabs from HDF5 leaf arrays into linear memory arrays.


### Changed

#### General
- Improved the efficiency of json parsing logic.

#### Blueprint
- The `conduit::blueprint::mpi::mesh::partition_map_back()` function was enhanced so it accepts a "field_prefix" value in its options. The prefix is used when looking for the `global_vertex_ids` field, which could have been created with a prefix by the same option in the `conduit::blueprint::mpi::mesh::generate_partition_field()` function.

### Fixed

#### Blueprint
Expand Down
2 changes: 1 addition & 1 deletion src/libs/blueprint/conduit_blueprint_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ verify_single_domain(const Node &n,
chld, chld_info, "topology", "topologies");
}

log::validation(info["nestets"],nset_res);
log::validation(info["nestsets"],nset_res);
res &= nset_res;
}
}
Expand Down
20 changes: 15 additions & 5 deletions src/libs/blueprint/conduit_blueprint_mesh_partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10003,6 +10003,12 @@ Partitioner::map_back_fields(const conduit::Node& repart_mesh,
}
}

// Get a field prefix. Some of the mapping fields used here may have
// used a field_prefix when they were generated.
std::string field_prefix;
if(options.has_child("field_prefix"))
field_prefix = options.fetch_existing("field_prefix").as_string();

// map repart domid -> orig domids
vector<vector<index_t>> map_tgt_domains(repart_doms.size());
// map repart domid -> orig domid -> original elem/vertex ids
Expand Down Expand Up @@ -10044,16 +10050,19 @@ Partitioner::map_back_fields(const conduit::Node& repart_mesh,
// first.
if (has_vert_fields)
{
std::string global_vertex_ids(field_prefix + "global_vertex_ids");

// map of orig domid -> global vert ids
map<index_t, vector<index_t>> orig_dom_gvids;
for (const auto& dom_ent : gid_to_orig_dom)
{
index_t orig_idx = dom_ent.first;
const Node& orig_dom = *dom_ent.second;
const Node& orig_dom_fields = orig_dom.fetch_existing("fields");
vector<index_t>& orig_gvids = orig_dom_gvids[orig_idx];
if (orig_dom["fields"].has_child("global_vertex_ids"))
if (orig_dom_fields.has_child(global_vertex_ids))
{
const index_t_accessor gvids = orig_dom["fields/global_vertex_ids/values"].value();
const index_t_accessor gvids = orig_dom_fields[global_vertex_ids + "/values"].value();
orig_gvids.resize(gvids.number_of_elements());
for (index_t ivert = 0; ivert < gvids.number_of_elements(); ivert++)
{
Expand All @@ -10073,12 +10082,13 @@ Partitioner::map_back_fields(const conduit::Node& repart_mesh,

for (index_t repart_idx = 0; repart_idx < static_cast<index_t>(repart_doms.size()); repart_idx++)
{
const conduit::Node& dom = *repart_doms[repart_idx];
const Node& dom = *repart_doms[repart_idx];
const Node& dom_fields = dom.fetch_existing("fields");

std::unordered_map<index_t, index_t> gvid_to_repart_vid;
if (dom["fields"].has_child("global_vertex_ids"))
if (dom_fields.has_child(global_vertex_ids))
{
const Node& global_vid_node = dom["fields/global_vertex_ids/values"];
const Node& global_vid_node = dom_fields[global_vertex_ids + "/values"];
const index_t_accessor gvids = global_vid_node.value();
for (index_t ivert = 0; ivert < gvids.number_of_elements(); ivert++)
{
Expand Down
Loading

0 comments on commit 25cc2a8

Please sign in to comment.