Skip to content

[BUG] depletion matrix reader (crash with Serpent v 2.2.1) #511

@alfoa

Description

@alfoa

Summary of issue

The depletion matrix reader crashes when used to process depmtx resulting from Serpent v 2.2.1

Code for reproducing the issue

In any old version of the depmtx file, just add the line flx = 1.00000000E+00; right after the t = xxxxxxxx; record

Actual outcome including console output and error traceback if applicable

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/miniconda/envs/lib/python3.10/site-packages/serpentTools/parsers/__init__.py", line 154, in read
    returnedFromLoader.read()
  File "/miniconda/envs/lib/python3.10/site-packages/serpentTools/parsers/base.py", line 49, in read
    self._read()
  File "/miniconda/envs/lib/python3.10/site-packages/serpentTools/parsers/depmatrix.py", line 99, in _read
    match = self._getMatch(line, NDENS_REGEX, 'n0 vector')
  File "/miniconda/envs/lib/python3.10/site-packages/serpentTools/parsers/depmatrix.py", line 87, in _getMatch
    raise SerpentToolsException(
serpentTools.messages.SerpentToolsException: Depmtx reader failed to match n0 vector from input_depmtx_materialName_0_0.m:
flx =  xxxxxxxxE+yy;`

Expected outcome

successful parsing of the file

Versions

  • Version from serpentTools.__version__: 0.10.1
  • Python version - python --version: 3.10.12
  • IPython or Jupyter version if applicable: N/A
  • If using the development version, the output from git describe: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions