#include <SpatialCellLibrary.hpp>
Public Member Functions | |
virtual vector< int > | mapping (const Array &bv) const =0 |
virtual int | numEntries () 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 | |
SpatialCellLibrary () | |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = SimulationItem |
using | ItemType = SpatialCellLibrary |
Friends | |
class | ItemRegistry |
SpatialCellLibrary is an abstract base class for providing spatial cell grouping schemes called libraries. A library maps a number of spatial cells to a single library entry based on some predefined scheme, such as similarities in the stored radiation field or other cell properties. This in turn allows a client to perform common (possibly approximate) calculations for all of the cells mapped to the same library entry, trading accuracy for speed. This base class offers just an interface that must be implemented in each subclass.
The SpatialCellLibrary class and its subclasses support the implementation of a library mechanism as described in Baes et al. (2011, ApJS, 196, 22). Instead of calculating the emission spectrum individually for every spatial cell in the system, a library is constructed, a template spectrum is calculated for each library entry, and these templates are used for all spatial cells mapped to the corresponding library entry. Obviously, the spectral templates in the library should be chosen/constructed in such a way that they can represent the whole range of actual spectra encountered in the simulation. In other words, the library should span the entire parameter space of interstellar radiation fields. Different subclasses of the SpatialCellLibrary class achieve this goal to different degrees of sophistication, with a better coverage of the parameter space typically at the cost of a more resource-intensive library construction.
|
inlineprotected |
Default constructor for abstract Item subclass SpatialCellLibrary : "a library scheme for grouping spatial cells" .
|
pure virtual |
This function returns a vector nv with length
The argument array bv with length
This function must be implemented by each subclass.
Implemented in AllCellsLibrary, FieldStrengthCellLibrary, and TemperatureWavelengthCellLibrary.
|
pure virtual |
This function returns the number of entries
Implemented in AllCellsLibrary, FieldStrengthCellLibrary, and TemperatureWavelengthCellLibrary.