Skip to content

Commit 4a5e005

Browse files
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 5f37322 commit 4a5e005

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

LoopStructural/datatypes/_structured_grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def maximum(self):
6161
Returns
6262
-------
6363
np.ndarray
64-
Maximum coordinates (origin + nsteps * step_vector)
64+
Maximum coordinates (origin + (nsteps - 1) * step_vector)
6565
"""
6666
return self.origin + (self.nsteps-1) * self.step_vector
6767

LoopStructural/interpolators/supports/_2d_structured_grid.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,15 @@ def position_to_cell_vertices(self, pos):
490490
def onGeometryChange(self):
491491
pass
492492

493-
def vtk(self, z=0.0, *, node_properties={}, cell_properties={}):
493+
def vtk(self, node_properties=None, cell_properties=None, z=0.0):
494494
"""
495495
Create a vtk unstructured grid from the mesh
496496
"""
497+
if node_properties is None:
498+
node_properties = {}
499+
if cell_properties is None:
500+
cell_properties = {}
501+
497502
try:
498503
import pyvista as pv
499504
except ImportError:

0 commit comments

Comments
 (0)