Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e42ecd9
rough draft of only restoring view settings, not model settings - thi…
kkiesling Jun 9, 2022
a253599
remove commented lines and functions that are no longer needed
kkiesling Jun 9, 2022
0c6d89f
remove unnecessary import
kkiesling Jun 13, 2022
7ce9e4b
remove missed print statement
kkiesling Jun 22, 2022
5ee873b
more streamlined to use composition over inheritance
kkiesling Jun 22, 2022
1b187f7
trying to asses view equality and populating ids
kkiesling Jun 22, 2022
748baf8
trying to separate just the view parameters from the rest of view ind…
kkiesling Jun 23, 2022
b130f62
separate out only the _PlotBase parameters and check those
kkiesling Jun 23, 2022
95ef00e
only store necessary info for reload in pickle file
kkiesling Jun 24, 2022
4d371be
cleaned up docstrings
kkiesling Jun 29, 2022
e9e92a0
make view params attribute on plotview to simplify
kkiesling Jul 6, 2022
3e996c9
remove debugging print statements
kkiesling Jul 6, 2022
eb34f8b
need to copy view params from previous view
kkiesling Jul 7, 2022
ac39180
updated docstrings for new classes
kkiesling Jul 7, 2022
0ff3ed4
Apply suggestions from code review
kkiesling Jul 8, 2022
ed014f5
issue warning and ignore plot settings if load fails
kkiesling Jul 8, 2022
81b41bb
typo
kkiesling Jul 8, 2022
8051d2f
remove mistaken imports
kkiesling Jul 8, 2022
3ab3f4b
ids_map and prop_map don't need to be private
kkiesling Jul 8, 2022
7e3ecd3
wording changes
kkiesling Jul 11, 2022
ca2eab5
need to add view_params to list of attributes
kkiesling Jul 11, 2022
6ad6cde
increment plotmodel version
kkiesling Jul 11, 2022
08a9a38
simplify try/except statement
kkiesling Jul 11, 2022
635fbf9
use_settings_pkl in docstring
kkiesling Jul 11, 2022
9990c72
store full currentView so that view_ind and view_params are both saved
kkiesling Jul 11, 2022
6a5f909
list of attribures as class attribute
kkiesling Jul 11, 2022
05743d8
restore domain properties if file hashes are unchanged as well
kkiesling Jul 11, 2022
56e12dd
prop_map and properties attributes were redundant
kkiesling Jul 11, 2022
90bf435
adopt_plotbase must be in PlotView to be able to set params
kkiesling Jul 11, 2022
8825405
make cell_ids, instances, and mat_ids properties
kkiesling Jul 11, 2022
ebe5460
make initial view the currentview and always create a default view
kkiesling Jul 13, 2022
9ae7a76
compare active and current views before updating current view to chec…
kkiesling Jul 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adopt_plotbase must be in PlotView to be able to set params
  • Loading branch information
kkiesling committed Jul 11, 2022
commit 90bf43501d864c7275100b92dac722e9f7d8bb8f
33 changes: 17 additions & 16 deletions openmc_plotter/plotmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,22 +920,6 @@ def urc(self):
z = self.origin[2] + self.height / 2.0
return x, y, z

def adopt_plotbase(self, view):
"""
Applies only the geometric aspects of a view to the current view

Parameters
----------

view : PlotView
View to take parameters from
"""
self.origin = view.origin
self.width = view.width
self.height = view.height
self.h_res = self.h_res
self.v_res = self.v_res
self.basis = view.basis

class PlotView:
"""Setup the view of the model.
Expand Down Expand Up @@ -1057,6 +1041,23 @@ def getDomains(domain_type):

return domains

def adopt_plotbase(self, view):
"""
Applies only the geometric aspects of a view to the current view

Parameters
----------

view : PlotView
View to take parameters from
"""
self.origin = view.origin
self.width = view.width
self.height = view.height
self.h_res = view.h_res
self.v_res = view.v_res
self.basis = view.basis


class DomainView():
""" Represents view settings for OpenMC cell or material.
Expand Down