The SKIRT project
advanced radiative transfer for astrophysics
GeometricMedium Class Reference

#include <GeometricMedium.hpp>

Inheritance diagram for GeometricMedium:

Public Member Functions

Geometrygeometry () const
VectorFieldmagneticFieldDistribution () const
double magneticFieldStrength () const
MaterialMixmaterialMix () const
MaterialNormalizationnormalization () const
VectorFieldvelocityDistribution () const
double velocityMagnitude () const
Public Member Functions inherited from SimulationItem
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
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

 GeometricMedium ()
Vec bulkVelocity (Position bfr) const override
int dimension () const override
Position generatePosition () const override
bool hasMagneticField () const override
bool hasMetallicity () const override
bool hasParameters () const override
bool hasTemperature () const override
bool hasVariableMix () const override
bool hasVelocity () const override
Vec magneticField (Position bfr) const override
double mass () const override
double massDensity (Position bfr) const override
double metallicity (Position bfr) const override
const MaterialMixmix () const override
const MaterialMixmix (Position bfr) const override
double number () const override
double numberDensity (Position bfr) const override
double opticalDepthX (double lambda) const override
double opticalDepthY (double lambda) const override
double opticalDepthZ (double lambda) const override
void parameters (Position bfr, Array &params) const override
void setupSelfAfter () override
double temperature (Position bfr) const override
Protected Member Functions inherited from Medium
 Medium ()
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfBefore ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

Geometry_geometry
VectorField_magneticFieldDistribution
double _magneticFieldStrength
double _mass
MaterialMix_materialMix
MaterialNormalization_normalization
double _number
VectorField_velocityDistribution
double _velocityMagnitude

Friends

class ItemRegistry

Detailed Description

GeometricMedium represents a transfer medium for which the spatial material density distribution is characterized by a Geometry object. The material properties are characterized by a single MaterialMix object and are thus identical in all locations. The medium can have a single bulk velocity, i.e. the bulk velocity is identical in all locations.

Constructor & Destructor Documentation

◆ GeometricMedium()

GeometricMedium::GeometricMedium ( )
inlineprotected

Default constructor for concrete Item subclass GeometricMedium: "a transfer medium with a built-in geometry".

Member Function Documentation

◆ bulkVelocity()

Vec GeometricMedium::bulkVelocity ( Position bfr) const
overrideprotectedvirtual

This function returns the bulk velocity of the medium. The same velocity is returned regardless of position.

Implements Medium.

◆ dimension()

int GeometricMedium::dimension ( ) const
overrideprotectedvirtual

This function returns the dimension of the medium, which is determined by the symmetries of the spatial distribution of its density, bulk velocity (if any) and magnetic field (if any).

Implements Medium.

◆ generatePosition()

Position GeometricMedium::generatePosition ( ) const
overrideprotectedvirtual

This function generates a random position sampled from the medium's spatial density distribution. Because the conversion from number to mass is the same throughout the medium's spatial domain, there is no difference between sampling from the number density or the mass density.

Implements Medium.

◆ geometry()

Geometry * GeometricMedium::geometry ( ) const
inline

This function returns the value of the discoverable item property geometry: "the geometry of the spatial density distribution for the medium".

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

◆ hasMagneticField()

bool GeometricMedium::hasMagneticField ( ) const
overrideprotectedvirtual

This function returns true if the medium has a nonempty magneticFieldDistribution and a nonzero magneticFieldStrength.

Implements Medium.

◆ hasMetallicity()

bool GeometricMedium::hasMetallicity ( ) const
overrideprotectedvirtual

This function returns false because geometric media do not define a metallicity.

Implements Medium.

◆ hasParameters()

bool GeometricMedium::hasParameters ( ) const
overrideprotectedvirtual

This function returns false because geometric media do not define custom parameters.

Implements Medium.

◆ hasTemperature()

bool GeometricMedium::hasTemperature ( ) const
overrideprotectedvirtual

This function returns false because geometric media do not define a temperature.

Implements Medium.

◆ hasVariableMix()

bool GeometricMedium::hasVariableMix ( ) const
overrideprotectedvirtual

This function always returns false because a geometric medium has the same dust mix throughout its spatial domain.

Implements Medium.

◆ hasVelocity()

bool GeometricMedium::hasVelocity ( ) const
overrideprotectedvirtual

This function returns true if the bulk velocity of the medium is nonzero.

Implements Medium.

◆ magneticField()

Vec GeometricMedium::magneticField ( Position bfr) const
overrideprotectedvirtual

This function returns the magnetic field vector of the medium at the specified position. If hasMagneticField() returns true, this function returns the product of the configured magnetic field strength and the vector retrieved from the configured normalized vector field for the given position; otherwise it returns a zero magnetic field.

