mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 06:25:30 -04:00
moving some single-use constants closer to point of use
This commit is contained in:
parent
3abf0a9f5b
commit
780039c512
6 changed files with 37 additions and 23 deletions
|
|
@ -3,6 +3,17 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Constants
|
||||
//==============================================================================
|
||||
|
||||
// For non-accelerated regions on coarse mesh overlay
|
||||
constexpr int CMFD_NOACCEL {-1};
|
||||
|
||||
//==============================================================================
|
||||
// Non-member functions
|
||||
//==============================================================================
|
||||
|
||||
void free_memory_cmfd();
|
||||
|
||||
} // namespace openmc
|
||||
|
|
|
|||
|
|
@ -39,9 +39,6 @@ constexpr array<int, 2> VERSION_PROPERTIES {1, 0};
|
|||
// NOTE: This is the only section of the constants module that should ever be
|
||||
// adjusted. Modifying constants in other sections may cause the code to fail.
|
||||
|
||||
// Monoatomic ideal-gas scattering treatment threshold
|
||||
constexpr double FREE_GAS_THRESHOLD {400.0};
|
||||
|
||||
// Significance level for confidence intervals
|
||||
constexpr double CONFIDENCE_LEVEL {0.95};
|
||||
|
||||
|
|
@ -53,15 +50,9 @@ constexpr double FP_PRECISION {1e-14};
|
|||
constexpr double FP_REL_PRECISION {1e-5};
|
||||
constexpr double FP_COINCIDENT {1e-12};
|
||||
|
||||
// Maximum number of collisions/crossings
|
||||
constexpr int MAX_EVENTS {1000000};
|
||||
// Maximum number of random samples per history
|
||||
constexpr int MAX_SAMPLE {100000};
|
||||
|
||||
// Maximum number of external source spatial resamples to encounter before an
|
||||
// error is thrown.
|
||||
constexpr int EXTSRC_REJECT_THRESHOLD {10000};
|
||||
constexpr double EXTSRC_REJECT_FRACTION {0.05};
|
||||
|
||||
// ============================================================================
|
||||
// MATH AND PHYSICAL CONSTANTS
|
||||
|
||||
|
|
@ -237,9 +228,6 @@ enum ReactionType {
|
|||
|
||||
constexpr array<int, 6> DEPLETION_RX {N_GAMMA, N_P, N_A, N_2N, N_3N, N_4N};
|
||||
|
||||
// Maximum number of partial fission reactions
|
||||
constexpr int PARTIAL_FISSION_MAX {4};
|
||||
|
||||
// Resonance elastic scattering methods
|
||||
enum class ResScatMethod {
|
||||
rvs, // Relative velocity sampling
|
||||
|
|
@ -342,21 +330,11 @@ enum class RunMode {
|
|||
VOLUME
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// CMFD CONSTANTS
|
||||
|
||||
// For non-accelerated regions on coarse mesh overlay
|
||||
constexpr int CMFD_NOACCEL {-1};
|
||||
|
||||
//==============================================================================
|
||||
// Geometry Constants
|
||||
|
||||
enum class GeometryType { CSG, DAG };
|
||||
|
||||
//==============================================================================
|
||||
// Variance Reduction constants
|
||||
constexpr double DEFAULT_WEIGHT_CUTOFF {1.0e-38}; // default low weight cutoff
|
||||
|
||||
} // namespace openmc
|
||||
|
||||
#endif // OPENMC_CONSTANTS_H
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ constexpr int MAX_DELAYED_GROUPS {8};
|
|||
|
||||
constexpr double CACHE_INVALID {-1.0};
|
||||
|
||||
// Maximum number of collisions/crossings
|
||||
constexpr int MAX_EVENTS {1000000};
|
||||
|
||||
//==========================================================================
|
||||
// Aliases and type definitions
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,13 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Constants
|
||||
//==============================================================================
|
||||
|
||||
// Monoatomic ideal-gas scattering treatment threshold
|
||||
constexpr double FREE_GAS_THRESHOLD {400.0};
|
||||
|
||||
//==============================================================================
|
||||
// Non-member functions
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -14,6 +14,15 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Constants
|
||||
//==============================================================================
|
||||
|
||||
// Maximum number of external source spatial resamples to encounter before an
|
||||
// error is thrown.
|
||||
constexpr int EXTSRC_REJECT_THRESHOLD {10000};
|
||||
constexpr double EXTSRC_REJECT_FRACTION {0.05};
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Constants
|
||||
//==============================================================================
|
||||
|
||||
constexpr double DEFAULT_WEIGHT_CUTOFF {1.0e-38}; // default low weight cutoff
|
||||
|
||||
//==============================================================================
|
||||
// Non-member functions
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue