Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Dec 26, 2024
1 parent 22220ea commit ecb7e89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions phono3py/phonon/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,12 @@ def _set_mesh_numbers(
)
if not use_grg or not found_grg:
if symmetry_dataset is None:
self._D_diag = length2mesh(length, self._lattice)
mesh_numbers = length2mesh(length, self._lattice)
else:
self._D_diag = length2mesh(
mesh_numbers = length2mesh(
length, self._lattice, rotations=symmetry_dataset.rotations
)
self._D_diag = np.array(self._D_diag, dtype="long")
self._D_diag = np.array(mesh_numbers, dtype="long")
if num_values == 9:
self._run_grg(
symmetry_dataset,
Expand Down
6 changes: 4 additions & 2 deletions phono3py/phonon3/collision_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ def run(self):
if self._is_reducible_collision_matrix:
num_mesh_points = np.prod(self._pp.mesh_numbers)
self._collision_matrix = np.zeros(
(num_band0, num_mesh_points, num_band), dtype="double"
(num_band0, num_mesh_points, num_band), dtype="double", order="C"
)
else:
self._collision_matrix = np.zeros(
(num_band0, 3, self._num_ir_grid_points, num_band, 3), dtype="double"
(num_band0, 3, self._num_ir_grid_points, num_band, 3),
dtype="double",
order="C",
)
self._run_with_band_indices()
self._run_collision_matrix()
Expand Down
2 changes: 1 addition & 1 deletion phono3py/phonon3/triplets.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def _get_BZ_triplets_at_q(bz_grid_index, bz_grid: BZGrid, map_triplets):
for g in map_triplets:
weights[g] += 1
ir_weights = np.extract(weights > 0, weights)
triplets = -np.ones((len(ir_weights), 3), dtype="long")
triplets = -np.ones((len(ir_weights), 3), dtype="long", order="C")
num_ir_ret = phono3c.BZ_triplets_at_q(
triplets,
bz_grid_index,
Expand Down

0 comments on commit ecb7e89

Please sign in to comment.