Skip to content

Commit

Permalink
removed deprecated bc argument to Grid
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrederiksen committed Mar 27, 2024
1 parent 5951ce8 commit 9d7ac3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sisl/io/siesta/siesta_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def read_grid(self, index=0, name="gridfunc", *args, **kwargs) -> Grid:
v = self._variable(name)

# Create the grid, Siesta uses periodic, always
lattice.set_boundary_condition(Grid.PERIODIC)
grid = Grid(
[nz, ny, nx],
bc=Grid.PERIODIC,
lattice=lattice,
dtype=v.dtype,
geometry=kwargs.get("geometry", None),
Expand Down
3 changes: 2 additions & 1 deletion src/sisl/io/siesta/siesta_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ def read_grid(self, name, index=0, **kwargs) -> Grid:
v = g.variables[name]

# Create the grid, Siesta uses periodic, always
grid = Grid([nz, ny, nx], bc=Grid.PERIODIC, geometry=geom, dtype=v.dtype)
geom.lattice.set_boundary_condition(Grid.PERIODIC)
grid = Grid([nz, ny, nx], geometry=geom, dtype=v.dtype)

Check warning on line 386 in src/sisl/io/siesta/siesta_nc.py

View check run for this annotation

Codecov / codecov/patch

src/sisl/io/siesta/siesta_nc.py#L385-L386

Added lines #L385 - L386 were not covered by tests

# Unit-conversion
BohrC2AngC = Bohr2Ang**3
Expand Down
3 changes: 2 additions & 1 deletion src/sisl/io/siesta/transiesta_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def read_grid(self, *args, **kwargs) -> Grid:
v = self._variable("V")

# Create the grid, Siesta uses periodic, always
grid = Grid([nc, nb, na], bc=Grid.PERIODIC, lattice=lattice, dtype=v.dtype)
lattice.set_boundary_condition(Grid.PERIODIC)
grid = Grid([nc, nb, na], lattice=lattice, dtype=v.dtype)

grid.grid[:, :, :] = v[:, :, :] * _Ry2eV

Expand Down

0 comments on commit 9d7ac3b

Please sign in to comment.