Skip to content

Commit

Permalink
fix: adding origin to scalar field
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Oct 26, 2021
1 parent e5b53d8 commit 8bfeb54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LoopStructural/visualisation/_scalar_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class ScalarField:
"""A scalar field defined by a regular grid and values
"""
def __init__(self,values,step_vector,nsteps, name='scalar field'):
def __init__(self,values,step_vector,nsteps, origin = np.zeros(3), name='scalar field'):
"""[summary]
Parameters
Expand All @@ -18,7 +18,7 @@ def __init__(self,values,step_vector,nsteps, name='scalar field'):
name of the feature for the visualisation
"""
self.values = values
self.grid = StructuredGrid(np.zeros(3),nsteps,step_vector)
self.grid = StructuredGrid(origin,nsteps,step_vector)
self.name = name

@property
Expand Down

0 comments on commit 8bfeb54

Please sign in to comment.