The SKIRT project
advanced radiative transfer for astrophysics
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
MeshMedium Class Reference

#include <MeshMedium.hpp>

Inheritance diagram for MeshMedium:
Inheritance graph
[legend]

Public Types

enum class  MassType : int {
  MassDensity , Mass , MassDensityAndMass , NumberDensity ,
  Number , NumberDensityAndNumber
}
 

Public Member Functions

MassType massType () const
 
double maxX () const
 
double maxY () const
 
double maxZ () const
 
double minX () const
 
double minY () const
 
double minZ () const
 
- Public Member Functions inherited from ImportedMedium
Vec bulkVelocity (Position bfr) const override
 
int dimension () const override
 
string filename () const
 
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
 
bool importMagneticField () const
 
bool importMetallicity () const
 
bool importTemperature () const
 
bool importVariableMixParams () const
 
bool importVelocity () const
 
Vec magneticField (Position bfr) const override
 
double mass () const override
 
double massDensity (Position bfr) const override
 
double massFraction () const
 
MaterialMixmaterialMix () const
 
MaterialMixFamilymaterialMixFamily () const
 
double maxTemperature () const
 
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
 
int numSites () 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
 
Position sitePosition (int index) const override
 
const Snapshotsnapshot () const
 
double temperature (Position bfr) const override
 
string useColumns () const
 
virtual Vec bulkVelocity (Position bfr) const =0
 
virtual int dimension () const =0
 
virtual Position generatePosition () const =0
 
virtual bool hasMagneticField () const =0
 
virtual bool hasMetallicity () const =0
 
virtual bool hasParameters () const =0
 
virtual bool hasTemperature () const =0
 
virtual bool hasVariableMix () const =0
 
virtual bool hasVelocity () const =0
 
virtual Vec magneticField (Position bfr) const =0
 
virtual double mass () const =0
 
virtual double massDensity (Position bfr) const =0
 
virtual double metallicity (Position bfr) const =0
 
virtual const MaterialMixmix () const =0
 
virtual const MaterialMixmix (Position bfr) const =0
 
virtual double number () const =0
 
virtual double numberDensity (Position bfr) const =0
 
virtual double opticalDepthX (double lambda) const =0
 
virtual double opticalDepthY (double lambda) const =0
 
virtual double opticalDepthZ (double lambda) const =0
 
virtual void parameters (Position bfr, Array &params) const =0
 
virtual double temperature (Position bfr) const =0
 
- 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
 
- Public Member Functions inherited from SiteListInterface
virtual ~SiteListInterface ()
 
virtual int numSites () const =0
 
virtual Position sitePosition (int index) const =0
 

Protected Member Functions

 MeshMedium ()
 
const Boxdomain () const
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from ImportedMedium
 ImportedMedium ()
 
 ~ImportedMedium ()
 
virtual SnapshotcreateAndOpenSnapshot ()=0
 
void setupSelfAfter () 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 setupSelfAfter ()
 
virtual void setupSelfBefore ()
 
- Protected Member Functions inherited from Item
 Item ()
 
- Protected Member Functions inherited from SiteListInterface
 SiteListInterface ()
 

Private Types

using BaseType = ImportedMedium
 
using ItemType = MeshMedium
 

Private Attributes

Box _domain
 
MassType _massType
 
double _maxX
 
double _maxY
 
double _maxZ
 
double _minX
 
double _minY
 
double _minZ
 

Friends

class ItemRegistry
 

Detailed Description

MeshMedium is an abstract class for representing a transfer medium with a spatial density distribution that is discretized on some structured or unstructured tessellation of a cuboidal spatial domain. The class derives from the ImportedMedium class, and its main (or only) function is to allow the user to configure the extent of the cuboidal domain of the tessellation, and to indicate the type of mass quantity to be imported for each cell. Subclasses need to define the actual tessellation being used, and deal with the other requirements set by the ImportedMedium class.

Member Enumeration Documentation

◆ MassType

enum class MeshMedium::MassType : int
strong

The enumeration type indicating the type of mass quantity to be imported. The choices specifying two columns (either both mass density and mass or both number density and number) are intended for use in special cases where the volume of each imported entity cannot be easily derived otherwise. In the current implementation, this is used only by the VoronoiMeshMedium to avoid constructing a full Voronoi tessellation in certain cases.

MassDensity : "mass density" .

Mass : "mass (volume-integrated)" .

MassDensityAndMass : "both mass density and volume-integrated mass" .

NumberDensity : "number density" .

Number : "number (volume-integrated)" .

NumberDensityAndNumber : "both number density and volume-integrated number" .

Constructor & Destructor Documentation

◆ MeshMedium()

MeshMedium::MeshMedium ( )
inlineprotected

Default constructor for abstract Item subclass MeshMedium : "a geometry imported from mesh-based data" .

Member Function Documentation

◆ domain()

const Box & MeshMedium::domain ( ) const
inlineprotected

This function returns the tessellation domain configured for this geometry.

◆ massType()

MeshMedium::massType ( ) const
inline

This function returns the value of the discoverable MassType enumeration property massType : "the type of mass quantity to be imported" .

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

◆ maxX()

MeshMedium::maxX ( ) const
inline

This function returns the value of the discoverable double property maxX : "the end point of the domain in the X direction" .

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

◆ maxY()

MeshMedium::maxY ( ) const
inline

This function returns the value of the discoverable double property maxY : "the end point of the domain in the Y direction" .

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

◆ maxZ()

MeshMedium::maxZ ( ) const
inline

This function returns the value of the discoverable double property maxZ : "the end point of the domain in the Z direction" .

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

◆ minX()

MeshMedium::minX ( ) const
inline

This function returns the value of the discoverable double property minX : "the start point of the domain in the X direction" .

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

◆ minY()

MeshMedium::minY ( ) const
inline

This function returns the value of the discoverable double property minY : "the start point of the domain in the Y direction" .

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

◆ minZ()

MeshMedium::minZ ( ) const
inline

This function returns the value of the discoverable double property minZ : "the start point of the domain in the Z direction" .

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

◆ setupSelfBefore()

void MeshMedium::setupSelfBefore ( )
overrideprotectedvirtual

This function verifies that the configured domain has a positive volume.

Reimplemented from SimulationItem.


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