improvements from clang-tidy

This commit is contained in:
Axel Kohlmeyer
2023-12-19 23:37:07 -05:00
parent 3237c30117
commit dedbd8f6db
16 changed files with 33 additions and 46 deletions

View File

@ -73,10 +73,7 @@ ComputePACE::ComputePACE(LAMMPS *lmp, int narg, char **arg) :
auto potential_file_name = utils::get_potential_file_path(arg[3]);
delete acecimpl->basis_set;
acecimpl->basis_set = new ACECTildeBasisSet(potential_file_name);
double cut = acecimpl->basis_set->cutoffmax;
cutmax = acecimpl->basis_set->cutoffmax;
double cuti;
double radelemall = 0.5;
//# of rank 1, rank > 1 functions
@ -178,7 +175,6 @@ void ComputePACE::init_list(int /*id*/, NeighList *ptr)
void ComputePACE::compute_array()
{
int ntotal = atom->nlocal + atom->nghost;
double **f = atom->f;
invoked_array = update->ntimestep;
// grow pace_peratom array if necessary
@ -208,9 +204,6 @@ void ComputePACE::compute_array()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list);
SPECIES_TYPE *mus;
NS_TYPE *ns;
LS_TYPE *ls;
const int inum = list->inum;
const int* const ilist = list->ilist;
@ -234,7 +227,6 @@ void ComputePACE::compute_array()
// compute pace derivatives for each atom in group
// use full neighbor list to count atoms less than cutoff
double** const x = atom->x;
const int* const mask = atom->mask;
const int ntypes = atom->ntypes;
@ -251,8 +243,8 @@ void ComputePACE::compute_array()
delete acecimpl->ace;
acecimpl->ace = new ACECTildeEvaluator(*acecimpl->basis_set);
acecimpl->ace->compute_projections = 1;
acecimpl->ace->compute_b_grad = 1;
acecimpl->ace->compute_projections = true;
acecimpl->ace->compute_b_grad = true;
int n_r1, n_rp = 0;
n_r1 = acecimpl->basis_set->total_basis_size_rank1[0];
n_rp = acecimpl->basis_set->total_basis_size[0];