Skip to content

Commit

Permalink
fix: setting default for viewer to model = none
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Oct 12, 2021
1 parent ae00ba7 commit 8aec0e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion LoopStructural/interpolators/unstructured_tetra.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ def get_element_gradients(self, elements = None):
# # changing order to points, tetra, nodes, coord
# points = points.swapaxes(0, 2)
# points = points.swapaxes(1, 2)

if elements is None:
elements = np.arange(0,self.n_elements,dtype=int)
ps = self.nodes[self.elements,:]#points.reshape(points.shape[0] * points.shape[1], points.shape[2], points.shape[3])
#vertices = self.nodes[self.elements[col,:]]
m = np.array(
Expand Down
2 changes: 1 addition & 1 deletion LoopStructural/visualisation/lavavu.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def close_all():


class LavaVuModelViewer(BaseModelPlotter):
def __init__(self,model, bounding_box=None, nsteps=None, **kwargs):
def __init__(self,model=None, bounding_box=None, nsteps=None, **kwargs):
if lavavu is None:
logger.error("Lavavu isn't installed: pip install lavavu")
return
Expand Down
2 changes: 1 addition & 1 deletion LoopStructural/visualisation/model_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from LoopStructural.utils.helper import create_surface, get_vectors, create_box

class BaseModelPlotter:
def __init__(self, model):
def __init__(self, model = None):
"""
Parameters
Expand Down

0 comments on commit 8aec0e4

Please sign in to comment.