Commit graph

42 commits

Author SHA1 Message Date
Paul Romano
d56cda2544
Implement DecaySpectrum distribution type and utilize in R2S (#3930)
Co-authored-by: Copilot <copilot@github.com>
2026-05-08 20:53:12 -05:00
Paul Romano
8198e6021d
Add truncated normal distribution support (#3761) 2026-02-12 18:25:56 +02:00
Jack Fletcher
0486e433d2
Source biasing capabilities (#3460)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2026-01-12 09:51:12 -06:00
Gavin Ridley
aa4de82258
remove gsl-lite dependency (#3225)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2025-02-20 01:03:20 +00:00
Patrick Shriwise
e0d03812b9
Mesh Source Class (#2759)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2023-12-02 17:35:23 +00:00
Paul Romano
c93feed91f
Account for integral of underlying distributions when sampling Mixture (#2658) 2023-08-31 10:52:24 -04:00
Paul P.H. Wilson
fb4845494f add default empty consructor 2023-03-22 00:37:21 -04:00
Paul P.H. Wilson
df4cfad60c more pointer to instance changes 2023-03-22 00:29:28 -04:00
Paul P.H. Wilson
035e6dc45a change to instance from pointer and cleanup lazy mistakes 2023-03-22 00:25:04 -04:00
Paul P.H. Wilson
1d9446a065 introduce method to sample discrete index and use in various places 2023-03-21 16:14:38 -04:00
Paul P.H. Wilson
29b5748687 reduce temporary memory use for potentially large data 2023-03-17 08:27:09 -05:00
Paul P.H. Wilson
2d20cd31f2 initialize Discrete distribution with sequence of integers 2023-03-16 14:37:05 -05:00
Paul Romano
ce62bbd9c5 Add missing override specifiers 2023-02-16 14:06:59 -06:00
Patrick A Myers
ec5f0e54f4 Restored init_alias and changed constructor definitions 2023-01-27 10:22:27 -05:00
Patrick A Myers
4122c02ad4 change p to prob and fix alias table 2023-01-13 16:50:50 -05:00
myerspat
90509d928b moved alias method to function and fixed sampling bug 2022-12-19 17:24:33 -05:00
myerspat
4072fc430b Removing excess probability vector 2022-11-12 13:31:27 -05:00
myerspat
b469b3a169 Added alias sampling to discrete distribution 2022-11-05 13:50:27 -04:00
Paul Romano
50067898ff Replace Muir classes with single muir() Python function 2022-09-08 13:42:22 -05:00
Olaf Schumann
c0bcc3f1ca Renamed Rational to Power Law 2021-10-11 19:48:35 +00:00
Olaf Schumann
358f64c53a
Apply suggestions from code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2021-10-11 21:20:30 +02:00
Olaf Schumann
9eeff1ede9 Update to rational distribution
* store offset, span and ninv in class
  * accessor functions calculate a, b, n
2021-10-05 20:04:21 +00:00
Olaf Schumann
eb0eac79c1 Rational univariate distribution, that sampled a random variable with a pdf of p = x^n
Usefull for samplig homogenous cylindrical or spherical sources
Simmilar to MCNPs "sp -21 n" functionality
2021-10-05 19:24:40 +00:00
Olaf Schumann
60b5985746 update Mixture distribution
use std::pair instead of custom type
  lambda for comparison in std::lower_bound instead of operator<
2021-09-23 09:55:58 +00:00
Olaf Schumann
e7fa663b3d Update mixture distribution
update storeage of c++ class
  update sampling -> uses std::lower_bound for O(log(N)) sampling of the
distribution
  implemented from_xml_element
  updated settings.rst
  include a mixture in the regression tests
2021-09-23 09:37:19 +00:00
Olaf Schumann
1c219600a1 Implementation of openmc.stats.Mixture distribution
Added to_xml_element python method
create <pair> nodes with probability and distribution definition in order to have the
data bundled together. A different approach might be to save just two lists of "values".

Implemented c++ Mixture class
  Parsing xml-data
  Sampling the distribution from the cummulative probability table
2021-09-22 15:44:03 +00:00
Paul Romano
1bc2bd8460 Apply clang-format on entire source 2021-08-11 11:41:49 -05:00
Gavin Ridley
ad4e1c9f4a remove std:: from vector,unique_ptr,make_unique,array 2021-05-03 18:01:27 -04:00
Paul Romano
cb22fe7c5d Fix documentation for Maxwell distribution pdf 2020-12-08 13:53:35 -06:00
Gavin Ridley
9d0649d1dd fix typo 2020-02-07 16:42:10 -05:00
Gavin Ridley
d45583ed19 add some getters to 1D distributions 2020-02-07 15:16:02 -05:00
John Tramm
0602ddd8a3 refactor seed and seed aray variable names 2019-12-05 19:50:31 +00:00
John Tramm
638172e68d refactor of prn() interface and python interface changes 2019-12-04 16:35:01 +00:00
Paul Romano
eca3ce33d2 Fix pointer placement on uint64_t 2019-11-27 07:04:11 -06:00
John Tramm
12ec9bacff cleanup of comments and adding some parameter descriptions for altered function prototypes 2019-11-22 22:56:16 +00:00
John Tramm
674585c8fe changed N_STREAMS to const defined in header rather than random_lcg.cpp 2019-11-21 23:28:15 +00:00
John Tramm
5502f38580 partially done with refactoring 2019-11-21 22:19:15 +00:00
Andrew Davis
7a04968845 Addressed P. Romano review comments 2018-12-13 15:10:00 +00:00
Andrew Davis
9946db547c First commit of Muir/Gaussian sampling 2018-11-30 09:03:54 +00:00
Paul Romano
83d64397d1 Add doxygen comments where needed 2018-08-23 21:38:23 -05:00
Paul Romano
b92677e70b Convert source distributions to C++ 2018-08-23 15:23:47 -05:00
Paul Romano
9f0ea52d1a Move headers to include/openmc directory and openmc.h -> openmc/capi.h 2018-08-20 14:40:32 -05:00
Renamed from src/distribution.h (Browse further)