Skip to content

Commit

Permalink
Merge pull request #20 from svalinn/update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke authored Apr 8, 2024
2 parents 7ecdd45 + f693b65 commit 56b19c3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 56b19c3

Please sign in to comment.