Commit graph

1360 commits

Author SHA1 Message Date
yardasol
51b1350f4a add basic unit test for initalizing CoupledOperator 2022-08-01 09:49:20 -05:00
yardasol
3e81a86915 TransportOperator->DepletionOperator 2022-07-30 18:37:51 -05:00
yardasol
effc35b8ee add_elements_or_nuclides -> add_components
- changed the assumptions the function makes about the 'components'
  parameter
- added 'percent_type' parameter
- passed changes to unit test
2022-07-29 18:28:08 -05:00
Patrick Shriwise
bdf6de5e51 EOL for test 2022-07-28 19:21:17 -05:00
Patrick Shriwise
2edd390d30 Newline at end of test file 2022-07-28 18:56:19 -05:00
Patrick Shriwise
25ab9d28ce
Apply suggestions from @paulromano
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-07-29 00:47:27 +01:00
yardasol
3e827530ba make changes from @paulromano's 3rd review
- syntax fixes and adjustments
- change name of FluxDepletionOperator to IndependentOperator
- flux_operator.py -> independent_operator.py
- new class, MicroXS, for creating (for now) one-group microscopic
  cross section DataFrames. This class takes the functionality that was
  previously in static functions in IndependentOperator
- Associated changes to the test suite and online docs
2022-07-28 17:50:06 -05:00
Paul Romano
cc7aa092be Address @eepeterson comments on #2135 2022-07-28 17:07:06 -05:00
Amelia J Trainer
a18abd4fd9
Merge pull request #2134 from paulromano/thermal-mixed-elastic
Add support for mixed incoherent/coherent elastic thermal scattering
2022-07-28 15:43:55 -04:00
yardasol
623658870d merged add_nuclides and add_elements into one function 2022-07-28 11:00:48 -05:00
yardasol
4818a296d4 Made changes from paulromano's 2nd round of comments
- Syntax improvements and fixes
- removed `flux` parameter from Integrator
- Moved generate_1g_cross_sections to a top level function in
  flux_operator.py
- changed normalization modes: constant-flux -> source-rate;
  constant-power -> fission-q
- fixed regression tests (fission-q reference solution was bad before,
  but is now much more reasonable and comparable to the source-rate
  reference solution)
- added `nuc_units` parameter to the `from_nuclides` method.
- docstring fixes
- RST doc fixes
- spelling fixes
2022-07-27 13:30:56 -05:00
yardasol
b3d0f20a00 added add_nuclides method 2022-07-27 13:15:10 -05:00
Patrick Shriwise
b93ab95ba1 Adding more mesh interrogation options for the libmesh
Finishing methods for connectivity and coordinates.

Writing vertices and connectivity to statepoint file

Loading vertices and connectivity from statepoint. Correcting string repr

Correcting connectivity length

Adding method to write the mesh elements to VTK with data applied.

Updating hdf5 output to include element types

Adding support for hex elements when writing unstructured meshes to VTK

Adding simple check for VTK writing if the module is present

Removing centroids from the statepoint file and Python UM class

Updating test check for vtk

Adding warning for skipped elements. Correcting element type

Adding warning for skipped elements.

Using an enum to indicate element types for readability

Updating to element types on the Python side as well

Handling integer data applied to VTK files.

Doc updates for Python API UM class

Incrementing statepoint version number

Refactor of unstructured mesh tests to extract model

Updating inputs for floating point surface coefficients

Adding test for hexes and refactoring comparison funcs

Updating reference mesh files

Adding reference file for the hexes test case

Passing test for hex mesh

Adding inputs for the hexes test case.

Adding hex test meshes.

Skipping hex mesh test if not built with libmesh

Adding small VTK write tests for unstructured mesh.

Allowing file path to be a pathlib path.

Adding skips if libmesh or dagmc not enabled

Adding a few comments to test file

Changing where conversion to str happens for mesh filename. Setting output to false.

Removing VTK check from unstructured mesh regression test

Removnig VTK test files for regression test -- too large

