Skip to content

Commit

Permalink
vector field: more convinient api method.
Browse files Browse the repository at this point in the history
  • Loading branch information
portnov committed Dec 24, 2022
1 parent 0315d04 commit fe9ea68
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/field/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ def evaluate(self, point):
def evaluate_grid(self, xs, ys, zs):
raise Exception("not implemented")

def evaluate_array(self, points):
xs = points[:,0]
ys = points[:,1]
zs = points[:,2]
return self.evaluate_grid(xs, ys, zs)

class SvMatrixVectorField(SvVectorField):

def __init__(self, matrix):
Expand Down

0 comments on commit fe9ea68

Please sign in to comment.