#include <ImportedGeometry.hpp>
Public Member Functions | |
double | density (Position bfr) const override |
string | filename () const |
Position | generatePosition () const override |
bool | importMetallicity () const |
bool | importTemperature () const |
double | maxTemperature () const |
int | numSites () const override |
double | SigmaX () const override |
double | SigmaY () const override |
double | SigmaZ () const override |
Position | sitePosition (int index) const override |
string | useColumns () 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 |
![]() | |
virtual | ~SiteListInterface () |
virtual int | numSites () const =0 |
virtual Position | sitePosition (int index) const =0 |
Protected Member Functions | |
ImportedGeometry () | |
~ImportedGeometry () | |
virtual Snapshot * | createAndOpenSnapshot ()=0 |
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 () | |
![]() | |
SiteListInterface () | |
Private Types | |
using | BaseType = GenGeometry |
using | ItemType = ImportedGeometry |
Private Attributes | |
string | _filename |
bool | _importMetallicity |
bool | _importTemperature |
double | _maxTemperature |
double | _norm |
Snapshot * | _snapshot |
string | _useColumns |
Friends | |
class | ItemRegistry |
ImportedGeometry is an abstract class for describing 3D geometries with a spatial density distribution imported from an input file. The input data is usually derived from a hydrodynamical simulation snapshot. Various types of snapshots are supported by subclasses of this class. Refer to the subclass documentation for information on the file format.
When an item of this type is used, the names provided by the conditional value expression "SiteListInterface" are inserted into the name sets used for evaluating Boolean expressions.
Properties of sub-types of this type are listed in user interfaces somewhere in between the properties of this type.
|
inlineprotected |
Default constructor for abstract Item subclass ImportedGeometry : "a geometry imported from snapshot data" .
|
protected |
The destructor deletes the snapshot object, if present.
|
protectedpure virtual |
This function constructs a new Snapshot object of the type appropriate for the subclass, calls its open() function, configures the mass or density column, and returns a pointer to the object. Ownership of the Snapshot object is transferred to the caller.
Implemented in AdaptiveMeshGeometry, CellGeometry, CylindricalCellGeometry, ParticleGeometry, SphericalCellGeometry, and VoronoiMeshGeometry.
|
overridevirtual |
This function returns the density for this geometry at the given position. It simply calls the corresponding function in the snapshot object.
Implements Geometry.
|
inline |
This function returns the value of the discoverable string property filename : "the name of the file to be imported" .
|
overridevirtual |
This function generates a random position from the geometry's spatial density distribution. It simply calls the corresponding function in the snapshot object.
Implements Geometry.
|
inline |
This function returns the value of the discoverable Boolean property importMetallicity : "import a metallicity column" .
The default value for this property is given by the conditional value expression "false" .
|
inline |
This function returns the value of the discoverable Boolean property importTemperature : "import a temperature column" .
The default value for this property is given by the conditional value expression "false" .
|
inline |
This function returns the value of the discoverable double property maxTemperature : "the maximum temperature for included mass (or zero to include all)" .
This property represents a physical quantity of type "temperature" .
The minimum value for this property is "[0 K" .
The maximum value for this property is "1000000 K]" .
The default value for this property is given by the conditional value expression "0 K" .
This property is relevant only if the Boolean expression "importTemperature" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function returns the number of entities (particles or cells) used for defining the density distribution represented by the snapshot. The function is part of the SiteListInterface. It simply calls the corresponding function in the snapshot object.
Implements SiteListInterface.
|
overrideprotectedvirtual |
This function imports the snapshot data from the input file through a Snapshot object of the appropriate type. Specifically, it first calls the createSnapshot() function, which must be implemented in a subclass, to construct and open a Snapshot object of the appropriate type. It then passes the user-configurable options of this class to the Snapshot object and tells it to import the data.
Reimplemented from SimulationItem.
|
overridevirtual |
This function returns the X-axis surface density of the geometry, defined as the integration of the density along the entire X-axis. It simply calls the corresponding function in the snapshot object.
Implements Geometry.
|
overridevirtual |
This function returns the Y-axis surface density of the geometry, defined as the integration of the density along the entire Y-axis. It simply calls the corresponding function in the snapshot object.
Implements Geometry.
|
overridevirtual |
This function returns the Z-axis surface density of the geometry, defined as the integration of the density along the entire Z-axis. It simply calls the corresponding function in the snapshot object.
Implements Geometry.
|
overridevirtual |
This function returns the coordinates of the entity (particle or cell) with the specified zero-based index. If the index is out of range, the behavior is undefined. The function is part of the SiteListInterface. It simply calls the corresponding function in the snapshot object.
Implements SiteListInterface.
|
inline |
This function returns the value of the discoverable string property useColumns : "a list of names corresponding to columns in the file to be imported" .
The default value for this property is given by the conditional value expression "" .
This property is required only if the Boolean expression "false" evaluates to true after replacing the names by true or false depending on their presence.
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.