wbinventor/OpenMOC — Issue #48: Computing exponential prefactors
Author: wbinventor
Created: 2012-02-13 01:55:26+00:00
State: open
Labels: High Priority, Solver

For larger geometries we are going to have a problem with pre-computing and storing the exponential pre-factors for each segment to be used by the solver. I would tentatively propose the following workaround:

1) #define MAX_FSR_PRECOMPUTE_THRESH
This would be the maximum number of FSRs for which we would allow the simulation to pre-compute exponential pre-factors for each segment. We might actually want to come up with an equation that compares the number of FSRs in the geometry along with the number of azimuthal angles and the track spacing and compare it against this value. If it is smaller than the threshold we will pre-compute the values and store them in a vector for each segment. If it is larger than the threshold, do one or both of the following.

2a) Have the capability to compute the pre-factors on the fly.

2b) Come up with a hash map similar to what Kord has mentioned in the past in which we compute the term inside the exponential, but not the exponential itself (since the exponential computation is what is so time consuming). Then use the term inside the exponential as a key into a hash map of pre-computed exponentials. We could do this quite easily by just taking the first 4 or 5 decimal places of the term inside the exponential and using that as the hash. The map would contain every exponential term pre-computed at intervals from some max and min value with a precision of 4 or 5 decimal places or whatever. The max and min values would be determined during segmentation when the max and min segment length values would be recorded.