mit-crpg / opendeplete

A depletion framework for OpenMC
MIT License
15 stars 5 forks source link

Volumes of all cells/materials are required #12

Closed wbinventor closed 7 years ago

wbinventor commented 7 years ago

Currently, all cell volumes are required, even those for cells which one does not wish to burn. One temporary workaround which @cjosey recommended to me is to use a defaultdict with a non-zero default for the volumes:

from collections import defaultdict

volumes = defaultdict(lambda: 1)

# Add volumes of burnable cells to collection
...

Although this seems to work just fine for my use cases, it would be nice if the OpenDeplete API were improved in the future to only expect volumes for those cells marked as True in the burn dictionary.

cjosey commented 7 years ago

Closed with #25.