Commit graph

1672 commits

Author SHA1 Message Date
Paul Romano
fb68943ca2 Rename one_group_xs -> collapse_rate 2020-09-15 10:23:31 -05:00
Paul Romano
e0bcfead80 First version of Nuclide::one_group_xs method 2020-09-15 10:23:31 -05:00
Patrick Shriwise
301f15139f Correction to plot level and index check. 2020-09-03 22:30:46 -05:00
Patrick Shriwise
9c62259645 Adjusting the level value. 2020-09-03 08:29:47 -05:00
Patrick Shriwise
e0689fda07 Updates to enable plotting of individual universe levels. 2020-09-03 08:29:47 -05:00
Giud
828e0aa7df
Merge pull request #1647 from paulromano/recognizes-scores
Make sure all reaction names are recognized as valid tally scores
2020-08-31 16:38:25 -06:00
Paul Romano
726adfb46c
Merge pull request #1623 from DanShort12/serialised_custom_source
Add support for serialized custom sources
2020-08-31 07:35:49 -05:00
Dan Short
21e8d91e90 Requested updates to source
Rename sample_source -> sample.
Use std::string as type of argument to openmc_create_source.
Use reinterpret_cast when accessing dlsym.
Also moves check for dlerror to be before the attempt to create the
source (avoids null reference if fails) and capture error message
before dlclose, so that the error message is still available.
Formatting updates and some refactoring for examples and tests.
2020-08-28 09:49:36 +01:00
Paul Romano
70d463d46c Make sure all reaction names are recognized as valid tally scores 2020-08-27 10:28:11 -05:00
Paul Romano
bf34c4bcad
Merge pull request #1645 from pshriwise/umesh_scores
Fix for data crossover in VTK filess when using multiple tallies w/ unstructured mesh.
2020-08-26 21:22:21 -05:00
Patrick Shriwise
d99b7aab51 Moving definition of reflect method. 2020-08-24 10:09:24 -05:00
Patrick Shriwise
ebca9a489d
Update include/openmc/position.h
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-08-24 09:07:59 -05:00
Dan Short
821e7d9825 Remove old source_sampling custom source method
Custom sources are now created only through the new class-based method,
which supports parameterization.
New method also slightly adjusted to create the source as managed by a
unique_ptr.
Examples and tests updated to align with this approach.
Documentation updated.
2020-08-21 12:05:43 +01:00
Patrick Shriwise
1bdc9ca877 Removing blank line. 2020-08-19 23:32:27 -05:00
Patrick Shriwise
6d41c669b0 Pass particle history into DAGMC for more efficient normal calls. 2020-08-19 15:33:51 -05:00
Andrew Johnson
cf763e2477
Add templated write_message for formatting messages
This new function lives inside include/openmc/error.h and
checks if a message will be written by checking the current
verbosity level prior to formatting the message. This works very
similar to python logging modules and the spdlog project, where
the call to the logging function accepts a formattable message
string and the format arguments separately, e.g.

write_message(1, "Writing data for statepoint {}", point)

The function accepts any number and type of argument after the
format message and passes directly to fmt::format and in-turn to
the non-templated write_message. While this later function does
similar checking with the level and MPI rank, the real goal is the
output function in src/error.cpp which is not currently exposed
through the error header file

