-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge branch develop into master for 2023 release #965
Commits on Jun 27, 2022
-
Fix entry point bug in g application
Remove superfluous command in entry point source_check_emin copied from entry point source_get_emax during implementation, which was setting the value for emax. Not really clear to me why this was happening but it turns out that having emax as an argument in one entry point would force to also have in the other entry point to avoid SEGFAULT errors. However, line has been removed as it shouldn't have been there in the first place!
Configuration menu - View commit details
-
Copy full SHA for 753cfe8 - Browse repository at this point
Copy the full SHA 753cfe8View commit details -
Fix buffer overflow from scoring bin rounding
Before this change, there was a small risk of buffer overflow in the tutor7pp fluence scoring arrays. The value r2 was checked to be less than 400, and then the scoring bin number (from 0 to 199) is calculated using the expression (int)(sqrt(r2)*10.). The problem with this check is that certain double precision values less than 400 can nevertheless have a square root equal to exactly 20.0 due to floating-point rounding. For example, taking the square root of the double 399.99999999999994 results in 20.0 under certain conditions, not a value slightly less than 20.0 as would be expected. The default g++ rounding mode is round-to-nearest, so even with the square root's true value being under 20.0, the resulting double can be rounded upwards to 20.0 if the true value is closer to 20.0 than the previous representable float. Then, scoring in bin 200 results in buffer overflow in the scoring array. This change ensures the resulting scoring array bin integer is in bounds (< 200), eliminating the potential for buffer overflow.
Configuration menu - View commit details
-
Copy full SHA for 7d5e2ce - Browse repository at this point
Copy the full SHA 7d5e2ceView commit details -
Fix #828: out-of-bounds dose scoring when ir = -1
Check that the current region index (ir) is not -1 for region dose scoring. Before this change, there was an out-of-bounds read in d_reg_index when the region was -1 (outside the geometry).
Configuration menu - View commit details
-
Copy full SHA for 2e74c8e - Browse repository at this point
Copy the full SHA 2e74c8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c404f26 - Browse repository at this point
Copy the full SHA c404f26View commit details -
Fix buffer overflow from scoring vacuum media dose
Vacuum has a special medium number -1, while all other media get offsets from 0 to nmedia. Before this change, there was a buffer overflow if media dose scoring was used with a geometry that had vacuum as one of the media. The vector massM is indexed by medium number, but for any vacuum regions, it would read and write memory at the memory location one before the buffer bounds: massM[-1]. Skipping the vacuum region masses shouldn't matter, as vacuum dose is always zero. massM is only used later on with non-vacuum media, so skipping vacuum regions is the right choice instead of an alternative like appending the vacuum mass to massM.
Configuration menu - View commit details
-
Copy full SHA for efd0221 - Browse repository at this point
Copy the full SHA efd0221View commit details -
Fix element order in MCDF-XCOM shell-wise sampling
Bug: results depend on the order in which the material composition is defined. Reported by Iymad Mansour who observed that egs_brachy simulations of an irradiation with an isotropic 35 keV photon point source, embedded in a steel applicator, produced 5% differences in the surface dose of a water phantom when the order of the steel components was changed. Reproduced with egs_kerma for a 35 keV photon point source surrounded by a 1 mm steel encapsulation embedded in a spherical water phantom. Kerma at the spherical water shell next to the encapsulation differs by 4%. Cause: sampling element and atomic shell for photo-electric interaction with MCDF-XCOM shell-wise using unsorted array zelem rather than pe_zsorted. Solution: using sorted array pe_zsorted fixes the issue.
Configuration menu - View commit details
-
Copy full SHA for 1692e08 - Browse repository at this point
Copy the full SHA 1692e08View commit details
Commits on Jun 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5b7956c - Browse repository at this point
Copy the full SHA 5b7956cView commit details -
Fix egs-parallel leading character bug in job name
Fix a mistake in the previous fix for non-alpha numeric characters in the job name in egs-parallel jobs resulting in a crash. The previous fix removed non-alphanum characters from the start of the original job name, but actually we needed to remove from the start of the trimmed 14 character job name.
Configuration menu - View commit details
-
Copy full SHA for 90905b8 - Browse repository at this point
Copy the full SHA 90905b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 420c334 - Browse repository at this point
Copy the full SHA 420c334View commit details -
Change endl to \n in egs++ scoring for performance
Change a few occurrences of endl to \n in egs++ scoring routines, to increase performance by about 50%. The reason for this is that endl performs a buffer flush each time, which is not necessary. The performance hit was very noticeable for large arrays, like a 300x300x300 3ddose file.
Configuration menu - View commit details
-
Copy full SHA for b53671e - Browse repository at this point
Copy the full SHA b53671eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b811681 - Browse repository at this point
Copy the full SHA b811681View commit details -
Add git info to makefiles and output
Add a record of the git hash, branch and compile time to the c++ makefiles. This allows the c++ codes to access those parameters as defines. Advanced applications now output those values during initEGSnrcBackEnd().
Configuration menu - View commit details
-
Copy full SHA for 9da54a8 - Browse repository at this point
Copy the full SHA 9da54a8View commit details -
Add app compile time and report local differences
Add the compilation time of an application to the printout of git hash and branch, and add these messages to the mortran codes. Also add a check for applications in the makefile to compare with the HEN_HOUSE versions and print a warning if there are differences. With the git information now printed to machine.mortran, it is not necessary to pass it as c++ compile flags. However, I will leave these flags for future use.
Configuration menu - View commit details
-
Copy full SHA for 811fdb7 - Browse repository at this point
Copy the full SHA 811fdb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for db0bb94 - Browse repository at this point
Copy the full SHA db0bb94View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57879d8 - Browse repository at this point
Copy the full SHA 57879d8View commit details -
Add git log to configuration for windows
Also replace an old reference to nmake with mingw32-make.
Configuration menu - View commit details
-
Copy full SHA for 0cd410d - Browse repository at this point
Copy the full SHA 0cd410dView commit details -
Change git reporting to be passed at compile time
Change the git branch and commit reporting to be passed as defines at compile time, instead of being generated during the configuration of EGSnrc. This fixes the issue where users could switch branches but not run the configuration script, resulting in the wrong git branch and commit being output.
Configuration menu - View commit details
-
Copy full SHA for 9c677c9 - Browse repository at this point
Copy the full SHA 9c677c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d30bf8 - Browse repository at this point
Copy the full SHA 4d30bf8View commit details
Commits on Jun 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1a12487 - Browse repository at this point
Copy the full SHA 1a12487View commit details -
Configuration menu - View commit details
-
Copy full SHA for 017eb2e - Browse repository at this point
Copy the full SHA 017eb2eView commit details -
Guard against more than one track_scoring object
As discussed in issue #745 ensure that one EGS_TrackScoring object is define to prevent bugs at write time when multiple objects try to write to the same file.
Configuration menu - View commit details
-
Copy full SHA for 0656939 - Browse repository at this point
Copy the full SHA 0656939View commit details -
Fix memory leaks reported by sanitizer in egs++
Fix memory leaks in EGS_AdvancedApplication: interpolation arrays are never freed, and transportp is allocated by EGS_Input::getInputItem but never freed. Also Fix memory leak in EGS_ObjectFactory::createObjects: EGS_Input* input is allocated by EGS_Input::takeInputItem but never freed. Memory leaks reported by AddressSanitizer.
Configuration menu - View commit details
-
Copy full SHA for def34e2 - Browse repository at this point
Copy the full SHA def34e2View commit details -
Fix regions array buffer overflow in egs++ viewer
After compiling egs_view with asan support, there was a buffer overflow error traced back to the memcpy call in ImageWindow::paintEvent. ERROR: AddressSanitizer: dynamic-stack-buffer-overflow ... READ of size 400 at 0x7ffe71889e40 thread T0 #0 0x7f543595ecdf (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x99cdf) #1 0x55dc3acdbb15 in memcpy #2 0x55dc3acdbb15 in ImageWindow::paintEvent(QPaintEvent*) #3 0x7f5434f86047 in QWidget::event(QEvent*) The issue is that memcpy will always copy sizeof(lastRegions) bytes into the array regions. But before this change, regions could be shorter than lastRegions, leading to a buffer overflow. After this change, maxreg is always set to N_REG_MAX, the length of lastRegions.
Configuration menu - View commit details
-
Copy full SHA for 825038e - Browse repository at this point
Copy the full SHA 825038eView commit details -
Fix total dose in the getting started solutions
In the solution to one of the questions in the getting-started manual, the total dose was calculated as the sum of dose to regions, instead of appropriately weighted by the relative volume of each region. This was corrected, as well as another typo in the instructions. Reported by @mjukdisk in discussion #780.
Configuration menu - View commit details
-
Copy full SHA for 19dee1b - Browse repository at this point
Copy the full SHA 19dee1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d673538 - Browse repository at this point
Copy the full SHA d673538View commit details -
Fix #803: window error from DYNJAWS in BEAMnrc GUI
Fix a GUI error that occurred in DYNJAWS jaw definitions when clicking the button to calculate the jaw settings from the field size and SSD. The button triggered a function that was duplicated with the same name in SYNCJAWS, leading to the error. As the fix, the syncjaws version of the function has been renamed. This bug has existed since SYNCJAWS was added to the GUI.
Configuration menu - View commit details
-
Copy full SHA for 2aa5dcc - Browse repository at this point
Copy the full SHA 2aa5dccView commit details -
Decrease minimum inter-CM gap from 0.01 to 1e-5 cm
Set the minimum distance between component modules in BEAMnrc to 1e-5 cm (macro $MIN_GAP). Previously this minimum gap was set to 0.01 cm. Given that the code is normally used in double-precision nowadays, there is no point in leaving such a large value as the default. This change follows for looking into issue #773.
Configuration menu - View commit details
-
Copy full SHA for 25690cd - Browse repository at this point
Copy the full SHA 25690cdView commit details -
Fix #749: add SAD to z position for phsp scoring
Add the source-axis distance to the z position of the particle before it is written to the phase space file. This change only affects IAEA phsp sources, and only when scoring particles in BEAMnrc coordinates.
Configuration menu - View commit details
-
Copy full SHA for c4267ce - Browse repository at this point
Copy the full SHA c4267ceView commit details -
Fix flurznrc bug upon reading the SLOTE parameter
Fix a minor bug in FLURZnrc where it expected the wrong number of inputs when reading in the SLOTE parameter from the egsinp file. This did not result in any actual issues, but an error message was printed to the screen about the user providing the wrong number of inputs.
Configuration menu - View commit details
-
Copy full SHA for a02eab7 - Browse repository at this point
Copy the full SHA a02eab7View commit details -
Gracefully exit addphsp if too many particles
Implement a graceful exit from the addphsp application if the total number of particles is greater than 2^32-1, the maximum count that can be stored in the header. Only enforce this for a phase space in EGSnrc format.
Configuration menu - View commit details
-
Copy full SHA for 495ff78 - Browse repository at this point
Copy the full SHA 495ff78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f0066a - Browse repository at this point
Copy the full SHA 6f0066aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec6a42f - Browse repository at this point
Copy the full SHA ec6a42fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 930014e - Browse repository at this point
Copy the full SHA 930014eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a06ce0 - Browse repository at this point
Copy the full SHA 4a06ce0View commit details
Commits on Jul 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3271054 - Browse repository at this point
Copy the full SHA 3271054View commit details -
Fix y boundary for synchdmlc target overrides
Restore some code from DYNVMLC that seemed necessary to avoid changing regions when the particle had not actually traveled as far as the region boundary.
Configuration menu - View commit details
-
Copy full SHA for 7e5d0f7 - Browse repository at this point
Copy the full SHA 7e5d0f7View commit details -
Note that commented out debug write statements are still present in the source code.
Configuration menu - View commit details
-
Copy full SHA for 88828ac - Browse repository at this point
Copy the full SHA 88828acView commit details -
Fix HOWNEAR for half isocenter leaves
Note that commented out debug write statements are still present in the source code.
Configuration menu - View commit details
-
Copy full SHA for bd60702 - Browse repository at this point
Copy the full SHA bd60702View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1df517f - Browse repository at this point
Copy the full SHA 1df517fView commit details -
Debug half target and half iso cross sections
Also comment out debug write statements.
Configuration menu - View commit details
-
Copy full SHA for 25d24eb - Browse repository at this point
Copy the full SHA 25d24ebView commit details -
Add new leaf orientation option for synchdmlc
Add $SYNCHDMLC_ORIENT options to flip leaf numbering and cross-sections with respect to the axis perpendicular to the opening axis, so that the MLC coordinate system matches that in the manufacturer (Varian) specs for 120MLC and HD120. This reflection reverses the order of leaf numbering, hence leaf opening sequences are automatically "flipped" so that the opening coordinate applied to leaf i is instead applied to leaf N-i+1, where N is the total number of leaves. See the updated BEAMnrc manual for more details. Also, add new ORIENT=2,3 options to SYNCHDMLC gui
Configuration menu - View commit details
-
Copy full SHA for 39d85c9 - Browse repository at this point
Copy the full SHA 39d85c9View commit details -
Reverse definition of leaf opening sequence
Reverse leaf opening sequence definition for option ORIENT_$SYNCHDMLC=2,3
Configuration menu - View commit details
-
Copy full SHA for 7c0e351 - Browse repository at this point
Copy the full SHA 7c0e351View commit details -
Fix synchdmlc QUARTER leaf restriction relaxation
Reorder cross section y boundaries when input restrictions are relaxed.
Configuration menu - View commit details
-
Copy full SHA for 5230f76 - Browse repository at this point
Copy the full SHA 5230f76View commit details -
Configuration menu - View commit details
-
Copy full SHA for b64d4f2 - Browse repository at this point
Copy the full SHA b64d4f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f5143b - Browse repository at this point
Copy the full SHA 5f5143bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 11cf3b8 - Browse repository at this point
Copy the full SHA 11cf3b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e0b122 - Browse repository at this point
Copy the full SHA 5e0b122View commit details -
Configuration menu - View commit details
-
Copy full SHA for c35eda8 - Browse repository at this point
Copy the full SHA c35eda8View commit details
Commits on Jul 8, 2022
-
EGS_Mesh: initial commit of egs_mesh library files
Add an egs++ geometry called egs_mesh that implements particle transport methods for imported CAD mesh files in the Gmsh format. Note that the mesh filename extension must be ".msh".
Configuration menu - View commit details
-
Copy full SHA for 62b70a2 - Browse repository at this point
Copy the full SHA 62b70a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42a2ee3 - Browse repository at this point
Copy the full SHA 42a2ee3View commit details -
EGS_Mesh: initial commit of msh file parser
This is a combination of 8 original commits to start implementing a .msh file parser, and associated unit tests: - parse msh file version header - parse msh2 $Nodes section - parse msh2 and msh4 physical groups - parse msh2 $Elements section - parse msh4 $Entities section
Configuration menu - View commit details
-
Copy full SHA for 3ef76e0 - Browse repository at this point
Copy the full SHA 3ef76e0View commit details -
EGS_Mesh: remove msh2 support, only support msh4
The original intent for the msh file parser was to support both the legacy (but stable) v2.2 and today's default (v4.1). Thinking again, it's better if we only need to maintain a single parser. v4.1 is the default for Gmsh today. There are no planned changes to the sections we care about ($Entities, $PhysicalNames, $Elements and $Nodes). Any future 4.x revisions will hopefully not break the parser and we could "support" them by accepting the new versions in parse_msh_version.
Configuration menu - View commit details
-
Copy full SHA for 00e52d3 - Browse repository at this point
Copy the full SHA 00e52d3View commit details -
EGS_Mesh: further implement msh4 file parser
This is a combination of 11 original commits related to the implementing the msh4 parser, and associated unit tests: - parse msh4 $Nodes entity bloc - parse entire msh4 $Nodes section - parse single msh4 element bloc - parse entire msh4 $Elements section - add default values for mesh data structs - Use namespace constant SIZET_MAX for default value - add test for duplicate msh4 entities - fix container size warnings - add minimum required input sections for msh v4.1
Configuration menu - View commit details
-
Copy full SHA for 13c14c5 - Browse repository at this point
Copy the full SHA 13c14c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54d0cf6 - Browse repository at this point
Copy the full SHA 54d0cf6View commit details -
EGS_Mesh: catch errors and throw in msh4 parser
This is a combination of 14 original commits related to catching errors and adding exception throws in the msh4 parser: - catch node tag overflow - catch duplicate tags for all sections - bubble up section parsing errors - document that parsing functions ensure unique tags - check that each mesh volume has a known physical group tag - check that each tetrahedron has a valid volume (entity) tag - throw exceptions for errors in parse_msh_version - throw exceptions for errors in parse_msh4_groups - throw exceptions for errors in parse_msh4_node_bloc - throw exceptions for errors in parse_msh4_nodes - throw exceptions for errors in parse_msh4_element_bloc - throw exceptions for errors in parse_msh4_elements - throw exceptions for errors in parse_msh4_entities - throw exceptions for errors in parse_msh_file and parse_msh4_body
Configuration menu - View commit details
-
Copy full SHA for 3409236 - Browse repository at this point
Copy the full SHA 3409236View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6759b21 - Browse repository at this point
Copy the full SHA 6759b21View commit details -
EGS_Mesh: remove extra files and egs_mesh lib
Remove all files not directly related to msh parsing to reduce the scope of this branch. Also, temporarily remove egs_mesh library from egs++ Makefile: it will be added back when egs_mesh.h and egs_mesh.cpp are added back as well.
Configuration menu - View commit details
-
Copy full SHA for b4c47bb - Browse repository at this point
Copy the full SHA b4c47bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for af9a0c6 - Browse repository at this point
Copy the full SHA af9a0c6View commit details -
EGS_Mesh: add msh_parser namespaces to shield impl
Add msh_parser namespaces to split the API into public and private sections. Also, remove the redundant msh4 label in names of functions now in the msh41 namespace, and arrange data types at top of msh41 namespace.
Configuration menu - View commit details
-
Copy full SHA for be030dd - Browse repository at this point
Copy the full SHA be030ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 904e50e - Browse repository at this point
Copy the full SHA 904e50eView commit details -
EGS_Mesh: add pass-through constructors
Add pass-through constructors for all plain-old-data (POD) mesh data types. We previously relied on aggregate initialization for brevity but that is not actually supported in C++11 if structs have default members (it was added in C++14). The new constructors are boilerplate but keep us compliant with C++11.
Configuration menu - View commit details
-
Copy full SHA for f9d6a24 - Browse repository at this point
Copy the full SHA f9d6a24View commit details -
Configuration menu - View commit details
-
Copy full SHA for c5b3c9a - Browse repository at this point
Copy the full SHA c5b3c9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 966240a - Browse repository at this point
Copy the full SHA 966240aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59b943c - Browse repository at this point
Copy the full SHA 59b943cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b92addc - Browse repository at this point
Copy the full SHA b92addcView commit details -
Configuration menu - View commit details
-
Copy full SHA for b2079b9 - Browse repository at this point
Copy the full SHA b2079b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea6485e - Browse repository at this point
Copy the full SHA ea6485eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b72e89f - Browse repository at this point
Copy the full SHA b72e89fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94831c0 - Browse repository at this point
Copy the full SHA 94831c0View commit details -
EGS_Mesh: factor msh41 parser into egs_mesh.cpp
Added static to all functions in msh_parser so it can be included in multiple translation units without causing linker errors. This should probably be refactored into a traditional header-implementation pair.
Configuration menu - View commit details
-
Copy full SHA for e180df1 - Browse repository at this point
Copy the full SHA e180df1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ee2592 - Browse repository at this point
Copy the full SHA 7ee2592View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46e42be - Browse repository at this point
Copy the full SHA 46e42beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 477adea - Browse repository at this point
Copy the full SHA 477adeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51f0797 - Browse repository at this point
Copy the full SHA 51f0797View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1b217b - Browse repository at this point
Copy the full SHA c1b217bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41bdd8e - Browse repository at this point
Copy the full SHA 41bdd8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e38d02 - Browse repository at this point
Copy the full SHA 7e38d02View commit details -
Configuration menu - View commit details
-
Copy full SHA for d01ba47 - Browse repository at this point
Copy the full SHA d01ba47View commit details -
EGS_Mesh: implement howfar method, internal case
We're using the standard Möller-Trumbore ray-triangle intersection algorithm for each side of the tetrahedron. 1. Check if the velocity is parallel to the triangle, exit if so. 2. Calculate the barycentric coordinates u, v of the potential intersection point. 3. If the barycentric coordinates are inside the triangle, return the distance to the intersection point. Both clockwise and counter-clockwise point windings are allowed.
Configuration menu - View commit details
-
Copy full SHA for 2623708 - Browse repository at this point
Copy the full SHA 2623708View commit details -
EGS_Mesh: order nodes, store face boundaries
This is a combination of 4 original commits related to node ordering and storing the neighbour face boundaries: 1. Update neighbour algorithm to use int for elements: they must fit into an int to work with EGSnrc. 2. Order the nodes consistently ABCD. 3. Guarantee neighbour-face node ordering: To help implement howfar and hownear, guarantee that face 0 is made up of nodes b, c, d, face 1 is nodes a, c, d. This is an invariant we have to maintain for each mesh tetrahedron to avoid subtle transport errors. 4. Store which faces are boundaries: This will ensure only boundary faces are considered for intersection with an exterior point, assuming robustness in the intersection calculation.
Configuration menu - View commit details
-
Copy full SHA for 1617ad9 - Browse repository at this point
Copy the full SHA 1617ad9View commit details -
EGS_Mesh: implement howfar method, external case
Loop over the boundary faces and find the closest intersection along the given ray.
Configuration menu - View commit details
-
Copy full SHA for dba06ed - Browse repository at this point
Copy the full SHA dba06edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b6c4fd - Browse repository at this point
Copy the full SHA 2b6c4fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83a86c4 - Browse repository at this point
Copy the full SHA 83a86c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e19f32e - Browse repository at this point
Copy the full SHA e19f32eView commit details -
EGS_Mesh: try to fix negative usteps with epsilon
By rejecting negative distances we try to avoid negative ustep errors encountered with the initial intersection algorithm.
Configuration menu - View commit details
-
Copy full SHA for 0fa20cc - Browse repository at this point
Copy the full SHA 0fa20ccView commit details -
EGS_Mesh: add mevegs application based on tutor7pp
We'd like to write an output file based on the mesh when the simulation is done. This is most convenient to do in something similar to Mevegs_Application::outputResults but requires specific knowledge of the EGS_Mesh geometry (e.g., region volumes). We dynamic_cast the base geometry to a EGS_Mesh pointer to access its data and prepare to save a Gmsh file. Also, copy the input file to a new output file and output result data vectors. We're writing out scoring data to Gmsh for quick inspection after a simulation. Increase the maximum number of media to 200 for ICRP 145: the MRCP_AF and AM models have 52 media each, and ICRP 145 meshes have ~190 organs (media) and are both around 8M elements.
Configuration menu - View commit details
-
Copy full SHA for fb6a465 - Browse repository at this point
Copy the full SHA fb6a465View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e0fa43 - Browse repository at this point
Copy the full SHA 1e0fa43View commit details -
Configuration menu - View commit details
-
Copy full SHA for e958ae5 - Browse repository at this point
Copy the full SHA e958ae5View commit details -
EGS_Mesh: fix output to match original egs_mesh
With this fix, the results from the two mesh libraries appear nearly identical. The from-scratch implementation seems 20-30% slower which may be due to not pre-calculating face normal vectors. This and other potential optimizations will be investigated. There has not been any profiling done on either implementation. Also, write out element doses in Gy and remove stray debugging print statements
Configuration menu - View commit details
-
Copy full SHA for dabb5ca - Browse repository at this point
Copy the full SHA dabb5caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f32992 - Browse repository at this point
Copy the full SHA 0f32992View commit details -
EGS_Mesh: perf: precalculate boundary elements
Before (without inlining): 15.21% 15.21% mevegs libegs_mesh.so [.] EGS_Mesh::is_boundary After precalculation (without inlining): 4.64% 4.64% mevegs libegs_mesh.so [.] EGS_Mesh::is_boundary After switching to std::uint8_t to avoid bit_reference costs (wi): 3.89% 3.89% mevegs libegs_mesh.so [.] EGS_Mesh::is_boundary ...and moving the function to the header allowed it to be inlined.
Configuration menu - View commit details
-
Copy full SHA for be401b1 - Browse repository at this point
Copy the full SHA be401b1View commit details -
EGS_Mesh: perf: back to bool vector to save space
The 1% overall gain for vector<uint8_t> was for a pathological case where the source was pointed away from the mesh. Space savings may become more important as the mesh grows larger.
Configuration menu - View commit details
-
Copy full SHA for 98d534b - Browse repository at this point
Copy the full SHA 98d534bView commit details -
EGS_Mesh: perf: reorder mesh by distance to source
Implement mesh reordering to try and reduce time spent in the isWhere loop. Simulation results are unchanged (as they should be). A first measurement is promising: a reduction from 75% to 5% of simulation time spent in isWhere. There is a noticeable difference when running simulations too: time spent in one batch went from ~13s to 4s. The EGS_Vector used as the reference point is hard-coded for the current test. Later commits will instead use the position of a particle generated by the source.
Configuration menu - View commit details
-
Copy full SHA for 52f619e - Browse repository at this point
Copy the full SHA 52f619eView commit details -
EGS_Mesh: perf: implement kdtree lookup in isWhere
Reordering was commented out for a clean comparison. The isWhere cost was reduced from ~75% without reordering to ~3.5%.
Configuration menu - View commit details
-
Copy full SHA for 834a2fc - Browse repository at this point
Copy the full SHA 834a2fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f99c77 - Browse repository at this point
Copy the full SHA 8f99c77View commit details -
EGS_Mesh: improve library and mevegs application
This is a combination of 6 original commits related to small improvements in egs_mesh and the mevegs application: - don't print results for large meshes (>100) - improve egs_mesh initialization warnings - silence int <-> size_t comparison warning - check that the output file was actually opened - make output file name based on input and msh name - set mesh labels and boundary tolerance from input
Configuration menu - View commit details
-
Copy full SHA for 28498aa - Browse repository at this point
Copy the full SHA 28498aaView commit details -
EGS_Mesh: fix msh output in egs_genvelope
The implementation is somewhat hacky but is intended for the most common case: wrapping an EGS_Mesh in a single simple, base geometry (e.g. some CAD model in an air box). This removes the requirement for users to mesh a bounding box at the Gmsh stage.
Configuration menu - View commit details
-
Copy full SHA for 0e670d3 - Browse repository at this point
Copy the full SHA 0e670d3View commit details -
EGS_Mesh: fix calculation of normals
EGS_Mesh wasn't displaying properly in egs_view, because the normals weren't being set correctly.
Configuration menu - View commit details
-
Copy full SHA for 54d5240 - Browse repository at this point
Copy the full SHA 54d5240View commit details -
Configuration menu - View commit details
-
Copy full SHA for 848a215 - Browse repository at this point
Copy the full SHA 848a215View commit details -
EGS_Mesh: refactor octree for better performance
- count overlapping elements in both bounding boxes - better octant numbering for reduced lookup cost - helper functions galore!
Configuration menu - View commit details
-
Copy full SHA for 9aca93c - Browse repository at this point
Copy the full SHA 9aca93cView commit details -
EGS_Mesh: improve octree for overlapping elements
Rarely (~1.5% for a 600,000 element mesh), part of an element may be contained within an octant but not counted as a bounded element because none of the nodes or centroid are within the octant. The previous implementation wrongly considered these points as outside (-1), while the brute force method disagreed and found the correct element. This issue was overcome by not immediately halting the search, but by storing the size of the largest tetrahedral edge and comparing it to the bounding box of the octant searched so far. If the search fails in the most likely octant, its siblings are searched and then the parent's siblings, etc, expanding the search area by moving up the octree. Only when this "largest possible tetrahedron search" is completed, does the octree conclude the point is indeed not inside the mesh.
Configuration menu - View commit details
-
Copy full SHA for 2076369 - Browse repository at this point
Copy the full SHA 2076369View commit details -
Configuration menu - View commit details
-
Copy full SHA for e575aa4 - Browse repository at this point
Copy the full SHA e575aa4View commit details -
EGS_Mesh: add a second octree for surfaces only
Refactor initialization code to carefully initialize static members.
Configuration menu - View commit details
-
Copy full SHA for f524cf6 - Browse repository at this point
Copy the full SHA f524cf6View commit details -
EGS_Mesh: fix error in ray-AABB intersection
See http://realtimecollisiondetection.net/books/rtcd/errata/ "Errata 4/27/05"
Configuration menu - View commit details
-
Copy full SHA for 6c9dd9e - Browse repository at this point
Copy the full SHA 6c9dd9eView commit details -
EGS_Mesh: search more octants in howfar_exterior
We also use a better tetrahedron-box intersection check to avoid requiring as many fallback searches for tetrahedra that are barely overlapping an octant. There are likely still some latent errors in the implementation because of the fragility of the floating-point routines.
Configuration menu - View commit details
-
Copy full SHA for fcd9b8b - Browse repository at this point
Copy the full SHA fcd9b8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4717497 - Browse repository at this point
Copy the full SHA 4717497View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e95a93 - Browse repository at this point
Copy the full SHA 8e95a93View commit details -
EGS_Mesh: implement octree-accelerated hownear
Compared to both howfar and isWhere, hownear is much more expensive even in the best case. We have to find the minimum distance to the mesh in any direction, not just along one direction like howfar. So even when a candidate element is found, we have to continue searching until we conclude that no closer elements exist by testing against octree bounding boxes. If the minimum distance to an octant is larger than the current best distance, we can skip searching that octant. Using this, we can avoid checking much of the total surface mesh, especially if we find a good candidate element early on. Even so, many calls to hownear will harm the overall simulation efficiency. This is currently the case for envelope simulations, since hownear is called many times in the envelope before it reaches the mesh. We're currently doing a full check for each hownear call, but could potentially do a global bounding box check and return the distance to the outer bounding box if the point is outside the mesh. Hopefully this fudged distance won't impact correctness.
Configuration menu - View commit details
-
Copy full SHA for 48b8a21 - Browse repository at this point
Copy the full SHA 48b8a21View commit details -
EGS_Mesh: return a lower bound in hownear_exterior
This change improves the overall simulation efficiency for envelope electron simulations by avoiding an exhaustive check to find the real minimum distance to the mesh. Instead, the distance to one of the surface tree's bounding boxes may returned. For example, this caused the efficiency of the MRCP_AM model in an air box with 1MeV photons, to increase from ~400 to ~5000 histories per second. This is allowed by the HOWNEAR spec (section 3.6 PIRS-701) which states: "In complex geometries, the mathematics of HOWNEAR can become difficult and sometimes almost impossible! If it is easier for the user to compute some lower bound to the nearest distance, this could be used..." Another alternative given in that document is setting the hownear result to 0.0, forcing ELECTR to assume it is very close to a boundary at all times, but that was found to be less efficient than this change. So, given an input point to hownear, there are two possibilities: 1. If the point is outside the global bounding box, return the distance to the closest point on the global bounding box and skip descending the tree. 2. If the point is inside the global bounding box, descend the tree until you reach a leaf node that contains the query point. A lower bound can then be obtained by returning the minimum of the distance to the bounding box sides and any boundary elements contained in the box.
Configuration menu - View commit details
-
Copy full SHA for c625755 - Browse repository at this point
Copy the full SHA c625755View commit details -
EGS_Mesh: improve hownear_interior performance
Before this change, we were doing a full closest-triangle-point calculation for query points inside the tetrahedron, which is overkill because if a point is inside a tetrahedron, the shortest point will be along a face normal. This translates to an approximate 10% performance improvement for electron simulations. This commit changes the minimum-interior calculation to a dot product and 3D vector subtraction (i.e. distance to the triangle plane). We are precalculating the face normals to further improve simulation performance (5% faster compared to the baseline, calculating the normals on the fly), but this comes with a fairly large increase in memory. Each tetrahedron face normal has 3 double values, so the additional memory per element is (4 x 3 x 8 =) 96 bytes. For the 8-million element MRCP models, that is around 800 MB. We will offset this increase by no longer storing the node coordinate data inline, but instead use offsets into a node data vector. This precalculation step will be somewhat of a waste for photon simulations and if memory use becomes a problem it might be worthwhile making this into a optional flag to be configured in the input file.
Configuration menu - View commit details
-
Copy full SHA for 5b0bad7 - Browse repository at this point
Copy the full SHA 5b0bad7View commit details -
EGS_Mesh: pass to octree constructor, save memory
This change avoids copying node coordinate data over and over in the octree constructor and instead looks it up using the EGS_Mesh. This reduces the memory spike observed during initialization, which was as high as 5GB but is now lowered to 4GB for the MRCP_AM model. The steady state is around 2GB but should be lower after node coordinate information is de-duplicated.
Configuration menu - View commit details
-
Copy full SHA for 19dfd78 - Browse repository at this point
Copy the full SHA 19dfd78View commit details -
EGS_Mesh: store node offsets instead of coords
This change reduces the total memory used by only storing node coordinate information once instead of each time a node is used in a tetrahedron. For the 8-million tetrahedron MRCP_AM model, peak memory dropped from 4GB to 3.4GB and steady-state memory usage dropped from 2GB to 1.4GB, according to the massif heap profiler. This does not appear to have caused simulation runtime performance to worsen at all.
Configuration menu - View commit details
-
Copy full SHA for acef99e - Browse repository at this point
Copy the full SHA acef99eView commit details -
EGS_Mesh: rework constructor to reduce peak memory
Besides being more straightforward at a high-level, this change is intended to reduce peak memory usage as much as possible in the constructor. Before this change, there were a number of large temporaries (e.g. the input vector of elements) that were still alive during memory-intensive operations like building the octrees and constructing the face-normal vector. The important changes here are: 1. The potentially large input vectors to the constructor are dropped at the end of initializeElements as soon as the EGS_Mesh equivalents are built. 2. The octree initialization step was moved before the face normal initialization step, because the octree step is fairly memory intensive and the face normal data is potentially large (~0.8GB for an 8 million element mesh). The face normals aren't used by the octree setup so leave calculating them to the end of the constructor after all the extra memory used to construct the octrees is freed up. For the MRCP_AM model (8.2 million elements) these changes brought the peak memory usage down from 3.4GB to 2.2GB, which is around 1.5 times the steady state usage.
Configuration menu - View commit details
-
Copy full SHA for bff7bff - Browse repository at this point
Copy the full SHA bff7bffView commit details -
EGS_Mesh: reduce memory use of neighbour algorithm
- Use std::array on stack instead of heap vector in Face constructor. - Since we know both node and element numbers fit into an int, use int instead of std::size_t in neighbour-finding algorithms. This change lowered the memory used during the neighbour-finding step down from 2.2GB to ~1.6 GB and shifted the location of the global memory peak. The new global memory peak is during the face normal calculation step (~1.9GB).
Configuration menu - View commit details
-
Copy full SHA for a006a3d - Browse repository at this point
Copy the full SHA a006a3dView commit details -
EGS_Mesh: move parsed data vectors in constructor
This avoids any potential copies of these large vectors.
Configuration menu - View commit details
-
Copy full SHA for 37d8b77 - Browse repository at this point
Copy the full SHA 37d8b77View commit details -
EGS_Mesh: remove obsolete or unnecessary code
This is a combination of 4 original commits devoted to removing dead code in the egs_mesh library: 1. Remove dead code. 2. Remove unnecessary isWhere logic. With the introduction of the better box-tetrahedron intersection check, we know, barring any intersection check bugs, that if a point isn't found in an octant, we can immediately exit instead of searching until a minimum bounding box around the largest edge is reached. This simplifies both the isWhere implementation and lets us get rid of the octree's static members. 3. Remove obsolete kdtree classes. 4. Remove obselete reordering code: While reordering did improve performance over a brute search, performance got worse and worse farther away from the source as expected. The octree methods are faster and have better scaling.
Configuration menu - View commit details
-
Copy full SHA for ff647c0 - Browse repository at this point
Copy the full SHA ff647c0View commit details -
EGS_Mesh: fix destructor definition issue
Before this change, I tried to compile a unit test suite for EGS_Mesh, that included "egs_mesh.h". There was a confusing compiler error: error: invalid application of ‘sizeof’ to incomplete type ‘EGS_Mesh_Octree’ which stems from defining the destructor in the header file, where it can't properly destruct the forward declared EGS_Mesh_Octree class yet. For some reason, this was the first time this error came up even though we include "egs_mesh.h" in the mevegs user code for example. Also, use unique geometry name in EGS_Mesh constructor.
Configuration menu - View commit details
-
Copy full SHA for 6e2bcea - Browse repository at this point
Copy the full SHA 6e2bceaView commit details -
EGS_Mesh: fix howfar_interior for undershoots
Fix a major bug in howfar_interior. The previous implementation did not ensure that the particle had to be "in front" of the tetrahedron face it was intersecting with. So if the particle was slightly outside of the tetrahedron as in the case of numerical undershoot, the wrong face would be intersected. Here is a diagram of the situation: /\ * -> / \ /____\ The particle is numerically outside the tetrahedron, but EGS considers it inside and we are required to calculate howfar as if it were inside (see Bielajew's "HOWFAR and HOWNEAR: Geometry Modelling for Monte Carlo Particle Transport"). So the near side must not be intersected. But the previous implementation did not account for this and so sometimes a particle travelling along one direction would be transported into a neighbour element in the opposite direction. We now ensure the particle must be on the "right" side of the tetrahedron face to intersect it. In all there are three cases now handled in howfar_interior: 1. The position is inside the region: calculate the intersection without further complications. 2. The position is outside the region but will intersect one of the i interior faces: calculate the intersection, ignoring any backwards facing faces. 3. The position is outside the region and won't intersect any of the interior faces: return 0.0 as the howfar distance and set the new region number to match the position (even if it's not an immediate neighbour of the region in question). Case 1 | Case 2 | Case 3 | | /\ | /\ | /\ / \ | / \ | / \ / \ | / \ | / \ / * -> X | * -> / X | <- * / \ /________\ | /________\ | /________\ | | Intersection | Intersection | No intersection Cases 1 and 2 are both handled by the same logic for now, but it might be more efficient to use different equations for both (e.g. ray-plane intersection algorithms for case 1).
Configuration menu - View commit details
-
Copy full SHA for b5d7c4a - Browse repository at this point
Copy the full SHA b5d7c4aView commit details -
EGS_Mesh: refactor msh4.1 parser, use EGS_MeshSpec
Add a dedicated "parser-result" class (EGS_MeshSpec) has a few benefits: - It allows us to differentiate parsing errors from EGS_Mesh constructor errors. - It makes writing new parsers more straightforward by defining EGS_MeshSpec as the interface between the parser and EGS_Mesh. - It makes the EGS_Mesh constructor cleaner.
Configuration menu - View commit details
-
Copy full SHA for 4b9c882 - Browse repository at this point
Copy the full SHA 4b9c882View commit details -
EGS_Mesh: stream result data to directly to output
By avoiding buffering output data into result vectors, we avoid an increase in heap memory previously observed while writing the Gmsh output file.
Configuration menu - View commit details
-
Copy full SHA for 246842d - Browse repository at this point
Copy the full SHA 246842dView commit details -
EGS_Mesh: add Visualization Toolkit (VTK) output
Output results to a VTK file. Avoid writing a useless intermediate VTK file parallel job and instead only write it out for serial jobs (including calculate=combine runs). Also, make EGS_Mesh file output methods const correct.
Configuration menu - View commit details
-
Copy full SHA for e9f89ee - Browse repository at this point
Copy the full SHA e9f89eeView commit details -
EGS_Mesh: push stuck particles along momentum
Instead of crashing when a particle is stuck at an interface between regions (an infinite loop is detected), push particles along their momentum vector to ensure the simulation can proceed.
Configuration menu - View commit details
-
Copy full SHA for b015ef1 - Browse repository at this point
Copy the full SHA b015ef1View commit details -
EGS_Mesh: fix stuck particles at tet corners
Before this change, simple two-element infinite loops were detected, but not those involving more elements. This change tracks small steps and if a potential stuck particle is detected, pushes the particle along the momentum vector to continue the simulation. This case was detected with an internal point source simulation where the point source was exactly on a node shared by many tetrahedra.
Configuration menu - View commit details
-
Copy full SHA for aa99cf9 - Browse repository at this point
Copy the full SHA aa99cf9View commit details -
EGS_Mesh: recode howfar_interior with thick planes
Move to thick planes to make howfar_interior more robust. The previous version used ray-triangle intersections, which proved in practice to be fragile (infinite loops, missed intersections at corners, etc.). It is probably fine to use a modified ray-triangle intersection test, but using thick planes is easier to understand and simpler to implement. I believe this is also what is used in Geant, PHITS, and MCNP. I'm also using a small step epsilon (EGS_Mesh::min_step_size) to ensure a minimum step is taken. This could hang if this epsilon is near the rounding error (i.e. for very large mesh cells). But if the epsilon is too large, then very thin tetrahedra might be skipped over. If it's not feasible to find a minimum step automatically, it should at least be made user-adjustable (i.e. using EGS_BaseGeometry::boundaryTolerance). Don't check the smallest absolute distance to the thick plane, which can consider points far away from a tetrahedron (since the point could be closer to another plane). Instead, check the largest negative signed distance isn't larger than the tolerance. That way, points very far away from the tetrahedron but close to one of its infinite face planes aren't considered part of the thick plane. First testing of this new version was very encouraging: good performance and no hangs for known problem cases.
Configuration menu - View commit details
-
Copy full SHA for 35f65d0 - Browse repository at this point
Copy the full SHA 35f65d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a802369 - Browse repository at this point
Copy the full SHA a802369View commit details -
EGS_Mesh: fix media offsets if there's other media
Use addMedium to get the correct offset for media initialization, instead of starting from 0. If addMedium is called with a name already in the media list, the corresponding offset is returned. Otherwise, the media is added to the list and the new offset is returned. Before this change, EGS_Mesh used to always define element media offsets starting at 0. So if any media were defined before the mesh was created, the mesh media offsets would be wrong.
Configuration menu - View commit details
-
Copy full SHA for a5135b9 - Browse repository at this point
Copy the full SHA a5135b9View commit details -
EGS_Mesh: add progress indicators for setup
For large meshes over 500,000 elements, the EGS_Mesh setup time can take a few minutes. Add percent indicators for the setup steps that take the most time: - file parsing - neighbour finding - octree building The indicators let the user know everything is working during construction and that longer pauses are normal. Only log EGS_Mesh cstor progress for large meshes (smaller ones are built almost instantly so require no logging). The indicators are drawn on a single tty line using carriage returns. If the program is running as a batch job, only the final summary line is printed to avoid cluttering the log file. This feature has been tested on Windows and Linux. Example (interactive, all lines are redrawn on the same line): EGS_Mesh: reading 1030301 nodes (0%) # start EGS_Mesh: reading 1030301 nodes (1%) # in progress ... ... EGS_Mesh: reading 1030301 nodes (100%) EGS_Mesh: read 1030301 nodes in 1.541s # finish Example (batch, only the final summary is printed): EGS_Mesh: read 1030301 nodes in 1.541s # finish
Configuration menu - View commit details
-
Copy full SHA for 8f08a24 - Browse repository at this point
Copy the full SHA 8f08a24View commit details -
EGS_Mesh: fix various small issues in library
This is a combination of 6 original commits related to fixing some small issues in the egs_mesh library: - fix EGS_Mesh setup error formatting - add performance note to EGS_Mesh_Octree routine - fix move constructor and assignment definitions (can't be in header) - add a proper EGS_MeshSpec constructor - fix parse_msh_file interface definition - make EGS_Mesh constructor explicit - pass element index to EGS_Mesh neighbour function - fix EGS_Mesh and mevegs makefile dependencies
Configuration menu - View commit details
-
Copy full SHA for 7639706 - Browse repository at this point
Copy the full SHA 7639706View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70f250c - Browse repository at this point
Copy the full SHA 70f250cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9a33af - Browse repository at this point
Copy the full SHA d9a33afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80f4036 - Browse repository at this point
Copy the full SHA 80f4036View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64aaba7 - Browse repository at this point
Copy the full SHA 64aaba7View commit details -
EGS_Mesh: clean up library source code
This is a combination of 12 original commits related to cleaning up the egs_mesh library source code: - only throw std::runtime_error for uniform behaviour - improve missing mesh file error message - fix and clean up comments - remove unused class members - silence mesh_neighbours sign warning - fix library warnings for -Wall - fix inside definition to return region index, for correctness - fix bounding box print function - remove unused parameters from howfar_exterior - remove overly defensive range check in hownear - remove noisy warning in howfar recovery, now obsolete - set base geometry error flag instead of crashing for rare errors
Configuration menu - View commit details
-
Copy full SHA for a3eb460 - Browse repository at this point
Copy the full SHA a3eb460View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1908a26 - Browse repository at this point
Copy the full SHA 1908a26View commit details -
EGS_Mesh: add library documentation
Exclude implementation details such as EGS_Mesh_Octree, mesh_neighbours and msh_parser.
Configuration menu - View commit details
-
Copy full SHA for baeac81 - Browse repository at this point
Copy the full SHA baeac81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 307b556 - Browse repository at this point
Copy the full SHA 307b556View commit details -
EGS_Mesh: add egsinp scale key for non-cm units
Add a scale key so mesh files that aren't in cm can be scaled appropriately.
Configuration menu - View commit details
-
Copy full SHA for 45a6295 - Browse repository at this point
Copy the full SHA 45a6295View commit details -
EGS_Mesh: add a TetGen node and ele file parser
This commit adds a TetGen node and ele file parser to EGS_Mesh. This lets users provide meshes in the TetGen format, which is used by the ICRP 145 mesh phantoms, among others. Previously a conversion step was required to convert the ICRP 145 meshes to msh4.1. Meshes from TetGen can now be directly simulated using EGS_Mesh. The TetGen format uses a .node file to store node information and .ele file for element information. Either the node or ele file can be provided for the EGS_Mesh `file` input, the other will be opened automatically. Apart from adding direct support for important meshes from the literature, the TetGen format is simpler than the Gmsh format, offering an alternative for users generating their own mesh files. The Geant4 and PHITS tetrahedral mesh implementations also have support for TetGen files, so the same mesh can be used with each code.
Configuration menu - View commit details
-
Copy full SHA for a6ecb46 - Browse repository at this point
Copy the full SHA a6ecb46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dff78d - Browse repository at this point
Copy the full SHA 2dff78dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a34a80a - Browse repository at this point
Copy the full SHA a34a80aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6645b53 - Browse repository at this point
Copy the full SHA 6645b53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7eea190 - Browse repository at this point
Copy the full SHA 7eea190View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffe80ec - Browse repository at this point
Copy the full SHA ffe80ecView commit details
Commits on Jul 12, 2022
-
Fix configure script, missing 's' in sed command
Add the sed 's' command which was missing when setting the system name. Also, change the sed separator from ':' to '|' to avoid ambiguity with sed labels.
Configuration menu - View commit details
-
Copy full SHA for ec65bb2 - Browse repository at this point
Copy the full SHA ec65bb2View commit details
Commits on Jul 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 891b57c - Browse repository at this point
Copy the full SHA 891b57cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a214016 - Browse repository at this point
Copy the full SHA a214016View commit details
Commits on Jul 16, 2022
-
Add density correction files for icrm-hpge example
Add the density correction files that were used in the ICRM high purity germanium Monte Carlo comparison. Also update the materials in the example input file to refer to the correct file names.
Configuration menu - View commit details
-
Copy full SHA for 374fe8c - Browse repository at this point
Copy the full SHA 374fe8cView commit details
Commits on Jul 18, 2022
-
Check g++ version to set default c++ standard flag
Set the c++ standard to c++14 if the g++ version is 5 or greater, otherwise fall back on c++11. Some systems still rely on version 4.8 which only supports up to c++11 features.
Configuration menu - View commit details
-
Copy full SHA for 2c11e39 - Browse repository at this point
Copy the full SHA 2c11e39View commit details
Commits on Jul 22, 2022
-
Fix branch logging and code comparisons
Remove the git branch information and provide the commit hash only. The branch name is just a label that can point to any commit, so it remains equivocal. This also solves the issue with long branch names where the fortran code would fail to compile because of exceeding the line length. Also, fix the comparisons between egs_home and HEN_HOUSE/user_code apps, so that it doesn't report a difference when the HEN_HOUSE version doesn't exist.
Configuration menu - View commit details
-
Copy full SHA for 8b2fc94 - Browse repository at this point
Copy the full SHA 8b2fc94View commit details -
Update radionuclide source to rely on base source
Change the egs_radionuclude_source to take an input "base source" instead of defining a collimated or isotropic source. This way, any of the egs++ sources or a custom source can now be used to define the distribution of the radionuclide. Also, add warning messages for deprecated radionuclide source inputs. This change was originally motivated by simulations of targeted radionuclide therapy.
Configuration menu - View commit details
-
Copy full SHA for c986fd0 - Browse repository at this point
Copy the full SHA c986fd0View commit details
Commits on Jul 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 76fdd43 - Browse repository at this point
Copy the full SHA 76fdd43View commit details -
Fix #904: avoid gcc -mcmodel flag on macos systems
Add tests in the configure scripts to avoid setting the gcc memory model flag -mdmodel=medium if a darwin (macos) system is detected. This flag causes compilation failures at the linking stage.
Configuration menu - View commit details
-
Copy full SHA for bf2dab1 - Browse repository at this point
Copy the full SHA bf2dab1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea4c9b4 - Browse repository at this point
Copy the full SHA ea4c9b4View commit details -
Improve the .bindos format and add documentation
Change the binary format to the one suggested by Randle Taylor, and add information about the sparse matrix binary dose format in the DOSXYZnrc documentation.
Configuration menu - View commit details
-
Copy full SHA for 3fbde13 - Browse repository at this point
Copy the full SHA 3fbde13View commit details -
Add a .bindos output option to the DOSXYZnrc gui
Add an option to select the dose output format in the gui. Just emulating what was done for the howfarless option.
Configuration menu - View commit details
-
Copy full SHA for 1e33700 - Browse repository at this point
Copy the full SHA 1e33700View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab8758b - Browse repository at this point
Copy the full SHA ab8758bView commit details
Commits on Jul 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ee80a56 - Browse repository at this point
Copy the full SHA ee80a56View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe12794 - Browse repository at this point
Copy the full SHA fe12794View commit details
Commits on Oct 18, 2022
-
Change egs++ geometry getMass to getVolume
Change the egs_base_geometry getMass virtual function to a getVolume function that returns region volume instead of mass. Typically, initGeometry() is invoked before any media data is read in the application, hence getMass was unreliable. The getMass function was replaced with a getVolume function, which only depends on internal gemoetry definitions. The geometries in egs_autoenvelope, egs_nd_geometry, egs_rz, and egs_spheres are affected. The ausgab dose scoring object which outputs a 3ddose file was also changed to reflect the change from getMass to getVolume. This modification of egs_dose_scoring also now properly accounts for relativeRho in the mass calculation. Also, handle vacuum medium index appropriately in getMediumRho.
Configuration menu - View commit details
-
Copy full SHA for 35a59d3 - Browse repository at this point
Copy the full SHA 35a59d3View commit details
Commits on Oct 31, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2de7ac5 - Browse repository at this point
Copy the full SHA 2de7ac5View commit details -
Add git hash and compile time in BEAMnrc log
Fix compilation failure of BEAMnrc accelerators since the addition of git and compile time logging. This also adds back printing of the git hash, which was mistakenly removed in PR #898. Fix this for the compilation of the shared library as well.
Configuration menu - View commit details
-
Copy full SHA for 348feec - Browse repository at this point
Copy the full SHA 348feecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07bd11c - Browse repository at this point
Copy the full SHA 07bd11cView commit details -
Fix macOS configuration for alternative g++ names
The g++ compiler executable may have a longer name, for different installed versions (e.g., g++-11). Also, fix the wrong variable name printed in the option list.
Configuration menu - View commit details
-
Copy full SHA for e486d9b - Browse repository at this point
Copy the full SHA e486d9bView commit details -
Fix #894: revert egsphant to egs_brachy encoding
Revert to the egs_brachy encoding for egsphant files, allowing for 62 media encoded with the set of alphanumeric characters (where 0 is reserved for vacuum). Briefly, #633 expanded the number of media in egsphant files to 95, using all printable ascii characters. However, the number of media was also independently expanded in egs_glib for the development of egs_brachy, but using a different encoding consisting of only the 62 alphanumeric ascii characters. This led to inconsistent egsphant files that are no longer interchangeable. This issue was originally reported and discussed in clrp-code/egs_brachy#22.
Configuration menu - View commit details
-
Copy full SHA for 0f4f209 - Browse repository at this point
Copy the full SHA 0f4f209View commit details -
Configuration menu - View commit details
-
Copy full SHA for e22a88d - Browse repository at this point
Copy the full SHA e22a88dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 962cf5d - Browse repository at this point
Copy the full SHA 962cf5dView commit details
Commits on Jan 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9c8f0b4 - Browse repository at this point
Copy the full SHA 9c8f0b4View commit details
Commits on Jan 16, 2023
-
Fix #945, #804: egs_chamber examples don't work
Fix the egs_chamber examples so that they now run without needing to compile any BEAMnrc accelerators or make changes to the input file. Also fix a typo in the example2 water box size.
Configuration menu - View commit details
-
Copy full SHA for 4074a60 - Browse repository at this point
Copy the full SHA 4074a60View commit details -
Configuration menu - View commit details
-
Copy full SHA for e709f36 - Browse repository at this point
Copy the full SHA e709f36View commit details
Commits on Jan 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ef7f5fc - Browse repository at this point
Copy the full SHA ef7f5fcView commit details -
Add a fluence scoring ausgab object
- EGS_Interpolator: increase array size when creating an interpolator based on an array of value pairs to have an extra bin to prevent round-off errors. This is also done by PEGS4 when determining fit parameters for each interval. The extra bin uses the same parameters as the previous one, i.e., it extrapolates. - Add auxiliary methods to application classes to get electron step size, energy deposited and app source type. - Fluence scoring: at a plane, in regions for all particles.
Configuration menu - View commit details
-
Copy full SHA for 49ea9da - Browse repository at this point
Copy the full SHA 49ea9daView commit details -
Handle positrons in fluence scoring object
Get proper stopping power interpolator depending on charge.
Configuration menu - View commit details
-
Copy full SHA for f507af5 - Browse repository at this point
Copy the full SHA f507af5View commit details -
Add debugging switch and clean target
- Add "clean" target for dose and fluence scoring objects (instead of manually deleting files when building the ausgab object). Need to add to the rest of the ausgab objects! - One can now define DEBUG=-DDEBUG to turn on some debugging messages that I found useful. - Add MYDEF for user defines: use MYDEF=-DDEBUG to activate debugging messages and variables.
Configuration menu - View commit details
-
Copy full SHA for 0c97557 - Browse repository at this point
Copy the full SHA 0c97557View commit details -
Add base class to fluence scoring object
Reworked the classes for planar and volumetric fluence scoring to descend from a common base class which contains many commonalities, to avoid code duplication. Should have started that way!
Configuration menu - View commit details
-
Copy full SHA for 9374111 - Browse repository at this point
Copy the full SHA 9374111View commit details -
Add auxiliary fluence scoring functions
Add auxiliary functions to application classes, required by the fluence scoring ausgab object.
Configuration menu - View commit details
-
Copy full SHA for 22c62fa - Browse repository at this point
Copy the full SHA 22c62faView commit details -
Add a method to get the charge of source particles
- Add a method to get the charge of a base source, which returns -99 by default, matching the unknown type of the fluence scoring ausgab object. A base source does not know the charge of its particles unless it is later derived from a simple source. For instance a collection of sources, a beam source, or a phase space source will contain multiple type of particles. - Sources derived from the class EGS_SimpleSource return the source particle's charge. - Add a method to get source charge from the application.
Configuration menu - View commit details
-
Copy full SHA for 35da590 - Browse repository at this point
Copy the full SHA 35da590View commit details -
Add method to get the maximum energy of the source
Add an application-level method to obtain the maximum energy of the source. This proves useful for ausgab objects that need this information.
Configuration menu - View commit details
-
Copy full SHA for 0786b1e - Browse repository at this point
Copy the full SHA 0786b1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for da84f5a - Browse repository at this point
Copy the full SHA da84f5aView commit details -
Improve fluence scoring logic, add documentation
- Add option to define regions from where to score planar fluence to improve efficiency of charged particle calculations. - Move many common tasks to the base class EGS_FluenceScoring. - Fix group scoring region definitions. - Improve logic for defining scoring regions in planar scoring class. - Document classes with Doxygen comments.
Configuration menu - View commit details
-
Copy full SHA for 651c5ac - Browse repository at this point
Copy the full SHA 651c5acView commit details -
Improve and add features to fluence scoring object
- Add the ability to divide fluence in total and primary fluence. - Add the ability to calculate integral and differential fluence. - Improve output format. - Investigate the effect of scoring integral charged particle fluence using either EDEP (within differential scoring block) or directly TVSTEP: a) Identical for FLURZ-like calculation b) Small, negligible differences using stprO3 and stpwrO5 This allows extraction of the integral fluence scoring from the blocks for differential fluence. When one is only interested in the integral fluence, the calculation is up to 10% faster using a TVSTEP-based approach. Current implementation allows switching between EDEP-based and TVSTEP-based integral fluence calculation via the pre-processor define USETVSTEP. To use TVSTEP-based integral dose calculation use: make MYDEFS=-DUSETVSTEP Next iteration will only use the TVSTEP-based approach for integral fluence as both approaches result in negligible differences. - Add mechanism to track the distribution of number of energy bins covered when spreading EDEP. This is activated via the define variable DEBUG: to use it, build the fluence scoring ausgab object using: make MYDEFS=-DDEBUG One can also trace the difference between the step derived from spreading EDEP over the energy grid and TVSTEP via DEBUG.
Configuration menu - View commit details
-
Copy full SHA for a915a0c - Browse repository at this point
Copy the full SHA a915a0cView commit details -
Split fluence scoring object input in blocks
- Add input blocks to define the energy grid and the scoring options based on the scoring type. - Improve output format.
Configuration menu - View commit details
-
Copy full SHA for f700470 - Browse repository at this point
Copy the full SHA f700470View commit details -
Improve fluence scoring object documentation
Remove example for base class and add specific blocks for planar an volumetric scoring inputs.
Configuration menu - View commit details
-
Copy full SHA for fd63546 - Browse repository at this point
Copy the full SHA fd63546View commit details -
Score integral electron fluence using TVSTEP
- Remove initial approach to score charged particle integral fluence from each contribution to the differential fluence. Now is uses TVSTEP and computes integral fluence in one go. - Remove checks for pre-processor directive USETVSTEP as it not needed anymore. - Polish documentation.
Configuration menu - View commit details
-
Copy full SHA for 5c2757a - Browse repository at this point
Copy the full SHA 5c2757aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1951f85 - Browse repository at this point
Copy the full SHA 1951f85View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd45bd7 - Browse repository at this point
Copy the full SHA bd45bd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d80093 - Browse repository at this point
Copy the full SHA 2d80093View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14fa724 - Browse repository at this point
Copy the full SHA 14fa724View commit details -
Merge #836: add generic fluence scoring object
This new ausgab object scores fluence in user-defined regions (volumetric) or at a circular or rectangular field (planar) located in an arbitrary position in space. Scoring can be done for either photons, electrons or positrons. Scoring for multiple particle types is accomplished by defining multiple fluence scoring ausgab objects.
Configuration menu - View commit details
-
Copy full SHA for 1dc907a - Browse repository at this point
Copy the full SHA 1dc907aView commit details -
Fix #949: compiler errors for egs_mesh on macOS
Add a missing include of the array c++ class library. This avoids compiler errors that occurred on macOS.
Configuration menu - View commit details
-
Copy full SHA for d44892b - Browse repository at this point
Copy the full SHA d44892bView commit details
Commits on Feb 15, 2023
-
Fix #956: ausgab calls for photonuclear with xcse
Add ausgab calls before and after a photonuclear interaction, in order to handle cross section enhancement (xcse) correctly. Without these calls, there is no compensation for the enhanced cross section, hence the photonuclear cross section is effectively increased by the xcse factor. Also add the photonuclear event trapping in Fano calculations, for consistency. However, the Fano calculation fails when photonuclear attenuation is turned on anyway, because the photon is discarded without depositing its energy. Also update a couple loops that print out the ausgab flags (IAUSFL) values, to include the photonuclear attenuation option value.
Configuration menu - View commit details
-
Copy full SHA for 8be7c57 - Browse repository at this point
Copy the full SHA 8be7c57View commit details