use qualified auto, make implicit type casts explicit
This commit is contained in:
@ -686,7 +686,7 @@ void CreateAtoms::command(int narg, char **arg)
|
|||||||
|
|
||||||
if (domain->triclinic) domain->x2lamda(atom->nlocal);
|
if (domain->triclinic) domain->x2lamda(atom->nlocal);
|
||||||
domain->reset_box();
|
domain->reset_box();
|
||||||
auto irregular = new Irregular(lmp);
|
auto *irregular = new Irregular(lmp);
|
||||||
irregular->migrate_atoms(1);
|
irregular->migrate_atoms(1);
|
||||||
delete irregular;
|
delete irregular;
|
||||||
if (domain->triclinic) domain->lamda2x(atom->nlocal);
|
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
|
// warm up the generator 30x to avoid correlations in first-particle
|
||||||
// positions if runs are repeated with consecutive seeds
|
// 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();
|
for (int ii = 0; ii < 30; ii++) random->uniform();
|
||||||
|
|
||||||
// bounding box for atom creation
|
// 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
|
// Estimate number of particles from area
|
||||||
MathExtra::cross3(ab, ac, temp);
|
MathExtra::cross3(ab, ac, temp);
|
||||||
area = 0.5 * MathExtra::len3(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
|
// estimate radius from number of particles and area
|
||||||
double rad = sqrt(area / MY_PI / nparticles);
|
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);
|
count = fread(&attr, sizeof(attr), 1, fp);
|
||||||
|
|
||||||
for (int j = 0; j < 3; ++j)
|
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;
|
++ntriangle;
|
||||||
if (mesh_style == BISECTION) {
|
if (mesh_style == BISECTION) {
|
||||||
|
|||||||
Reference in New Issue
Block a user