Skip to content

Commit

Permalink
updated average
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroomfire committed Nov 4, 2024
1 parent fb3d6f2 commit 271b8a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mdapy/steinhardt_bond_orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def _compute(
a_qnm_r[i, j, k] = qnm_r[i, j, k]
a_qnm_i[i, j, k] = qnm_i[i, j, k]

ti.loop_config(serialize=True)
# ti.loop_config(serialize=True)
for i in range(N):
if self.voronoi:
K = neighbor_number[i]
Expand Down Expand Up @@ -818,7 +818,7 @@ def identifySolidLiquid(self, threshold=0.7, n_bond=7):

ti.init()
start = time()
FCC = LatticeMaker(3.615, "FCC", 10, 10, 10)
FCC = LatticeMaker(3.615, "FCC", 100, 100, 100)
FCC.compute()
print(f"Build FCC time cost: {time()-start} s. Atom number: {FCC.N}.")

Expand Down
4 changes: 2 additions & 2 deletions mdapy/voronoi/_voro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ std::tuple<py::array_t<int>, py::array_t<double>, py::array_t<double>> get_voron
auto c_box = box.mutable_unchecked<double, 2>();
auto c_boundary = boundary.mutable_unchecked<bool, 1>();
auto c_neighbor_number = neighbor_number.mutable_unchecked<int, 1>();
int N = c_pos.shape(0);
size_t N = c_pos.shape(0);
double ax = c_box(0, 0), bx = c_box(0, 1);
double ay = c_box(1, 0), by = c_box(1, 1);
double az = c_box(2, 0), bz = c_box(2, 1);
Expand Down Expand Up @@ -58,7 +58,7 @@ std::tuple<py::array_t<int>, py::array_t<double>, py::array_t<double>> get_voron
}
}

int max_neighbor = c_neighbor_number(0);
size_t max_neighbor = c_neighbor_number(0);
for (int i = 1; i < N; ++i)
{
if (c_neighbor_number(i) > max_neighbor)
Expand Down

0 comments on commit 271b8a1

Please sign in to comment.