Package esys :: Package lsm :: Package geometry :: Module GeometryPy :: Class GrainRandomBoxPacker
[hide private]
[frames] | no frames]

Class GrainRandomBoxPacker

 object --+                            
??.instance --+                        
         Packer --+                    
      BoxPackerBase --+                
              BoxPacker --+            
        GrainCubicBoxPacker --+        
              GrainRndBoxPacker --+    
           GrainRandomBoxPackerBase --+

Instances generate a packing of randomly sized aggregate grains within the confines of a specified box.

Instance Methods [hide private]
Generates packing of randomly sized grains.
Returns the collection of grains in the packing.
Returns an iterator for enumerating grains in the packing.
Returns the number of grains in the packing.

Inherited from Packer: __reduce__, getNumSpheres, getSimpleSphereCollection, getSimpleSphereIterator

Inherited from unreachable.instance: __new__

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

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

Inherited from object: __class__

Method Details [hide private]




  • grainGenerator (RndGrainGen) - object for generating grains within a specifed sphere.
  • cubicPackRadius (float) - Initial randomly sized seed grains are generated at positions corresponding to a regular cubic-packed grid of spheres with radius cubicPackRadius.
  • maxInsertFails (int) - Stopping criterion for terminating the random. insertion algorithm. Algorithm terminates after maxInsertFails number of attempts at fitting a randomly generated sphere into the box.
  • bBox (BoundingBox) - box specifying the region into which grains are packed. A 2D packing can be generated by specifying a zero sized z dimension, eg bBox=BoundingBox(Vec3(1,1,0),Vec3(21,21,0)) will generate a 2D packing in the x-y plane.
  • circDimList (list of 3 bool elements) - list indicating which (if any) of the box dimensions is circular (note, only a single dimension may be circular).
  • tolerance (float) - Generated spheres may overlap by no more than this amount.
Overrides: object.__init__



Generates packing of randomly sized grains.

Overrides: Packer.generate