Skip to content

Commit 89a9ba0

Browse files
committed
modify the input format
1 parent 4053871 commit 89a9ba0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/module_cell/update_cell.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,9 @@ void update_pos_tau(const Lattice& lat,
374374
bcast_atoms_tau(atoms, ntype);
375375
}
376376

377+
template <typename T>
377378
void update_pos_taud(const Lattice& lat,
378-
const double* posd_in,
379+
const T* posd_in,
379380
const int ntype,
380381
const int nat,
381382
Atom* atoms)
@@ -407,8 +408,9 @@ void update_pos_taud(const Lattice& lat,
407408
Atom* atoms)
408409
{
409410
int iat = 0;
410-
for (int it = 0; it < ntype; it++) {
411-
Atom* atom = &atoms[it];
411+
for (int it = 0; it < this->ntype; it++)
412+
{
413+
Atom* atom = &this->atoms[it];
412414
for (int ia = 0; ia < atom->na; ia++)
413415
{
414416
for (int ik = 0; ik < 3; ++ik)
@@ -419,9 +421,9 @@ void update_pos_taud(const Lattice& lat,
419421
iat++;
420422
}
421423
}
422-
assert(iat == nat);
423-
periodic_boundary_adjustment(atoms,lat.latvec,ntype);
424-
bcast_atoms_tau(atoms, ntype);
424+
assert(iat == this->nat);
425+
unitcell::periodic_boundary_adjustment(this->atoms,this->latvec, this->ntype);
426+
this->bcast_atoms_tau();
425427
}
426428

427429
void periodic_boundary_adjustment(Atom* atoms,

0 commit comments

Comments
 (0)