Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature: Consolidate nuclide name and code processing functions #191

@yardasol

Description

@yardasol

Background and motivation

As of PR #189, there are at least three different functions that handle nuclide names and ZAM/ZAID codes. It would be nice if we could combine/simplify some of these.

Implementation details

In OpenMCDepcode, we have the following functions:

  • _convert_nucname_to_pyne()
  • convert_nuclide_code_to_name()
  • _convert_name_to_nuccode()

In SerpentDepcode, we have the following functions:

  • convert_nuclide_code_to_name()
  • _convert_name_to_nuccode()
  • map_nuclide_code_zam_to_serpent()
  • convert_nuclide_code_to_zam()

The following functions use these functions:

  • OpenMCDepcode._create_mass_percents_dictionary()
  • `SerpentDepcode.update_depletable_materials()
  • Simulation.store_after_repr()
  • Simulation._add_missing_nuclides()
  • Simulation.store_mat_data

Whoever works on this issue should try to combine/consolidate these functions to reduce repetition an the complexity of the program flow.

Potential snags

This may require adding/modifying the test suite.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions