#include <NestedDensityTreePolicy.hpp>
Public Member Functions | |
double | innerMaxX () const |
double | innerMaxY () const |
double | innerMaxZ () const |
double | innerMinX () const |
double | innerMinY () const |
double | innerMinZ () const |
DensityTreePolicy * | innerPolicy () const |
bool | needsSubdivide (TreeNode *node) override |
![]() | |
vector< TreeNode * > | constructTree (TreeNode *root) override |
double | maxDustDensityDispersion () const |
double | maxDustFraction () const |
double | maxDustOpticalDepth () const |
double | maxElectronFraction () const |
double | maxGasFraction () const |
virtual bool | needsSubdivide (TreeNode *node) |
double | wavelength () const |
Range | wavelengthRange () const override |
![]() | |
virtual vector< TreeNode * > | constructTree (TreeNode *root)=0 |
int | maxLevel () const |
int | minLevel () const |
![]() | |
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 |
![]() | |
virtual WavelengthGrid * | materialWavelengthGrid () const |
![]() | |
virtual | ~WavelengthRangeInterface () |
virtual Range | wavelengthRange () const =0 |
Protected Member Functions | |
NestedDensityTreePolicy () | |
void | setupSelfBefore () override |
![]() | |
DensityTreePolicy () | |
void | setupSelfBefore () override |
![]() | |
TreePolicy () | |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
![]() | |
MaterialWavelengthRangeInterface () | |
![]() | |
WavelengthRangeInterface () | |
Private Types | |
using | BaseType = DensityTreePolicy |
using | ItemType = NestedDensityTreePolicy |
Private Attributes | |
Box | _inner |
double | _innerMaxX |
double | _innerMaxY |
double | _innerMaxZ |
double | _innerMinX |
double | _innerMinY |
double | _innerMinZ |
DensityTreePolicy * | _innerPolicy |
Friends | |
class | ItemRegistry |
NestedDensityTreePolicy is a DensityTreePolicy policy that allows defining separate subdivision criteria in a given subregion of the spatial grid. This can be used, for example, to specify a higher resolution in a given region of interest.
The class inherits from DensityTreePolicy and uses all the inherited properties to classify the outer region. Additional innerMin/innerMax coordinate properties define the bounding box of the inner region. Finally, the additional property innerPolicy, which is also expected to be a DensityTreePolicy instance, specifies the subdivision criteria for the inner region.
If a TreeNode intersects with the inner region the node will be subdivided based on the criteria defined by the innerPolicy. This means that even TreeNodes that are almost fully outside the inner region can be subdivided by those criteria if they have a non-zero intersection with the inner region.
It is not meaningful to specify an inner region that extends outside of the spatial grid bounding box, because none of the tree nodes will intersect those outside areas. Therefore, a warning is issued if the inner region is not fully inside the spatial grid domain.
Recursive nesting
By default, the inner policy is a regular DensityTreePolicy instance. However, because NestedDensityTreePolicy inherits DensityTreePolicy, it is also possible to again select a NestedDensityTreePolicy instance as the inner policy, leading to recursive nesting. While this is not a recommended use case, it would allow specifying recursively increasing resolution in nested, successively smaller regions of the spatial domain.
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.
|
inlineprotected |
Default constructor for concrete Item subclass NestedDensityTreePolicy : "a tree grid construction policy using a nested density tree policy" .
|
inline |
This function returns the value of the discoverable double property innerMaxX : "the end point of the inner box in the X direction" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property innerMaxY : "the end point of the inner box in the Y direction" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property innerMaxZ : "the end point of the inner box in the Z direction" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property innerMinX : "the start point of the inner box in the X direction" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property innerMinY : "the start point of the inner box in the Y direction" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property innerMinZ : "the start point of the inner box in the Z direction" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable item property innerPolicy : "the density tree policy for the inner region" .
The default value for this property is given by the conditional value expression "DensityTreePolicy" .
|
overridevirtual |
This function determines whether the given node needs to be subdivided. Depending on whether the node intersects with the inner region or not, the request is passed to the needsSubdivide() function of the nested policy or to the needsSubdivide() function of our base class.
Reimplemented from DensityTreePolicy.
|
overrideprotectedvirtual |
This function checks whether the inner region is inside the outer region.
Reimplemented from DensityTreePolicy.