Added group keywords to fix gcmc, fixed destructor
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13457 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -332,17 +332,6 @@ FixGCMC::~FixGCMC()
|
|||||||
delete random_equal;
|
delete random_equal;
|
||||||
delete random_unequal;
|
delete random_unequal;
|
||||||
|
|
||||||
// remove groups this fix defined
|
|
||||||
// only do it if the groups exists and group itself exists
|
|
||||||
|
|
||||||
if (molecule_group && (strcmp(group->names[0],"all") == 0)) {
|
|
||||||
char **group_arg = new char*[2];
|
|
||||||
group_arg[0] = group->names[molecule_group];
|
|
||||||
group_arg[1] = (char *) "delete";
|
|
||||||
group->assign(2,group_arg);
|
|
||||||
delete [] group_arg;
|
|
||||||
}
|
|
||||||
|
|
||||||
memory->destroy(local_gas_list);
|
memory->destroy(local_gas_list);
|
||||||
memory->destroy(atom_coord);
|
memory->destroy(atom_coord);
|
||||||
memory->destroy(coords);
|
memory->destroy(coords);
|
||||||
@ -1724,7 +1713,7 @@ void FixGCMC::attempt_molecule_insertion_full()
|
|||||||
ninsertion_attempts += 1.0;
|
ninsertion_attempts += 1.0;
|
||||||
|
|
||||||
double energy_before = energy_stored;
|
double energy_before = energy_stored;
|
||||||
|
|
||||||
tagint maxmol = 0;
|
tagint maxmol = 0;
|
||||||
for (int i = 0; i < atom->nlocal; i++) maxmol = MAX(maxmol,atom->molecule[i]);
|
for (int i = 0; i < atom->nlocal; i++) maxmol = MAX(maxmol,atom->molecule[i]);
|
||||||
tagint maxmol_all;
|
tagint maxmol_all;
|
||||||
@ -1802,9 +1791,7 @@ void FixGCMC::attempt_molecule_insertion_full()
|
|||||||
// optionally add to type-based groups
|
// optionally add to type-based groups
|
||||||
|
|
||||||
atom->mask[m] = groupbitall;
|
atom->mask[m] = groupbitall;
|
||||||
printf("ngrouptypes %d\n",ngrouptypes);
|
|
||||||
for (int igroup = 0; igroup < ngrouptypes; igroup++) {
|
for (int igroup = 0; igroup < ngrouptypes; igroup++) {
|
||||||
printf("check type %d %d\n",ngcmc_type,grouptypes[igroup]);
|
|
||||||
if (ngcmc_type == grouptypes[igroup])
|
if (ngcmc_type == grouptypes[igroup])
|
||||||
atom->mask[m] |= grouptypebits[igroup];
|
atom->mask[m] |= grouptypebits[igroup];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user