use qualified auto and avoid redundant types
This commit is contained in:
@ -385,8 +385,8 @@ void FixWallGran::post_force(int /*vflag*/)
|
|||||||
|
|
||||||
if (neighbor->ago == 0 && fix_rigid) {
|
if (neighbor->ago == 0 && fix_rigid) {
|
||||||
int tmp;
|
int tmp;
|
||||||
int *body = (int *) fix_rigid->extract("body",tmp);
|
auto *body = (int *) fix_rigid->extract("body",tmp);
|
||||||
auto mass_body = (double *) fix_rigid->extract("masstotal",tmp);
|
auto *mass_body = (double *) fix_rigid->extract("masstotal",tmp);
|
||||||
if (atom->nmax > nmax) {
|
if (atom->nmax > nmax) {
|
||||||
memory->destroy(mass_rigid);
|
memory->destroy(mass_rigid);
|
||||||
nmax = atom->nmax;
|
nmax = atom->nmax;
|
||||||
|
|||||||
@ -84,7 +84,7 @@ void FixWallGranRegion::init()
|
|||||||
{
|
{
|
||||||
FixWallGran::init();
|
FixWallGran::init();
|
||||||
|
|
||||||
auto newregion = domain->get_region_by_id(idregion);
|
auto *newregion = domain->get_region_by_id(idregion);
|
||||||
if (!newregion) error->all(FLERR, "Region {} for fix wall/gran/region does not exist", idregion);
|
if (!newregion) error->all(FLERR, "Region {} for fix wall/gran/region does not exist", idregion);
|
||||||
|
|
||||||
// check if region properties changed between runs
|
// check if region properties changed between runs
|
||||||
@ -136,8 +136,8 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
|||||||
|
|
||||||
if (neighbor->ago == 0 && fix_rigid) {
|
if (neighbor->ago == 0 && fix_rigid) {
|
||||||
int tmp;
|
int tmp;
|
||||||
int *body = (int *) fix_rigid->extract("body", tmp);
|
auto *body = (int *) fix_rigid->extract("body", tmp);
|
||||||
auto mass_body = (double *) fix_rigid->extract("masstotal", tmp);
|
auto *mass_body = (double *) fix_rigid->extract("masstotal", tmp);
|
||||||
if (atom->nmax > nmax) {
|
if (atom->nmax > nmax) {
|
||||||
memory->destroy(mass_rigid);
|
memory->destroy(mass_rigid);
|
||||||
nmax = atom->nmax;
|
nmax = atom->nmax;
|
||||||
|
|||||||
Reference in New Issue
Block a user