From 8ddd4741455e7ebf3d41cdb300057ff9f17963fa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jun 2025 22:13:44 -0400 Subject: [PATCH] use qualified auto, make implicit type casts explicit --- src/create_atoms.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 1b3aba3448..997e11c16b 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -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) {