The SKIRT project
advanced radiative transfer for astrophysics
MaterialState Class Reference

#include <MaterialState.hpp>

Public Member Functions

 MaterialState (const MediumState &ms, int m, int h)
Vec bulkVelocity () const
int cellIndex () const
double custom (int i) const
Vec magneticField () const
int mediumIndex () const
double metallicity () const
double numberDensity () const
void setCustom (int i, double value)
void setMetallicity (double value)
void setNumberDensity (double value)
void setTemperature (double value)
double temperature () const
double volume () const

Private Attributes

int _h
int _m
MediumState_ms

Detailed Description

An instance of the MaterialState class provides access to the medium state for a particular spatial cell and medium component, as determined during construction. This includes the common state variables for the cell as well as the specific state variables for the medium component.

Constructor & Destructor Documentation

◆ MaterialState()

MaterialState::MaterialState ( const MediumState & ms,
int m,
int h )
inline

The constructor arguments specify the spatial cell and medium component to be represented, as well as a reference to the medium state object that holds the actual data. The constant reference is cast internally to a writable reference. This is ugly, but it avoids providing two versions of this class (read-only and writable).

Member Function Documentation

◆ bulkVelocity()

Vec MaterialState::bulkVelocity ( ) const
inline

This function returns the aggregate bulk velocity \({\boldsymbol{v}}\) of the medium in the spatial cell.

◆ cellIndex()

int MaterialState::cellIndex ( ) const
inline

This function returns the index \(m\) of the spatial cell being represented.

◆ custom()

double MaterialState::custom ( int i) const
inline

This function returns the custom state variable with index \(i\) of the medium component in the spatial cell.

◆ magneticField()

Vec MaterialState::magneticField ( ) const
inline

This function returns the magnetic field \({\boldsymbol{B}}\) in the spatial cell.

◆ mediumIndex()

int MaterialState::mediumIndex ( ) const
inline

This function returns the index \(h\) of the medium component being represented.

◆ metallicity()

double MaterialState::metallicity ( ) const
inline

This function returns the metallicity \(Z\) of the medium component in the spatial cell.

◆ numberDensity()

double MaterialState::numberDensity ( ) const
inline

This function returns the number density \(n\) of the medium component in the spatial cell.

◆ setCustom()

void MaterialState::setCustom ( int i,
double value )
inline

This function sets the custom state variable with index \(i\) of the medium component in the spatial cell.

◆ setMetallicity()

void MaterialState::setMetallicity ( double value)
inline

This function sets the metallicity \(Z\) of the medium component in the spatial cell.

◆ setNumberDensity()

void MaterialState::setNumberDensity ( double value)
inline

This function sets the number density \(n\) of the medium component in the spatial cell.

◆ setTemperature()

void MaterialState::setTemperature ( double value)
inline

This function sets the temperature \(T\) of the medium component in the spatial cell.

◆ temperature()

double MaterialState::temperature ( ) const
inline

This function returns the temperature \(T\) of the medium component in the spatial cell.

◆ volume()

double MaterialState::volume ( ) const
inline

This function returns the volume \(V\) of the spatial cell.


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