Commit graph

916 commits

Author SHA1 Message Date
Gavin Ridley
f018ba72ba remove unnecessary newline 2021-01-09 20:50:58 -05:00
Gavin Ridley
863f0f432e use direct file diff rather than hash comparison for export_to_materials test 2021-01-09 20:50:58 -05:00
Gavin Ridley
a2f1a2fd59 Update tests/regression_tests/deplete/test.py
Co-authored-by: Andrew Johnson <drewejohnson@users.noreply.github.com>
2021-01-09 20:50:58 -05:00
Gavin Ridley
6cf5253aeb remove redundant code 2021-01-09 20:50:58 -05:00
Gavin Ridley
e99ba6fe76 add more specific exceptions for ResultsList->openmc.Materials and add test for that 2021-01-09 20:50:58 -05:00
Sterling Harper
b03b98317c Add missing test __init__.py 2020-12-19 08:35:17 -07:00
Sterling Harper
8879414824 Merge remote-tracking branch 'upstream/develop' into bc_update 2020-12-18 23:30:37 -07:00
Sterling Harper
6ed023c790 Add a test for non-90-degree periodic BCs 2020-12-18 23:20:50 -07:00
Patrick Shriwise
1734a07295 Adding message passing header to the C++ driver test. 2020-12-14 06:18:41 +00:00
Patrick Shriwise
37944edd95 Adding a GitHub actions CI file. 2020-12-14 05:48:54 +00:00
Adam Nelson
7505718806
Merge pull request #1718 from mkreher13/transient-rewrite
Fixed several bugs related to decay-rate
2020-12-11 10:26:42 -06:00
Shikhar Kumar
2931ebef9e Confirm precision differences between Python and C++ 2020-11-24 23:44:38 -05:00
Sterling Harper
a8ecb795a3 Assume un-aligned normals for rotational BCs 2020-11-14 14:00:16 -07:00
Paul Romano
7a505613d1
Merge pull request #1705 from nelsonag/mt_mgxs
MGXS API Changes for Arbitrary Reaction Channels and for Accurate Chi Computation
2020-11-10 07:37:00 -06:00
Patrick Shriwise
bf1c35e23e
Merge pull request #1706 from paulromano/sourcefile-improve
Refactoring of source classes
2020-11-09 15:14:58 -06:00
Miriam
954450a841 Fixed several bugs related to decay-rate
1) In mdgxs.py, DecayRate, get_xs(). There is no need to reverse the order
since there isn't an energy group filter anymore. Also, the new_shape
addition formats the cross section like all the others. I updated
mgxs_library_hdf5 test results accordingly.

2) In material.cpp. If you use a macroscopic dnesity other than 1.0,
the code still pushed back '1.0'. My change fixes that. Using a macro
density other than 1.0 wasn't tested anywhere, so I modifed mg_convert
to take a density of 1.1. The default macro density of 1.0 is used in
many other tests.

3) tally_scoring.cpp. Notice that the score is accumulated, then sent
to the function score_fission_delayed_dg where the tally is accumulated.
This amounts to "double accumulation". It makes sense to accumulate the score
over the delayed groups if there is no delayed group filter, but in this
case, when delayed group filter is not None, the score needs to reset
each time.

In other parts of SCORE_DECAY_RATE, I think the distinction between
accumulating and resetting the score is correct. The only place I wasn't
sure was line 1057 (and its equivalent in multi-group, line 1962).

