git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11887 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -68,6 +68,7 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||||||
|
|
||||||
timeflag = 0;
|
timeflag = 0;
|
||||||
comm_forward = comm_reverse = 0;
|
comm_forward = comm_reverse = 0;
|
||||||
|
dynamic_group_allow = 1;
|
||||||
cudable = 0;
|
cudable = 0;
|
||||||
|
|
||||||
invoked_scalar = invoked_vector = invoked_array = -1;
|
invoked_scalar = invoked_vector = invoked_array = -1;
|
||||||
|
|||||||
@ -20,7 +20,6 @@ namespace LAMMPS_NS {
|
|||||||
|
|
||||||
class Compute : protected Pointers {
|
class Compute : protected Pointers {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
char *id,*style;
|
char *id,*style;
|
||||||
int igroup,groupbit;
|
int igroup,groupbit;
|
||||||
|
|
||||||
@ -75,13 +74,14 @@ class Compute : protected Pointers {
|
|||||||
|
|
||||||
double dof; // degrees-of-freedom for temperature
|
double dof; // degrees-of-freedom for temperature
|
||||||
|
|
||||||
int comm_forward; // size of forward communication (0 if none)
|
int comm_forward; // size of forward communication (0 if none)
|
||||||
int comm_reverse; // size of reverse communication (0 if none)
|
int comm_reverse; // size of reverse communication (0 if none)
|
||||||
|
int dynamic_group_allow; // 1 if can be used with dynamic group, else 0
|
||||||
|
|
||||||
unsigned int datamask;
|
unsigned int datamask;
|
||||||
unsigned int datamask_ext;
|
unsigned int datamask_ext;
|
||||||
|
|
||||||
int cudable; // 1 if compute is CUDA-enabled
|
int cudable; // 1 if compute is CUDA-enabled
|
||||||
|
|
||||||
Compute(class LAMMPS *, int, char **);
|
Compute(class LAMMPS *, int, char **);
|
||||||
virtual ~Compute();
|
virtual ~Compute();
|
||||||
|
|||||||
@ -58,6 +58,7 @@ Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||||||
create_attribute = 0;
|
create_attribute = 0;
|
||||||
restart_pbc = 0;
|
restart_pbc = 0;
|
||||||
wd_header = wd_section = 0;
|
wd_header = wd_section = 0;
|
||||||
|
dynamic_group_allow = 0;
|
||||||
cudable_comm = 0;
|
cudable_comm = 0;
|
||||||
|
|
||||||
scalar_flag = vector_flag = array_flag = 0;
|
scalar_flag = vector_flag = array_flag = 0;
|
||||||
|
|||||||
@ -46,6 +46,7 @@ class Fix : protected Pointers {
|
|||||||
// so write_restart must remap to PBC
|
// so write_restart must remap to PBC
|
||||||
int wd_header; // # of header values fix writes to data file
|
int wd_header; // # of header values fix writes to data file
|
||||||
int wd_section; // # of sections fix writes to data file
|
int wd_section; // # of sections fix writes to data file
|
||||||
|
int dynamic_group_allow; // 1 if can be used with dynamic group, else 0
|
||||||
int cudable_comm; // 1 if fix has CUDA-enabled communication
|
int cudable_comm; // 1 if fix has CUDA-enabled communication
|
||||||
|
|
||||||
int scalar_flag; // 0/1 if compute_scalar() function exists
|
int scalar_flag; // 0/1 if compute_scalar() function exists
|
||||||
|
|||||||
@ -500,8 +500,8 @@ void Group::assign(int narg, char **arg)
|
|||||||
|
|
||||||
if (me == 0) {
|
if (me == 0) {
|
||||||
if (dynamic[igroup]) {
|
if (dynamic[igroup]) {
|
||||||
if (screen) fprintf(screen,"dynamic group %s\n",names[igroup]);
|
if (screen) fprintf(screen,"dynamic group %s defined\n",names[igroup]);
|
||||||
if (logfile) fprintf(logfile,"dynamic group %s\n",names[igroup]);
|
if (logfile) fprintf(logfile,"dynamic group %s defined\n",names[igroup]);
|
||||||
} else {
|
} else {
|
||||||
if (screen)
|
if (screen)
|
||||||
fprintf(screen,"%.15g atoms in group %s\n",all,names[igroup]);
|
fprintf(screen,"%.15g atoms in group %s\n",all,names[igroup]);
|
||||||
|
|||||||
@ -217,6 +217,23 @@ void Modify::init()
|
|||||||
}
|
}
|
||||||
addstep_compute_all(update->ntimestep);
|
addstep_compute_all(update->ntimestep);
|
||||||
|
|
||||||
|
// error if any fix or compute is using a dynamic group when not allowed
|
||||||
|
|
||||||
|
for (i = 0; i < nfix; i++)
|
||||||
|
if (!fix[i]->dynamic_group_allow && group->dynamic[fix[i]->igroup]) {
|
||||||
|
char str[128];
|
||||||
|
sprintf(str,"Fix %s does not allow use of dynamic group",fix[i]->id);
|
||||||
|
error->all(FLERR,str);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < ncompute; i++)
|
||||||
|
if (!compute[i]->dynamic_group_allow &&
|
||||||
|
group->dynamic[compute[i]->igroup]) {
|
||||||
|
char str[128];
|
||||||
|
sprintf(str,"Compute %s does not allow use of dynamic group",fix[i]->id);
|
||||||
|
error->all(FLERR,str);
|
||||||
|
}
|
||||||
|
|
||||||
// warn if any particle is time integrated more than once
|
// warn if any particle is time integrated more than once
|
||||||
|
|
||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
|
|||||||
Reference in New Issue
Block a user