From f693b65835d19756184d02e7738daf6d322ad2c0 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Mon, 8 Apr 2024 09:19:34 -0500 Subject: [PATCH] Update readme to reflect recent API changes --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 169a1b1..03a8953 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,12 @@ import dagmc model = dagmc.DAGModel('dagmc.h5m') -print(model.groups) +group_dict = model.groups_by_name +print(group_dict) fuel_group = groups['mat:fuel'] -v1 = fuel_group.get_volumes()[1] +v1 = fuel_group.volumes_by_id[1] print(v1) @@ -60,11 +61,11 @@ Code: ```python # move volume 1 from the fuel group to the group "mat:41" -groups['mat:fuel'].remove_set(v1) -groups['mat:41'].add_set(v1) +group_dict['mat:fuel'].remove_set(v1) +group_dict['mat:41'].add_set(v1) -print(groups['mat:fuel']) -print(groups['mat:41']) +print(group_dict['mat:fuel']) +print(group_dict['mat:41']) ``` Output: