Module gengeo :: Class HGrainGenerator2D
[hide private]
[frames] | no frames]

Class HGrainGenerator2D

 object --+        
          |        
??.instance --+    
              |    
   AGenerator2D --+
                  |
                 HGrainGenerator2D

A particle packing algorithm for filling 2D spaces with hexagonal grains.

Instance Methods [hide private]
void
__init__(...)
Initialises a particle packer in preparation for filling AVolume2D with bonded hexagonal grains of particles of a specified radius, positioned on a regular base lattice.
 
__str__(...)
str(x)
void
generatePacking(...)
Generates an assembly of haxagonal grains to fill the specified volume.

Inherited from AGenerator2D: __reduce__

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 32
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Initialises a particle packer in preparation for filling AVolume2D with bonded hexagonal grains of particles of a specified radius, positioned on a regular base lattice. Bonds within hexagonal grains are assigned bondTag=2. No bonds are generated between hexagonal grains.

Parameters:
  • radius (double) - the radius of grains to pack
Returns: void
Overrides: object.__init__

__str__(...)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

generatePacking(...)

 

Generates an assembly of haxagonal grains to fill the specified volume.

Parameters:
  • volume (BoxWithLines2D) - the 2D volume to fill with particles
  • ntable (MNTable2D) - the neighbours table that particles are inserted into
  • groupID (int) - the group ID assigned to particles (default: 0)
  • tag (int) - the tag assigned to particles
Returns: void