mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #2050 from paulromano/plot-basis-fix
Make sure basis gets set in Plot.from_geometry
This commit is contained in:
commit
6a8a870dd1
2 changed files with 2 additions and 0 deletions
|
|
@ -512,6 +512,7 @@ class Plot(IDManagerMixin):
|
|||
plot.origin = np.insert((lower_left + upper_right)/2,
|
||||
slice_index, slice_coord)
|
||||
plot.width = upper_right - lower_left
|
||||
plot.basis = basis
|
||||
return plot
|
||||
|
||||
def colorize(self, geometry, seed=1):
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ def test_from_geometry():
|
|||
plot = openmc.Plot.from_geometry(geom, basis)
|
||||
assert plot.origin == pytest.approx((0., 0., 0.))
|
||||
assert plot.width == pytest.approx((width, width))
|
||||
assert plot.basis == basis
|
||||
|
||||
|
||||
def test_highlight_domains():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue