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

Class RndGrainGen

 object --+    
          |    
??.instance --+
              |
             RndGrainGen
Known Subclasses:

Virtual class used to generate grains for GrainRandomBoxPacker instances.

Instance Methods [hide private]
 
__init__(...)
Constructs a grain generator.
 
__reduce__(...)
helper for pickle
Grain
getGrain(...)
Method to be overridden in child classes.
 
getMaxGrainRadius(...)
Returns the desired maximum radius for a grain.
 
getMaxParticleRadius(...)
Returns the maximum radius for grain subsphere.
 
getMinGrainRadius(...)
Returns the desired minimum radius for a grain.
 
getMinParticleRadius(...)
Returns the minimum radius for grain subsphere.

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__ = 64
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Constructs a grain generator.

Parameters:
  • minGrainRadius (float) - minimum radius for a grain.
  • maxGrainRadius (float) - maximum radius for a grain.
  • minParticleRadius (float) - minimum radius of a grain subsphere.
  • maxParticleRadius (float) - maximum radius of a grain subsphere.
Overrides: object.__init__

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

getGrain(...)

 

Method to be overridden in child classes. This method is expected to return a Grain object which lies entirely within a sphere. The sphere object passed to this method has getRadius and getCentre methods.

Parameters:
  • sphere (SimpleSphere) - Specifes position and maximum radius of grain which is to be returned by this method.
Returns: Grain
A Grain which lies entirely within the specified sphere.