It's too bad the decay-rate isn't tested very thoroughly. Although I
don't have time to do it myself, I think adding a DelayedGroups filter
to the mg_tallies test would be a good start.
2020-11-04 16:58:43 +00:00
Patrick Shriwise
1e2735df93 Updating h5py calls in the plot test files. 2020-10-30 23:20:05 -05:00
Adam Nelson
a83e7fa0b7 Reduced number of tested MGXS types in mgxs_library_no_nuclides and mgxs_library_nuclides in an effort to test the intended Python code but not over-do Travis' effort 2020-10-30 07:56:50 -05:00
Paul Romano
9af5541e88 Make Source::sample() method const 2020-10-27 10:02:03 -05:00
Sterling Harper
c75790d3ac Remove unneeded plot from periodic BC test 2020-10-26 22:32:57 -06:00
Paul Romano
0bb39005bc Rename source classes 2020-10-23 14:11:34 -05:00
Paul Romano
f2526ec439 Generalize source bank reading (don't rely on work_index) 2020-10-23 14:11:30 -05:00
Paul Romano
713469bf59 Make regular source distributions obey the same interface as custom sources 2020-10-22 15:07:28 -05:00
Adam Nelson
d2c00b4f1b Added tests and fixed code accordingly 2020-10-22 14:13:32 -05:00
Sterling Harper
b403f877c2 Increase periodic BC test coverage 2020-10-18 16:20:44 -06:00
aprilnovak
15190e632e Deprecate uniform_fs XML syntax. 2020-10-16 15:44:06 -05:00
Miriam
8d67b64ba8 Updated mgxs_library_distribcell test inputs & results 2020-10-07 20:19:04 +00:00
Miriam
6b3374a15e Fixed typo in mgxs.py and modified all tests except distribcell 2020-10-07 19:36:03 +00:00
Miriam
17615b314a 2nd attempt to make distribcell test pass 2020-09-23 18:09:57 +00:00
Miriam
c50306904b Added DiffusionCoefficient class to mgxs.py
To continue in the effort of merging Sam Shaner's transient capability,
this next PR adds the class DiffusionCoefficient to mgxs.py. It uses
the TransportXS class, but has some unique features in get_condensed_xs()
requiring its own function. There won't be any other MGXS classes added
after this.

I updated the docstrings and the appropriate regression tests.
Since my system outputs different formatting for the
mgxs_library_distribcell test, it is possible this test will continue
to fail. However, I did my best to modify it by hand so that it will pass.
2020-09-23 16:35:22 +00:00
Miriam
23e8ed97c5 2nd attempt to make distribcell test pass.
Manually removed the "group" variable from the results as to not
mess up the formatting of the results. This might still require
trial and error to get it to pass exactly right.
2020-09-18 00:18:03 +00:00
Miriam
8cf38b00b6 Updated distribcell
This test often fails due to the formating of the results.
Now, I checked manually, and all these results are identical,
except of course for removing the "group" variable on the penultimate
chunk of results which is decay-rate.

So hopefully this formatting I get on my machine passes the other systems as well.
2020-09-17 22:09:15 +00:00
Miriam
44a5a03744 Updated testing 2020-09-17 19:01:33 +00:00
Paul Romano
13dadf9c24 Merge branch 'develop' into ccfe-spp-2 2020-09-10 06:34:37 -05: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
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
Miriam
8f3dc3b8c2 Updated mgxs and tests
Doc string updates to exclusively list openmc.RegularMesh as a domain type.
I removed an if-statement related to domain == mesh, since mesh is the only allowable domain.
Other minor edits.
2020-08-17 16:25:32 +00:00
Miriam (Rathbun) Kreher
77f88db72e
Update test mgxs_library_distribcell/
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-08-15 22:26:09 -06:00
Miriam (Rathbun) Kreher
a71056548a
Update test mgxs_library_no_nuclides
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-08-15 22:25:43 -06:00
Miriam (Rathbun) Kreher
b83558e631
Update test mgxs_library_nuclides
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-08-15 22:25:19 -06:00
Miriam
8def35f300 Made explicit loop to exclude current from certain mgxs tests
Previously used MGXS_TYPES[:-1] but to be explicit, I instead looped over all MGXS_TYPES and excluded current.
These tests cannot run with current because:
-distribcell is not a valid domain for current
-nuclide/no_nuclides option is not relevant for current
2020-08-07 20:05:27 +00:00
Miriam
f673ae6052 Extended tests to include current
Changed the domain from 'material' to 'mesh' in mgxs_library_condense and mgxs_library_hdf5.
This way, current can be tested for those functionalities.
The other tests were not relevant to current.
The test mgxs_library_mesh was already includes current.
2020-08-07 16:56:54 +00:00
Dan Short
475656e6e0 Simplify test and fix typos in documentation 2020-08-05 16:10:04 +01:00
Dan Short
0bb5030ee0 Rename create -> openmc_create_source 2020-08-05 16:02:52 +01: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
Dan Short
8bb10563c1 Pass serialization as parameter attribute
Changes the implementation of the serialization to be on an attribute of
the source XML element within settings.xml. This removes the need for a
new file containing the serialization.
Parameters are provided as a key-value string, separated by a comma and
a space, although the implementation can change this is required.
Change example values to align with existing custom_source to make
comparisons easier.
Update documentation to be consistent.
2020-08-03 14:24:17 +01:00
Paul Romano
e2ae3c7401 Change power to source_rate throughout deplete module 2020-08-03 07:38:35 -05:00