Thanks to @paulromano for feedback and suggestions
2020-08-06 07:04:59 -04:00
Dan Short
fae474869c Remove external destroy method
OpenMC will call delete directly on the CustomSource.
2020-08-05 16:00:49 +01:00
Dan Short
64a4c96a94 Rename serialized -> parameterized
Updates to examples and tests to refer to parameterized sources rather
than serialized sources.
Small update to source.h to remove reference to serialized parameters.
2020-08-05 15:53:48 +01:00
Dan Short
9c1b318e78 Only instantiate custom source once
In the existing custom_source implementation, the source will only be
created once. This is much more efficient than the custom serialized
source, where each sampling will create a new instance of the class.
As there could be many samples, this introduces an overhead,
particularly if the operations to instantiate the class are not trivial.
This implementation defines an abstract class, which is then used by the
custom classes to allow the custom serialized class to be created based
on the plugin, sampled from, and then destroyed.
Update documentation and test to reflect this.
2020-08-03 17:38:12 +01:00
Paul Romano
6992e53398 Change declaration order of maps used for vectors
If the destructor of an object tries to remove an entry from the map, there's no
guarantee it exists if the map has already been destroyed (because it was
declared after the vector of objects), resulting in a segfault. By declaring the
map first, we avoid this. Currently an issue for Nuclide, but potentially other
classes in the future.
2020-07-29 15:48:14 -05:00
Patrick Shriwise
0bcc9f2c06 Making sure score data is removed from the unstructured mesh. 2020-07-23 13:47:57 -05:00
Paul Romano
dea78c9be5 Move version number to 0.12.1-dev 2020-07-22 15:26:03 -05:00
Paul Romano
2549c7040d Remove -dev tag from version number 2020-07-22 06:41:46 -05:00
Paul Romano
ece6b8b15f Weight non-fission energy deposition by keff 2020-06-29 10:59:14 -05:00
Paul Romano
f81f5b164f Fix fission delayed photon scaling 2020-06-29 09:42:15 -05:00
Paul Romano
1b0400d9fe Fix order of element_map and elements 2020-06-29 09:20:53 -05:00
Paul Romano
ea9ff22805 Change data::elements to a vector of unique_ptr 2020-06-18 16:21:26 -05:00
Paul Romano
5ff8dca372 Change i_nuclide_/i_element_ to index_ 2020-06-18 16:21:26 -05:00
Paul Romano
c8b99514b7 Make sure data gets initialized for particle restarts 2020-06-18 16:21:26 -05:00
Paul Romano
2e29ffacfe Use openmc_load_nuclide consistently 2020-06-18 13:37:50 -05:00
Paul Romano
e579168969 Calculate min/max energies during simulation_init 2020-06-18 13:37:50 -05:00
Paul Romano
9c5ada6dd0 Change Nuclide/PhotonInteraction constructor to not take index 2020-06-18 13:37:50 -05:00
Paul Romano
2d048805c5
Merge pull request #1578 from shikhar413/lib_batches_setter
Python bindings for setting n_batches through C API
2020-06-11 11:30:53 -05:00
Patrick Shriwise
775cc1ae19 Incorporating @paulromano's comments 2020-06-02 09:10:13 -05:00
Shikhar Kumar
6e7f524561 Create getter funtion for n_batches, update test_lib.py 2020-06-01 21:19:06 -04:00
Shikhar Kumar
7b4db3279a Set n_batches and n_max_batches through C API 2020-06-01 18:06:31 -04:00
Patrick Shriwise
6cbf98962d Correction to formatting of default param. 2020-05-20 12:39:42 -05:00
Patrick Shriwise
29cfec5a20 Creating a separate struct for the parent cell concept. 2020-05-19 21:58:18 -05:00
Patrick Shriwise
c7fe3ab9a3 Renaming parameter to set_contained. 2020-05-19 13:51:38 -05:00
Patrick Shriwise
ad2aa90879 Making an inner function for the recursion to clean up the exerior API. 2020-05-18 13:47:19 -05:00
Patrick Shriwise
c77eb71832 Fix to the cell gathering algorithm 2020-05-18 13:47:19 -05:00
Patrick Shriwise
6390360dfa Initial layout of get_contained_cells. 2020-05-18 13:47:19 -05:00
Patrick Shriwise
5a7de406c4 Implmementing the templated filter creation method. 2020-05-11 14:18:04 -05:00
Paul Romano
128faa49b0 Add particle_type_to_str and str_to_particle_type functions 2020-04-23 16:37:23 -05:00
Paul Romano
a6c7b54d8a Change sample_fission to return a Reaction& 2020-04-23 16:37:23 -05:00
Paul Romano
086369e797 Use references for Nuclide objects being passed 2020-04-23 16:37:23 -05:00
Paul Romano
9dab8bf507 Use references consistently in geometry functions 2020-04-23 16:37:23 -05:00
Paul Romano
43eae72aeb Use references consistently in physics modules 2020-04-23 16:37:23 -05:00
Paul Romano
65c0dbfe46 Use references to Particle consistently in tally_scoring.cpp 2020-04-23 16:37:23 -05:00
Paul Romano
f522f31e4b Change apply_derivative_to_score to accept const ref 2020-04-23 16:37:23 -05:00