Adding __init__.py file for pytest
2022-07-25 13:17:51 -05:00
Paul Romano
a68a3ede6a Change get_sources() -> sources property and add test 2022-07-22 15:08:25 -05:00
Paul Romano
5a9662aa9f Add test for combine_distributions, use np.array in Discrete/Tabular setters 2022-07-22 14:56:05 -05:00
Paul Romano
425dba5d25 Add test for mixed elastic thermal scattering 2022-07-22 07:49:01 -05:00
yardasol
8102226e70 fix unit test 2022-07-21 20:27:52 -05:00
yardasol
61b1d82544 update test suite 2022-07-21 17:26:35 -05:00
yardasol
ef238b4a4f test_flux_deplete_operator.py -> test_deplete_flux_operator.py 2022-07-21 16:50:29 -05:00
yardasol
06f34b9f23 address most of paulromano's comments 2022-07-21 11:00:45 -05:00
Paul Romano
a27d0e079f Allow inplace argument on Region.translate 2022-07-20 22:43:20 -05:00
yardasol
7e671d4e57 Change defualt constructor to accept a Materials object
The classmethod, from_nuclides, retains the volume-nuclide constructor
2022-07-19 12:33:56 -05:00
Paul Romano
d8425d2669
Apply @shimwell suggestions from code review
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2022-07-18 06:48:51 -05:00
Paul Romano
ba5f6f58fa Add test for openmc.lib.sample_external_source 2022-07-15 20:12:14 -05:00
yardasol
2e13a83885 Merge branch 'develop' into transportoperator-subclass-notransport 2022-07-13 11:47:05 -05:00
Paul Romano
1e849fe162
Apply @JoffreyDorville suggestions from code review
Co-authored-by: Joffrey Dorville <54550047+JoffreyDorville@users.noreply.github.com>
2022-07-13 11:09:35 -05:00
yardasol
5f8e1ff9d9 Address paulromano's comments
- various syntax adjustments and cleanups
- remove unneeded import statements
- add more information to new section in user's guide
- typo fixes
- remove dilute_initial
- move _validate_micro_xs_inputs back into the class as a static method
- update tests to reflect changes
2022-07-12 11:44:12 -05:00
Paul Romano
ff15c98b67 Add test checking that collision/tracklength estimators agree for sph/cyl mesh 2022-07-08 08:05:51 -05:00
yardasol
af3d460665 test suite typo fixes 2022-07-07 20:35:09 -05:00
yardasol
9d3573d890 unit tests for FluxDepleteOperator
- fix value checking syntax in static methods
- add convenicece function to D.R.Y.
- initial unit tests
- add csv file for toy 1g cross sections
2022-07-05 16:32:21 -05:00
RemDelaporteMathurin
0b0265cb59 adapted tests 2022-07-01 11:37:16 +02:00
Jonathan Shimwell
f081b28b1d
Merge pull request #2096 from RemDelaporteMathurin/cylindermesh_to_vtk
`.write_data_to_vtk()` method in meshes
2022-07-01 10:07:42 +01:00
RemDelaporteMathurin
a2299063f5 converted docstrings to numpy style 2022-06-29 15:02:52 +02:00
RemDelaporteMathurin
48a0d15b1a added error raise + new test 2022-06-29 14:36:54 +02:00
RemDelaporteMathurin
890c3ad0d5 pytest.importorskip 2022-06-29 14:26:46 +02:00
RemDelaporteMathurin
58ccb82cf5 back to .dimension 2022-06-29 14:26:27 +02:00
RemDelaporteMathurin
1266e433c8 removed unused import 2022-06-29 14:23:06 +02:00
RemDelaporteMathurin
ee2e2d27a8 Merge branch 'cylindermesh_to_vtk' of https://github.com/RemDelaporteMathurin/openmc into cylindermesh_to_vtk 2022-06-29 14:22:51 +02:00
Rémi Delaporte-Mathurin
f99e93b583
[skip ci] is_file() instead of exists()
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-06-29 14:22:26 +02:00
Rémi Delaporte-Mathurin
aeeb078344
[skip ci] pathlib instead of os
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-06-29 14:22:01 +02:00
RemDelaporteMathurin
8027b1622f Merge branch 'cylindermesh_to_vtk' of https://github.com/RemDelaporteMathurin/openmc into cylindermesh_to_vtk 2022-06-29 14:21:19 +02:00
RemDelaporteMathurin
1155ffb739 added pathlib import 2022-06-29 14:21:15 +02:00
Rémi Delaporte-Mathurin
9867a4340a
[skip ci] use .num_mesh_cells
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-06-29 14:19:56 +02:00
RemDelaporteMathurin
5174145c1e added checks to test 2022-06-29 13:21:36 +02:00
RemDelaporteMathurin
15b98ea541 added a test to meshes 2022-06-29 13:02:12 +02:00
RemDelaporteMathurin
c58465214b removed tally tests 2022-06-29 13:01:47 +02:00
RemDelaporteMathurin
7de718a85c adapted tests 2022-06-29 11:56:32 +02:00
RemDelaporteMathurin
8958b74da7 adapted tests 2022-06-29 11:09:32 +02:00
RemDelaporteMathurin
bff8bc4b45 added tests 2022-06-29 09:16:40 +02:00
Paul Romano
7723ea492c Add Material.get_nuclide_activity method and decay_constant function 2022-06-28 23:16:50 -05:00