Implements Medium.

◆ magneticFieldDistribution()

VectorField * GeometricMedium::magneticFieldDistribution ( ) const
inline

This function returns the value of the discoverable item property magneticFieldDistribution: "the spatial distribution of the magnetic field, if any".

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.

◆ magneticFieldStrength()

double GeometricMedium::magneticFieldStrength ( ) const
inline

This function returns the value of the discoverable double property magneticFieldStrength: "the strength of the magnetic field (multiplier)".

This property represents a physical quantity of type "magneticfield".

The minimum value for this property is "[-1 T".

The maximum value for this property is "1 T]".

This property is relevant only if the Boolean expression "magneticFieldDistribution" 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.

When a value is entered for this property, the names provided by the conditional value expression "magneticFieldDistribution&magneticFieldStrength:MagneticField" are inserted into the name sets used for evaluating Boolean expressions.

◆ mass()

double GeometricMedium::mass ( ) const
overrideprotectedvirtual

This function returns the total mass in the medium.

Implements Medium.

◆ massDensity()

double GeometricMedium::massDensity ( Position bfr) const
overrideprotectedvirtual

This function returns the mass density of the medium at the specified position.

Implements Medium.

◆ materialMix()

MaterialMix * GeometricMedium::materialMix ( ) const
inline

This function returns the value of the discoverable item property materialMix: "the material type and properties throughout the medium".

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

◆ metallicity()

double GeometricMedium::metallicity ( Position bfr) const
overrideprotectedvirtual

This function always returns zero because geometric media do not define a metallicity

Implements Medium.

◆ mix() [1/2]

const MaterialMix * GeometricMedium::mix ( ) const
overrideprotectedvirtual

This function returns the MaterialMix object defining the material properties for the medium.

Implements Medium.

◆ mix() [2/2]

const MaterialMix * GeometricMedium::mix ( Position bfr) const
overrideprotectedvirtual

This function returns the MaterialMix object defining the material properties for the medium. The same object is returned regardless of position.

Implements Medium.

◆ normalization()

MaterialNormalization * GeometricMedium::normalization ( ) const
inline

This function returns the value of the discoverable item property normalization: "the type of normalization for the amount of material".

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

◆ number()

double GeometricMedium::number ( ) const
overrideprotectedvirtual

This function returns the total number of material entities in the medium.

Implements Medium.

◆ numberDensity()

double GeometricMedium::numberDensity ( Position bfr) const
overrideprotectedvirtual

This function returns the number density of the medium at the specified position.

Implements Medium.

◆ opticalDepthX()

double GeometricMedium::opticalDepthX ( double lambda) const
overrideprotectedvirtual

This function returns the optical depth of the medium at wavelength \(\lambda\) along the full X axis of the model coordinate system.

Implements Medium.

◆ opticalDepthY()

double GeometricMedium::opticalDepthY ( double lambda) const
overrideprotectedvirtual

This function returns the optical depth of the medium at wavelength \(\lambda\) along the full Y axis of the model coordinate system.

Implements Medium.

◆ opticalDepthZ()

double GeometricMedium::opticalDepthZ ( double lambda) const
overrideprotectedvirtual

This function returns the optical depth of the medium at wavelength \(\lambda\) along the full Z axis of the model coordinate system.

Implements Medium.

◆ parameters()

void GeometricMedium::parameters ( Position bfr,
Array & params ) const
overrideprotectedvirtual

This function resizes the specified array to zero length because a geometric medium does not provide custom input model parameters.

Implements Medium.

◆ setupSelfAfter()

void GeometricMedium::setupSelfAfter ( )
overrideprotectedvirtual

This function determines the normalization for number and mass density in this medium. Given that a geometry has a total mass of one by definition, the normalization factors correspond to the total number and the total mass of the medium.

Reimplemented from SimulationItem.

◆ temperature()

double GeometricMedium::temperature ( Position bfr) const
overrideprotectedvirtual

This function always returns zero because geometric media do not define a temperature.

Implements Medium.

◆ velocityDistribution()

VectorField * GeometricMedium::velocityDistribution ( ) const
inline

This function returns the value of the discoverable item property velocityDistribution: "the spatial distribution of the velocity, if any".

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 relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.

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.

◆ velocityMagnitude()

double GeometricMedium::velocityMagnitude ( ) const
inline

This function returns the value of the discoverable double property velocityMagnitude: "the magnitude of the velocity (multiplier)".

This property represents a physical quantity of type "velocity".

The minimum value for this property is "[-100000 km/s".

The maximum value for this property is "100000 km/s]".

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

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.

When a value is entered for this property, the names provided by the conditional value expression "velocityDistribution&velocityMagnitude:MediumVelocity" are inserted into the name sets used for evaluating Boolean expressions.


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