Skip to content

Commit

Permalink
Merge pull request #734 from tfrederiksen/grid-bc-dep
Browse files Browse the repository at this point in the history
Remove deprecated `bc` argument to `Grid`
  • Loading branch information
zerothi authored Apr 2, 2024
2 parents a6f12a8 + 9d7ac3b commit 9ab5c2c
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)

# 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 9ab5c2c

Please sign in to comment.