undo obsoleted changes to group command by iain bethune

This commit is contained in:
Axel Kohlmeyer 2016-08-22 15:23:16 -04:00
parent 40fd97bd4c
commit 243137d552
3 changed files with 9 additions and 31 deletions

View File

@ -15,7 +15,7 @@ group ID style args :pre
ID = user-defined name of the group :ulb,l
style = {delete} or {region} or {type} or {id} or {molecule} or {variable} or \
{include} or {subtract} or {union} or {intersect} or \
{dynamic} or {static} or {load_factor} :l
{dynamic} or {static} :l
{delete} = no args
{clear} = no args
{region} args = region-ID
@ -42,8 +42,7 @@ style = {delete} or {region} or {type} or {id} or {molecule} or {variable} or \
{region} value = region-ID
{var} value = name of variable
{every} value = N = update group every this many timesteps
{static} = no args
{load_factor} value = weighting to apply to particles in the group for load balancing :pre
{static} = no args :pre
:ule
[Examples:]
@ -61,8 +60,7 @@ group boundary subtract all a2 a3
group boundary union lower upper
group boundary intersect upper flow
group boundary delete
group mine dynamic all region myRegion every 100
group mine load_factor 2.0 :pre
group mine dynamic all region myRegion every 100 :pre
[Description:]
@ -267,12 +265,6 @@ The {static} style removes the setting for a dynamic group, converting
it to a static group (the default). The atoms in the static group are
those currently in the dynamic group.
The {load_factor} style applies a weight to all atoms in the group. When
load balancing is applied (by "balance"_balance.html or
"fix balance"_fix_balance.html) the count of atoms per processor is
weighted by the produce of the load factors of the groups which each
atom is a member of.
:line
[Restrictions:]
@ -284,8 +276,7 @@ The parent group of a dynamic group cannot itself be a dynamic group.
[Related commands:]
"balance"_balance.html, "dump"_dump.html, "fix"_fix.html,
"fix balance"_fix_balance.html, "region"_region.html,
"dump"_dump.html, "fix"_fix.html, "region"_region.html,
"velocity"_velocity.html
[Default:]

View File

@ -36,6 +36,8 @@
using namespace LAMMPS_NS;
#define MAX_GROUP 32
enum{TYPE,MOLECULE,ID};
enum{LT,LE,GT,GE,EQ,NEQ,BETWEEN};
@ -57,13 +59,11 @@ Group::Group(LAMMPS *lmp) : Pointers(lmp)
bitmask = new int[MAX_GROUP];
inversemask = new int[MAX_GROUP];
dynamic = new int[MAX_GROUP];
load_factor = new double[MAX_GROUP];
for (int i = 0; i < MAX_GROUP; i++) names[i] = NULL;
for (int i = 0; i < MAX_GROUP; i++) bitmask[i] = 1 << i;
for (int i = 0; i < MAX_GROUP; i++) inversemask[i] = bitmask[i] ^ ~0;
for (int i = 0; i < MAX_GROUP; i++) dynamic[i] = 0;
for (int i = 0; i < MAX_GROUP; i++) load_factor[i] = 1.0;
// create "all" group
@ -85,7 +85,6 @@ Group::~Group()
delete [] bitmask;
delete [] inversemask;
delete [] dynamic;
delete [] load_factor;
}
/* ----------------------------------------------------------------------
@ -136,7 +135,6 @@ void Group::assign(int narg, char **arg)
delete [] names[igroup];
names[igroup] = NULL;
dynamic[igroup] = 0;
load_factor[igroup] = 1.0;
ngroup--;
return;
@ -520,17 +518,9 @@ void Group::assign(int narg, char **arg)
dynamic[igroup] = 0;
} else if (strcmp(arg[1],"load_factor") == 0) {
if (narg != 3) error->all(FLERR,"Illegal group command");
load_factor[igroup] = force->numeric(FLERR, arg[2]);
// not a valid group style
}
else error->all(FLERR,"Illegal group command");
// not a valid group style
} else error->all(FLERR,"Illegal group command");
// print stats for changed group

View File

@ -18,8 +18,6 @@
#include "pointers.h"
#include <map>
#define MAX_GROUP 32
namespace LAMMPS_NS {
class Group : protected Pointers {
@ -29,7 +27,6 @@ class Group : protected Pointers {
int *bitmask; // one-bit mask for each group
int *inversemask; // inverse mask for each group
int *dynamic; // 1 if dynamic, 0 if not
double *load_factor; // weight factor for atoms in group, for load balancing
Group(class LAMMPS *);
~Group();