Skip to content

Commit 15922c6

Browse files
committed
use guarded create_vector_data instead of update
1 parent 53b273c commit 15922c6

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

ngsolve_webgpu/cf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,10 +1095,7 @@ def get_bounding_box(self):
10951095
def redraw(self, timestamp=None):
10961096
super().redraw(timestamp=timestamp, cf=self.cf, mesh=self.mesh, grid_size=self.grid_size)
10971097

1098-
def update(self, options: RenderOptions):
1099-
self.options = options
1100-
if not self.needs_update:
1101-
return
1098+
def create_vector_data(self):
11021099
bb = self.mesh.ngmesh.bounding_box
11031100
self.bounding_box = np.array(
11041101
[[bb[0][0], bb[0][1], bb[0][2]], [bb[1][0], bb[1][1], bb[1][2]]]
@@ -1125,7 +1122,6 @@ def update(self, options: RenderOptions):
11251122
self.vectors = np.array(
11261123
[values[:, 0], values[:, 1], np.zeros_like(values[:, 0])], dtype=np.float32
11271124
).T.reshape(-1)
1128-
super().update(options)
11291125

11301126

11311127
class FieldLines(ShapeRenderer):

0 commit comments

Comments
 (0)