The SKIRT project
advanced radiative transfer for astrophysics
XRayIonicGasMixFamily Class Reference

#include <XRayIonicGasMixFamily.hpp>

Inheritance diagram for XRayIonicGasMixFamily:

Public Types

enum class  ElectronScattering : int { None , Free , FreeWithPolarization , FreeBound }

Public Member Functions

 ~XRayIonicGasMixFamily () override
ElectronScattering electronScattering () const
string ions () const
const MaterialMixmix () override
const MaterialMixmix (double Z, double T, const Array &parameters) override
vector< SnapshotParameterparameterInfo () const override
bool resonantScattering () const
void setupSelfBefore () override
Public Member Functions inherited from SimulationItem
template<class T>
T * find (bool setup=true) const
template<class T>
T * interface (int upLevels, int downLevels, bool setup) 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

 XRayIonicGasMixFamily ()
Protected Member Functions inherited from MaterialMixFamily
 MaterialMixFamily ()
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfAfter ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

XRayIonicGasMix::ElectronScattering _boundElectrons
ElectronScattering _electronScattering
vector< string_ionNames
string _ions
vector< XRayIonicGasMix * > _mixes
bool _resonantScattering

Friends

class ItemRegistry

Detailed Description

The XRayIonicGasMixFamily class represents a family of XRayIonicGasMix instances, one for each spatial cell. This way the ion abundances and the temperature can vary across cells. The family defines a few properties that are shared by all mixes across all cells: ions, electronScattering, and resonantScattering. These properties can be found in the XRayIonicGasMix class.

The ions property defines which ions must be imported. An ion can still have zero abundance in a given cell. As described in the XRayIonicGasMix class, that ion is then simply left out of the mix constructed for that cell.

This family will also reuse mixes for cells with duplicate import parameters (ion abundances and temperature).

Because it retains a separate XRayIonicGasMix instance (with its own precalculated cross section tables) for every distinct combination of import parameters, this MaterialMixFamily can use a large amount of memory when the imported model has many spatial cells with distinct abundances or temperatures.

Member Enumeration Documentation

◆ ElectronScattering

None : "ignore electrons".

Free : "use free-electron Compton scattering for all electrons".

FreeWithPolarization : "use free-electron Compton scattering with support for polarization".

FreeBound : "use an interpolation of free- and bound-electron Compton scattering".

Constructor & Destructor Documentation

◆ XRayIonicGasMixFamily()

XRayIonicGasMixFamily::XRayIonicGasMixFamily ( )
inlineprotected

Default constructor for concrete Item subclass XRayIonicGasMixFamily: "a family of ionic mixes for each cell".

◆ ~XRayIonicGasMixFamily()

XRayIonicGasMixFamily::~XRayIonicGasMixFamily ( )
override

The destructor destructs all the XRayIonicGasMix instances that have been created.

Member Function Documentation

◆ electronScattering()

ElectronScattering XRayIonicGasMixFamily::electronScattering ( ) const
inline

This function returns the value of the discoverable ElectronScattering enumeration property electronScattering: "implementation of scattering by electrons".

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

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.

◆ ions()

string XRayIonicGasMixFamily::ions ( ) const
inline

This function returns the value of the discoverable string property ions: "the names of the ions for each element (e.g. H,He+,Li+1,..)".

◆ mix() [1/2]

const MaterialMix * XRayIonicGasMixFamily::mix ( )
overridevirtual

This function returns (a pointer to) the default XRayIonicGasMix, corresponding to the parameters all set to zero.

Implements MaterialMixFamily.

◆ mix() [2/2]

const MaterialMix * XRayIonicGasMixFamily::mix ( double Z,
double T,
const Array & parameters )
overridevirtual

This function returns (a pointer to) the XRayIonicGasMix corresponding to the given parameter values. The material mix family retains ownership of the returned material mix, and guarantees that it will not be destroyed until the family itself is destroyed.

The number and type of parameters must match the information returned by the parameterInfo() function; if not the behavior is undefined.

Implements MaterialMixFamily.

◆ parameterInfo()

vector< SnapshotParameter > XRayIonicGasMixFamily::parameterInfo ( ) const
overridevirtual

This function returns the number and type of parameters used by family. For this class, this is all the relative abundances for the user-specified ions.

Implements MaterialMixFamily.

◆ resonantScattering()

bool XRayIonicGasMixFamily::resonantScattering ( ) const
inline

This function returns the value of the discoverable Boolean property resonantScattering: "enable resonant line scattering for hydrogen- and helium-like ions".

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.

This property is relevant only if the Boolean expression "Lya" evaluates to true after replacing the names by true or false depending on their presence.

◆ setupSelfBefore()

void XRayIonicGasMixFamily::setupSelfBefore ( )
overridevirtual

This function parses the user-configured ions, converts the electronScattering property, and adds a default mix.

Reimplemented from SimulationItem.


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