programming style
This commit is contained in:
@ -225,29 +225,29 @@ FixAdapt::FixAdapt(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixAdapt::~FixAdapt()
|
||||
{
|
||||
for (int m = 0; m < nadapt; m++) {
|
||||
delete [] adapt[m].var;
|
||||
delete[] adapt[m].var;
|
||||
if (adapt[m].which == PAIR) {
|
||||
delete [] adapt[m].pstyle;
|
||||
delete [] adapt[m].pparam;
|
||||
delete[] adapt[m].pstyle;
|
||||
delete[] adapt[m].pparam;
|
||||
memory->destroy(adapt[m].array_orig);
|
||||
} else if (adapt[m].which == BOND) {
|
||||
delete [] adapt[m].bstyle;
|
||||
delete [] adapt[m].bparam;
|
||||
delete[] adapt[m].bstyle;
|
||||
delete[] adapt[m].bparam;
|
||||
memory->destroy(adapt[m].vector_orig);
|
||||
} else if (adapt[m].which == ANGLE) {
|
||||
delete [] adapt[m].astyle;
|
||||
delete [] adapt[m].aparam;
|
||||
delete[] adapt[m].astyle;
|
||||
delete[] adapt[m].aparam;
|
||||
memory->destroy(adapt[m].vector_orig);
|
||||
}
|
||||
}
|
||||
delete [] adapt;
|
||||
delete[] adapt;
|
||||
|
||||
// check nfix in case all fixes have already been deleted
|
||||
|
||||
if (id_fix_diam && modify->nfix) modify->delete_fix(id_fix_diam);
|
||||
if (id_fix_chg && modify->nfix) modify->delete_fix(id_fix_chg);
|
||||
delete [] id_fix_diam;
|
||||
delete [] id_fix_chg;
|
||||
delete[] id_fix_diam;
|
||||
delete[] id_fix_chg;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -386,11 +386,11 @@ void FixAdapt::init()
|
||||
for (i = ad->ilo; i <= ad->ihi; i++)
|
||||
for (j = MAX(ad->jlo,i); j <= ad->jhi; j++)
|
||||
if (!pair->check_ijtype(i,j,pstyle))
|
||||
error->all(FLERR,"Fix adapt type pair range is not valid for "
|
||||
"pair hybrid sub-style");
|
||||
error->all(FLERR,"Fix adapt type pair range is not valid "
|
||||
"for pair hybrid sub-style {}", pstyle);
|
||||
}
|
||||
|
||||
delete [] pstyle;
|
||||
delete[] pstyle;
|
||||
|
||||
} else if (ad->which == BOND) {
|
||||
ad->bond = nullptr;
|
||||
@ -416,7 +416,7 @@ void FixAdapt::init()
|
||||
if (utils::strmatch(force->bond_style,"^hybrid"))
|
||||
error->all(FLERR,"Fix adapt does not support bond_style hybrid");
|
||||
|
||||
delete [] bstyle;
|
||||
delete[] bstyle;
|
||||
|
||||
} else if (ad->which == ANGLE) {
|
||||
ad->angle = nullptr;
|
||||
@ -442,7 +442,7 @@ void FixAdapt::init()
|
||||
if (utils::strmatch(force->angle_style,"^hybrid"))
|
||||
error->all(FLERR,"Fix adapt does not support angle_style hybrid");
|
||||
|
||||
delete [] astyle;
|
||||
delete[] astyle;
|
||||
|
||||
} else if (ad->which == KSPACE) {
|
||||
if (force->kspace == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user