The reworked ENDF tree components: each Section now owns its buffer to allow for easy insertion and deletion of sections, files, materials, etc.
The tree components are no longer templated, only some of the constructors are.
The tree File and Material now have functions to remove, insert and replace tree Section and File instances. The tree Section also has an NC function to return the number of lines (required to reconstitute a new index for a material).
Tests for the Material, File and Section were refactored and tests were simplified (due to the introduction of the new Section constructor).
There is a slight reduction in parsing performance when parsing a material in its entirety. The new tree implementation takes about 10% longer. For example: parsing 556 incident neutron files now takes about 13.3 seconds while it used to take 12 seconds. There's some room for optimisation there.
There's a few more things that could have been implemented, but there's more than enough already to merit this pull request. The outstanding work is as follows:
cleaning up the ENDF sequence numbers at the end of the line
reindexing the material and updating the MF1 MT451 index
optimising parsing the material and file
UPDATE July 15, 2021:
reindexing is now enabled
the sequence numbers can now be cleaned
the tree components now allow for insertion, replacement and removal of specific pieces
The reworked ENDF tree components: each Section now owns its buffer to allow for easy insertion and deletion of sections, files, materials, etc.
The tree components are no longer templated, only some of the constructors are.
The tree File and Material now have functions to remove, insert and replace tree Section and File instances. The tree Section also has an NC function to return the number of lines (required to reconstitute a new index for a material).
Tests for the Material, File and Section were refactored and tests were simplified (due to the introduction of the new Section constructor).
There is a slight reduction in parsing performance when parsing a material in its entirety. The new tree implementation takes about 10% longer. For example: parsing 556 incident neutron files now takes about 13.3 seconds while it used to take 12 seconds. There's some room for optimisation there.
There's a few more things that could have been implemented, but there's more than enough already to merit this pull request. The outstanding work is as follows:
UPDATE July 15, 2021: