#include <ClumpyGeometryDecorator.hpp>
Public Member Functions | |
double | clumpFraction () const |
double | clumpRadius () const |
bool | cutoffClumps () const |
double | density (Position bfr) const override |
Position | generatePosition () const override |
Geometry * | geometry () const |
int | numClumps () const |
int | seed () const |
double | SigmaX () const override |
double | SigmaY () const override |
double | SigmaZ () const override |
SmoothingKernel * | smoothingKernel () const |
![]() | |
int | dimension () const override |
virtual double | density (Position bfr) const =0 |
virtual int | dimension () const =0 |
virtual Position | generatePosition () const =0 |
virtual double | SigmaX () const =0 |
virtual double | SigmaY () const =0 |
virtual double | SigmaZ () const =0 |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
Protected Member Functions | |
ClumpyGeometryDecorator () | |
void | setupSelfAfter () override |
![]() | |
GenGeometry () | |
![]() | |
Geometry () | |
Random * | random () const |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = GenGeometry |
using | ItemType = ClumpyGeometryDecorator |
Private Attributes | |
double | _clumpFraction |
double | _clumpRadius |
std::vector< Vec > | _clumpv |
bool | _cutoffClumps |
Geometry * | _geometry |
int | _numClumps |
int | _seed |
SmoothingKernel * | _smoothingKernel |
Friends | |
class | ItemRegistry |
The ClumpyGeometryDecorator class is a geometry decorator that adds clumpiness to any geometry. It basically assigns a fraction
where
By default, this class uses the standard random generator also used by other classes during setup. Consecutive executions of the same ski file will produce the same clump positions (even if the simulation is configured to have multiple parallel execution threads or processes). On the other hand, multiple occurrences of the ClumpyGeometryDecorator in a given ski file will always produce a different set of clump positions, because consecutive portions of the pseudo-random sequence are being employed. While this is usually just fine, in some models one might want to line up, for example, the clumps in a medium distribution with those in a source distribution. Therefore, if a nonzero value is specified for the seed property, the clump positions are generated using a temporary random number generator initialized with that seed. Configuring the same seed for two ClumpyGeometryDecorator instances will line up the respective clump positions, assuming the underlying geometry and the number of clumps are identical.
|
inlineprotected |
Default constructor for concrete Item subclass ClumpyGeometryDecorator : "a decorator that adds clumpiness to any geometry" .
|
inline |
This function returns the value of the discoverable double property clumpFraction : "the fraction of the mass locked up in clumps" .
The minimum value for this property is "[0" .
The maximum value for this property is "1]" .
|
inline |
This function returns the value of the discoverable double property clumpRadius : "the scale radius of a single clump" .
This property represents a physical quantity of type "length" .
The minimum value for this property is "]0" .
|
inline |
This function returns the value of the discoverable Boolean property cutoffClumps : "cut off clumps at the boundary of the underlying geometry" .
The default value for this property is given by the conditional value expression "false" .
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function returns the density
Implements Geometry.
|
overridevirtual |
This function generates a random position from the geometry, by drawing a random point from the three-dimensional probability density
Implements Geometry.
|
inline |
This function returns the value of the discoverable item property geometry : "the geometry to be made clumpy" .
|
inline |
This function returns the value of the discoverable integer property numClumps : "the total number of clumps" .
The minimum value for this property is "1" .
|
inline |
This function returns the value of the discoverable integer property seed : "the seed for the random clump position generator, or zero to use the default generator" .
The minimum value for this property is "0" .
The maximum value for this property is "1000000" .
The default value for this property is given by the conditional value expression "0" .
This property is displayed only if the Boolean expression "Level3" evaluates to true after replacing the names by true or false depending on their presence.
|
overrideprotectedvirtual |
This function generates the
Reimplemented from SimulationItem.
|
overridevirtual |
This pure virtual function returns the X-axis surface density. It simply passes on the value returned by the geometry being decorated.
Implements Geometry.
|
overridevirtual |
This pure virtual function returns the Y-axis surface density. It simply passes on the value returned by the geometry being decorated.
Implements Geometry.
|
overridevirtual |
This pure virtual function returns the Z-axis surface density. It simply passes on the value returned by the geometry being decorated.
Implements Geometry.
|
inline |
This function returns the value of the discoverable item property smoothingKernel : "the smoothing kernel that describes the density of a single clump" .
The default value for this property is given by the conditional value expression "CubicSplineSmoothingKernel" .
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.