Particle set
- class ParticleSet(all_info, keyword)
The constructor of particle set object with keyword.
- class ParticleSet(all_info, min, max)
The constructor of particle set object with keyword.
- class ParticleSet(all_info, members_list)
The constructor of particle set object with python object.
- Parameters:
all_info (AllInfo) – The system information.
members_list (PyObject*) – The Python object. Note: multiple keywords and particle index can be included in Python object
- class ParticleSet(all_info, member_tags)
The constructor of particle set object with a vector of particle tags.
- Parameters:
all_info (AllInfo) – The system information.
member_tags (vector<unsigned_int>) – A vector of particle tags
- ParticleSet combine(ParticleSet group1, ParticleSet group2)
combines two particle groups into one.
- getNumMembers()
return the number of group members .
Example:
groupC = gala.ParticleSet(all_info,'C') # initializes a particle set object by a particle type. group = gala.ParticleSet(all_info,['A', 'B', 'C']) # initializes a particle set object by particle types groupB = gala.ParticleSet(all_info,'body') # initializes a particle set object of body particles by 'body'. group_e = gala.ParticleSet(all_info,'charge') # initializes a particle set object of charged particles by 'charge'. groupC = gala.ParticleSet(all_info,'all') # initializes a particle set object of all particles by 'all'. group= gala.ParticleSet(all_info, ['A', 12, 'body']) # initializes a particle set object of particles by mixed keywords. groupAB= gala.ParticleSet.combine(groupA, groupB) # combines two particle sets into one set.