The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
SiteListTreePolicy Class Reference

#include <SiteListTreePolicy.hpp>

Inheritance diagram for SiteListTreePolicy:
Inheritance graph
[legend]

Public Member Functions

vector< TreeNode * > constructTree (TreeNode *root) override
 
int numExtraLevels () const
 
- Public Member Functions inherited from TreePolicy
virtual vector< TreeNode * > constructTree (TreeNode *root)=0
 
int maxLevel () const
 
int minLevel () const
 
- Public Member Functions inherited from SimulationItem
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
 
- Public Member Functions inherited from Item
 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 ItemgetItemProperty (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)
 
Itemoperator= (const Item &)=delete
 
Itemparent () 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

 SiteListTreePolicy ()
 
- Protected Member Functions inherited from TreePolicy
 TreePolicy ()
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from SimulationItem
 SimulationItem ()
 
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
 
virtual void setupSelfAfter ()
 
virtual void setupSelfBefore ()
 
- Protected Member Functions inherited from Item
 Item ()
 

Private Types

using BaseType = TreePolicy
 
using ItemType = SiteListTreePolicy
 

Private Attributes

int _numExtraLevels
 

Friends

class ItemRegistry
 

Detailed Description

SiteListTreePolicy represents the configurable options and the corresponding implementation mechanisms for constructing spatial tree grids based on the positions of particles, sites or cells in an imported medium distribution. The policy locates a site list offered by one of the media components in the medium system. See the ImportedMedium class and the various Snapshot subclasses for more information on the site positions returned by imported media. If multiple media offer a site list, the first one in configuration order (i.e. ski file order) is used.

In a first step the tree is subdivided in such a way that each leaf node contains at most one of the sites in the list. Subsequently each of these leaf nodes is further subdivided a fixed number of times, as configured by the user. However, the minimum and maximum tree subdvision levels (actually offered by the base class) override the other subdvision criteria described above. Tree nodes are always subdivided up to the minimum level, and nodes are never subdivided beyond the maximum level.

This item type is allowed only if the Boolean expression "SiteListInterface" evaluates to true after replacing the names by true or false depending on their presence.

This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.

Constructor & Destructor Documentation

◆ SiteListTreePolicy()

SiteListTreePolicy::SiteListTreePolicy ( )
inlineprotected

Default constructor for concrete Item subclass SiteListTreePolicy : "a tree grid construction policy using positions defined by an imported medium" .

Member Function Documentation

◆ constructTree()

vector< TreeNode * > SiteListTreePolicy::constructTree ( TreeNode root)
overridevirtual

This function constructs the hierarchical tree and all (interconnected) nodes forming the tree as described for the corresponding pure virtual function in the base class. The implementation for this class proceeds as decribed in the class header. After locating an object of a Medium subclass that offers the SiteListInterface, the tree is subdivided so that each leaf node contains at most one of the sites in the list. Subsequently each of these leaf nodes is further subdivided a fixed number of times, as indicated by the numExtraLevels attribute.

Implements TreePolicy.

◆ numExtraLevels()

SiteListTreePolicy::numExtraLevels ( ) const
inline

This function returns the value of the discoverable integer property numExtraLevels : "the number of additional subdivision levels" .

The minimum value for this property is "0" .

The maximum value for this property is "30" .

The default value for this property is given by the conditional value expression "0" .


The documentation for this class was generated from the following file: