An open source method of characteristics neutron transport code.
constants.h File Reference

Math constants and comparision tolerances. More...

Go to the source code of this file.

Macros

#define FLT_EPSILON   1.0E-12
 
#define FLT_INFINITY   1.0E300
 
#define REPORT_WIDTH   53
 
#define DEFAULT_INIT_ID   1000000
 
#define FOUR_PI   12.566370614359172
 
#define ONE_OVER_FOUR_PI   0.07957747154594767
 
#define ZERO_SIGMA_T   1E-6
 
#define SIGMA_T_THRESH   1E-10
 
#define TINY_MOVE   1E-8
 
#define ON_LATTICE_CELL_THRESH   1E-12
 
#define ON_SURFACE_THRESH   1E-12
 
#define POLAR_WEIGHT_SUM_TOL   1E-5
 
#define MAX_OPTICAL_LENGTH   FP_PRECISION(100.)
 
#define TAU_NUDGE   1E-12
 
#define EXP_PRECISION   FP_PRECISION(1E-5)
 
#define MIN_EXP_INTERP_POINTS   100
 
#define MIN_DET   1E-10
 
#define MIN_LINALG_POWER_ITERATIONS   25
 
#define MAX_LINALG_POWER_ITERATIONS   25000
 
#define MIN_LINALG_TOLERANCE   LINALG_TOL
 
#define MIN_LINEAR_SOLVE_ITERATIONS   25
 
#define MAX_LINEAR_SOLVE_ITERATIONS   10000
 
#define LOCAL_COORDS_LEN   16
 
#define MAX_VERSION_NUM   20
 
#define NUM_FACES   6
 
#define NUM_EDGES   12
 
#define NUM_VERTICES   8
 
#define NUM_SURFACES   26
 
#define SURFACE_X_MIN   0
 
#define SURFACE_Y_MIN   1
 
#define SURFACE_Z_MIN   2
 
#define SURFACE_X_MAX   3
 
#define SURFACE_Y_MAX   4
 
#define SURFACE_Z_MAX   5
 
#define SURFACE_X_MIN_Y_MIN   6
 
#define SURFACE_X_MAX_Y_MIN   7
 
#define SURFACE_X_MIN_Y_MAX   8
 
#define SURFACE_X_MAX_Y_MAX   9
 
#define SURFACE_X_MIN_Z_MIN   10
 
#define SURFACE_X_MAX_Z_MIN   11
 
#define SURFACE_X_MIN_Z_MAX   12
 
#define SURFACE_X_MAX_Z_MAX   13
 
#define SURFACE_Y_MIN_Z_MIN   14
 
#define SURFACE_Y_MAX_Z_MIN   15
 
#define SURFACE_Y_MIN_Z_MAX   16
 
#define SURFACE_Y_MAX_Z_MAX   17
 
#define SURFACE_X_MIN_Y_MIN_Z_MIN   18
 
#define SURFACE_X_MIN_Y_MIN_Z_MAX   19
 
#define SURFACE_X_MIN_Y_MAX_Z_MIN   20
 
#define SURFACE_X_MIN_Y_MAX_Z_MAX   21
 
#define SURFACE_X_MAX_Y_MIN_Z_MIN   22
 
#define SURFACE_X_MAX_Y_MIN_Z_MAX   23
 
#define SURFACE_X_MAX_Y_MAX_Z_MIN   24
 
#define SURFACE_X_MAX_Y_MAX_Z_MAX   25
 
#define NUM_VALUES_PER_RETRIEVED_TRACK   6
 
#define NUM_VALUES_PER_RETRIEVED_SEGMENT   7
 
#define LCM_TOLERANCE   1.e-8
 

Detailed Description

Math constants and comparision tolerances.

Date
April 9, 2015.
Author
William Boyd, MIT, Course 22 (wboyd.nosp@m.@mit.nosp@m..edu)

Macro Definition Documentation

◆ DEFAULT_INIT_ID

#define DEFAULT_INIT_ID   1000000

The minimum auto ID used for Surfaces, Cells, Materials and Universes

◆ EXP_PRECISION

#define EXP_PRECISION   FP_PRECISION(1E-5)

