Closed zxkjack123 closed 3 years ago
Yes - good spot!
If I remember correctly, FISPACT-II takes a maximum of 13 or 14 decimal places, otherwise you get this not so useful error message, so indeed this needs to be taken into account.
This code is a bit old now and we would be better off using f-strings now anyway. I would just vote to always dump to 10 decimal places anyway, since this is plenty of accuracy and most of them are just noise.
Something like:
def __str__(self):
strrep = f"FUEL {len(self.entries)}"
for i in self.entries:
strrep += f"\n{i[0]} {i[1]:.10E}")
By all means do a pull request and we can fix this.
An simple fispact-II input was generated via pypact. The material composition are calculated form as set as below:
However, fispact cannot deal with it and here is the error message:
I think the digit of float should be controled when writing input file to avoid running error. For example: