-
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
Add egs++ volume calculation #184
base: develop
Are you sure you want to change the base?
Conversation
@ftessier has an update and bug fix pending for this PR. |
Indeed, we need to clean this up further in terms of memory management and uncertainty tracking. I will merge this into develop after the release, to be merged in master in 2018. |
Redesign suggestion: The volume calculation should be restructured as a class and should contain methods for applications to query the geometry volumes, instead of just printing to the screen. The inputs should not be available to any application, rather the application should parse and handle the volume inputs. We should include an egs_volume application for this. This is to avoid the user submitting an egs_chamber run to a cluster with the volume calculation accidentally turned on. Parallel run capability should then be added to the egs_volume application. |
3fb7967
to
153787b
Compare
@ftessier and @rtownson , are we still deciding what the best course of action is? Could we not merge |
I propose to include this via a standalone application, and not via the egs++ geometry. Usage is then clear for the user, and development is freed of the concerns of integration in the geometry library (it could be integrated back as a geometry method later on). I will convert this PR back to a standalone |
153787b
to
8235028
Compare
aac8f51
to
b07dc5d
Compare
Add a Monte Carlo volume calculation to egs++. It can be turned on using :start volume calculation: in any input file. The recursive algorithm builds an octree with higher resolution in geometries with more regions. A user specified box is used as the boundary for sampling.
Split printVolumes() into two functions so that apps can use results of the volume calculation instead of just printing the output. Also just tidy the code a bit.
b07dc5d
to
729728f
Compare
Add a Monte Carlo volume calculation to
egs++
, originally designed by @ftessier. It can be turned on using:start volume calculation:
in any input file. The recursive algorithm builds an octree with higher resolution in geometries with more regions. A user specified box is used as the boundary for sampling.For example:
For the volume calculation, the sampling box is divided into progressively smaller voxels as the geometry is analyzed on each pass. The algorithm follows the creation of an
octree
. Areas with a greater density of geometry regions end up with a higher density of voxels and thus are sampled more often in the volume calculation.As the volume calculation progresses, the number of samplings in each octree node is also adjusted. On each pass, regions with a higher uncertainty on the volume are sampled more often, while regions with lower uncertainty are sampled less often.
I'm open to suggestions on this implementation! Is is bad practice to add the
Volume_Node
andVolume_Info
classes toegs_base_geometry.h
? Maybe these should go in a separate file. Is there additional or alternative functionality we would like?