The minimum acceptable precision for exponential evaluations from the ExpEvaluator's linear interpolation table. This default precision was selected based on analysis by Yamamoto's 2004 paper on the topic.

◆ FLT_EPSILON

#define FLT_EPSILON   1.0E-12

Threshold to determine if a float equals to 0.0

◆ FLT_INFINITY

#define FLT_INFINITY   1.0E300

Threshold to determine if a float is equal to infinity

◆ FOUR_PI

#define FOUR_PI   12.566370614359172

The value of 4pi: $ 4\pi $

◆ LCM_TOLERANCE

#define LCM_TOLERANCE   1.e-8

Least common multiple tolerance

◆ MAX_OPTICAL_LENGTH

#define MAX_OPTICAL_LENGTH   FP_PRECISION(100.)

The default maximum optical path length

◆ MIN_DET

#define MIN_DET   1E-10

The minimum calculated determinant to allow for the calculation of a matrix inverse.

◆ MIN_EXP_INTERP_POINTS

#define MIN_EXP_INTERP_POINTS   100

The minimum number of interpolation points to be used in an exponential lookup table

◆ MIN_LINALG_POWER_ITERATIONS

#define MIN_LINALG_POWER_ITERATIONS   25

The maximum number of iterations allowed for a power method eigenvalue solve in linalg.cpp

◆ MIN_LINEAR_SOLVE_ITERATIONS

#define MIN_LINEAR_SOLVE_ITERATIONS   25

The maximum number of iterations allowed for a linear solve in linalg.cpp

◆ NUM_FACES

#define NUM_FACES   6

The faces, edges, and vertices that collectively make up the surfaces of a rectangular prism. The edges denoted as "e" and vertices as "v" on the illustration below:

                             e
                 v +--------------------+ v
                  /|                   /|
                 / |                  / |
                /  |                 /  |
              e/  e|                /e  |e
              /    |               /    |
             /     |         e    /     |
            /    v +-------------/------+ v
         v +--------------------+ v    /
           |     /              |     /
           |    /               |    /
          e|  e/                |e e/
           |  /                 |  /
           | /                  | /
           |/                   |/
         v +--------------------+ v
                     e

◆ NUM_VALUES_PER_RETRIEVED_SEGMENT

#define NUM_VALUES_PER_RETRIEVED_SEGMENT   7

The number of values used in representing a Segment when the Segments are retrieved from the TrackGenerator.

◆ NUM_VALUES_PER_RETRIEVED_TRACK

#define NUM_VALUES_PER_RETRIEVED_TRACK   6

The number of values used in representing a Track when the Tracks are retrieved from the TrackGenerator.

◆ ON_LATTICE_CELL_THRESH

#define ON_LATTICE_CELL_THRESH   1E-12

Threshold to determine if a Point is on the boundary of a Lattice cell

◆ ON_SURFACE_THRESH

#define ON_SURFACE_THRESH   1E-12

Error threshold to determine if a point is to be considered on a Surface

◆ ONE_OVER_FOUR_PI

#define ONE_OVER_FOUR_PI   0.07957747154594767

The values of 1 divided by 4pi: $ \frac{1}{4\pi} $

◆ POLAR_WEIGHT_SUM_TOL

#define POLAR_WEIGHT_SUM_TOL   1E-5

Tolerance for difference of the sum of polar weights with respect to 1.0

◆ SIGMA_T_THRESH

#define SIGMA_T_THRESH   1E-10

Threshold to determine how close the sum of $ \Sigma_a $ and $ \Sigma_s $ must match $ \Sigma_t $ for each energy group

◆ TAU_NUDGE

#define TAU_NUDGE   1E-12

A small amount to increment the tau, the max optical path length, to ensure that tracks with the max optical path length are not split.

◆ TINY_MOVE

#define TINY_MOVE   1E-8

Distance a Point is moved to cross over a Surface into a new Cell

◆ ZERO_SIGMA_T

#define ZERO_SIGMA_T   1E-6

A negligible cross-section value to over-ride user-defined cross-sections very near zero (e.g., within (-1E-10, 1E-10))