-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified src/mcnp_library.cpp to properly read the directory entries (#…
…30) * modified src/mcnp_library.cpp to properly read the directory entries According to an MCNP document, https://mcnp.lanl.gov/pdf_files/TechReport_2022_LANL_LA-UR-22-30006Rev.1_KuleszaAdamsEtAl.pdf the lines below "DIRECTORY" (case insensitive) consist of "seven- to eleven-entry description of each table". The present implementation, however, seems to assume eleven entries, and therefore when it encounters a seven-entry line, it coredumps in e.g. trying to convert a string to double in mcnp_library.cpp:191 To properly read these variable-entry-number lines, a modification was made by utilizing std::getline(); the input stream is read line-by-line and then decomposed. * Eliminate "goto LINE_LOOP:" * Account for white space after + and clang-format * Only read neutron related data. * To avoid going beyond the last directory line. * Ignore all blank lines in directory. --------- Co-authored-by: Kazuyoshi Furutaka (work) <furutaka.kazuyoshi@jaea.go.jp> Co-authored-by: Hunter Belanger <hunter.belanger@gmail.com>
- Loading branch information
1 parent
a250009
commit 50811ee
Showing
1 changed file
with
58 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters