use qualified auto, make implicit type casts explicit

This commit is contained in:
Axel Kohlmeyer
2025-06-27 22:13:44 -04:00
parent a8fe7e9252
commit 8ddd474145

View File

@ -686,7 +686,7 @@ void CreateAtoms::command(int narg, char **arg)
if (domain->triclinic) domain->x2lamda(atom->nlocal);
domain->reset_box();
auto irregular = new Irregular(lmp);
auto *irregular = new Irregular(lmp);
irregular->migrate_atoms(1);
delete irregular;
if (domain->triclinic) domain->lamda2x(atom->nlocal);
@ -787,7 +787,7 @@ void CreateAtoms::add_random()
// warm up the generator 30x to avoid correlations in first-particle
// positions if runs are repeated with consecutive seeds
auto random = new RanPark(lmp, seed);
auto *random = new RanPark(lmp, seed);
for (int ii = 0; ii < 30; ii++) random->uniform();
// bounding box for atom creation
@ -1061,7 +1061,7 @@ int CreateAtoms::add_quasirandom(const double vert[3][3], tagint molid)
// Estimate number of particles from area
MathExtra::cross3(ab, ac, temp);
area = 0.5 * MathExtra::len3(temp);
int nparticles = ceil(mesh_density * area);
int nparticles = (int)ceil(mesh_density * area);
// estimate radius from number of particles and area
double rad = sqrt(area / MY_PI / nparticles);
@ -1219,7 +1219,7 @@ void CreateAtoms::add_mesh(const char *filename)
count = fread(&attr, sizeof(attr), 1, fp);
for (int j = 0; j < 3; ++j)
for (int k = 0; k < 3; ++k) vert[j][k] = triangle[3 * j + 3 + k];
for (int k = 0; k < 3; ++k) vert[j][k] = (double)triangle[3 * j + 3 + k];
++ntriangle;
if (mesh_style == BISECTION) {