forked from lijiext/lammps
avoid hang in fix reax/c/species when multiple atoms have the exact same x-coordinate
This commit is contained in:
parent
092806ad4f
commit
412cb8f089
|
@ -500,8 +500,16 @@ void FixReaxCSpecies::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)
|
|||
|
||||
AtomCoord FixReaxCSpecies::chAnchor(AtomCoord in1, AtomCoord in2)
|
||||
{
|
||||
if (in1.x <= in2.x)
|
||||
if (in1.x < in2.x)
|
||||
return in1;
|
||||
else if (in1.x == in2.x) {
|
||||
if (in1.y < in2.y)
|
||||
return in1;
|
||||
else if (in1.y == in2.y) {
|
||||
if (in1.z < in2.z)
|
||||
return in1;
|
||||
}
|
||||
}
|
||||
return in2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue