add error location propagation to atom->set_mass() and atom->check_mass()

This commit is contained in:
Axel Kohlmeyer
2016-10-26 16:01:40 -04:00
parent 35753b8f08
commit f9a9e27f5a
23 changed files with 50 additions and 50 deletions

View File

@ -3675,7 +3675,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"xcm") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double xcm[3];
if (narg == 2) {
double masstotal = group->mass(igroup);
@ -3691,7 +3691,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"vcm") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double vcm[3];
if (narg == 2) {
double masstotal = group->mass(igroup);
@ -3730,7 +3730,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"gyration") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double xcm[3];
if (narg == 1) {
double masstotal = group->mass(igroup);
@ -3749,7 +3749,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"angmom") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double xcm[3],lmom[3];
if (narg == 2) {
double masstotal = group->mass(igroup);
@ -3767,7 +3767,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"torque") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double xcm[3],tq[3];
if (narg == 2) {
double masstotal = group->mass(igroup);
@ -3785,7 +3785,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"inertia") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double xcm[3],inertia[3][3];
if (narg == 2) {
double masstotal = group->mass(igroup);
@ -3806,7 +3806,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree,
else error->all(FLERR,"Invalid group function in variable formula");
} else if (strcmp(word,"omega") == 0) {
atom->check_mass();
atom->check_mass(FLERR);
double xcm[3],angmom[3],inertia[3][3],omega[3];
if (narg == 2) {
double masstotal = group->mass(igroup);