Skip to content

Commit e003287

Browse files
Changed nk to uint32 to avoid potential overflows
1 parent cfe6e36 commit e003287

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/xatu/Lattice.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class Lattice {
1919

2020
//// Attributes
2121
protected:
22-
int ndim_, natoms_, nk_, ncells_;
22+
int ndim_, natoms_, ncells_;
23+
uint32_t nk_;
2324
int factor_ = 1;
2425
double a_, c_, unitCellArea_;
2526
arma::mat bravaisLattice_, motif_, unitCellList_;
@@ -49,7 +50,7 @@ class Lattice {
4950
// Returns mesh of the Brillouin zone
5051
const arma::mat& meshBZ = meshBZ_;
5152
// Number of k points
52-
const int& nk = nk_;
53+
const uint32_t& nk = nk_;
5354
// Lattice parameters
5455
const double& a = a_;
5556
// Lattice parameters

0 commit comments

Comments
 (0)