@@ -1082,6 +1082,8 @@ braid_init_example_adjset(Node &mesh)
10821082 typedef std::map< point, std::map<index_t , index_t > > point_doms_map;
10831083 typedef std::map<std::set<index_t >, std::vector<std::vector<index_t > > > group_idx_map;
10841084
1085+ if (mesh.dtype ().is_empty ()) { return ; }
1086+
10851087 const std::string dim_names[3 ] = {" x" , " y" , " z" };
10861088 const index_t dim_count = blueprint::mesh::coordset::dims (
10871089 mesh.child (0 ).fetch (" coordsets" ).child (0 ));
@@ -3946,6 +3948,7 @@ void CONDUIT_BLUEPRINT_API bent_multi_grid(const conduit::Node &spec,
39463948
39473949 // Now refine selected domains.
39483950 doms_it.to_front ();
3951+ conduit::Node nested_doms;
39493952 while (doms_it.has_next ())
39503953 {
39513954 const Node& dom_node = doms_it.next ();
@@ -3958,14 +3961,25 @@ void CONDUIT_BLUEPRINT_API bent_multi_grid(const conduit::Node &spec,
39583961 const std::string nest_name = oss.str ();
39593962 if (last_dim == 2 )
39603963 {
3961- nest_quads (dom_node, res[doms_it.name ()], res [nest_name]);
3964+ nest_quads (dom_node, res[doms_it.name ()], nested_doms [nest_name]);
39623965 }
39633966 else
39643967 {
3965- nest_hexs (dom_node, res[doms_it.name ()], res [nest_name]);
3968+ nest_hexs (dom_node, res[doms_it.name ()], nested_doms [nest_name]);
39663969 }
39673970 }
39683971 }
3972+
3973+ // Tie adjacent refined domains together with adjsets.
3974+ braid_init_example_adjset (nested_doms);
3975+
3976+ // Now store the new domains back into the result.
3977+ NodeConstIterator nested_doms_it = nested_doms.children ();
3978+ while (nested_doms_it.has_next ())
3979+ {
3980+ const Node& ndom_node = nested_doms_it.next ();
3981+ res[nested_doms_it.name ()] = ndom_node;
3982+ }
39693983 }
39703984}
39713985
@@ -3978,6 +3992,10 @@ void CONDUIT_BLUEPRINT_API bent_multi_grid_amr(const conduit::Node &spec,
39783992 bent_multi_grid_defaults (default_spec);
39793993 default_spec[" domain0/nest_child_id" ] = 6 ;
39803994 default_spec[" domain0/nest_ratio" ] = 3 ;
3995+ default_spec[" domain1/nest_child_id" ] = 7 ;
3996+ default_spec[" domain1/nest_ratio" ] = 3 ;
3997+ default_spec[" domain5/nest_child_id" ] = 8 ;
3998+ default_spec[" domain5/nest_ratio" ] = 3 ;
39813999 bent_multi_grid (default_spec, res);
39824000 }
39834001 else
0 commit comments