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

#include <SnapshotParameter.hpp>

Public Types

enum class  Identifier {
  InitialMass , CurrentMass , Metallicity , Age ,
  Temperature , Custom
}
 

Public Member Functions

const string & defaultUnit () const
 
const string & description () const
 
Identifier identifier () const
 
const string & quantity () const
 

Static Public Member Functions

static SnapshotParameter age ()
 
static SnapshotParameter currentMass ()
 
static SnapshotParameter custom (string description, string quantity=string(), string defaultUnit=string())
 
static SnapshotParameter initialMass ()
 
static SnapshotParameter metallicity ()
 
static SnapshotParameter temperature ()
 

Private Member Functions

 SnapshotParameter (Identifier identifier, string description, string quantity, string defaultUnit)
 

Private Attributes

string _defaultUnit
 
string _description
 
Identifier _identifier
 
string _quantity
 

Detailed Description

SnapshotParameter is a helper class for holding metadata about a configurable parameter to be imported from a snapshot text column file. For example, an SEDFamily object would return a list of SnapshotParameter objects to define the parameters needed to select a particular SED template from the family. Similarly, a MaterialMix object can request parameters to be imported from a snapshot.

The SnapshotParameter class offers specific support for a number of frequently-used snapshot parameters, so that these can be discovered and, for example, used for probing. Examples include metallicity and age. Use one of the factory functions to construct a SnapshotParameter instance.

Member Enumeration Documentation

◆ Identifier

enum class SnapshotParameter::Identifier
strong

This enumeration lists the identifiers for the supported snapshot parameter types.

Constructor & Destructor Documentation

◆ SnapshotParameter()

SnapshotParameter::SnapshotParameter ( Identifier  identifier,
string  description,
string  quantity,
string  defaultUnit 
)
private

This constructor initializes a snapshot parameter object with the given information for each field. The constructor is private; use one of the factory functions instead.

Member Function Documentation

◆ age()

static SnapshotParameter SnapshotParameter::age ( )
static

This function returns a SnapshotParameter instance of type Age with default units of year.

◆ currentMass()

static SnapshotParameter SnapshotParameter::currentMass ( )
static

This function returns a SnapshotParameter instance of type CurrentMass with default units of solar mass.

◆ custom()

static SnapshotParameter SnapshotParameter::custom ( string  description,
string  quantity = string(),
string  defaultUnit = string() 
)
static

This function returns a custom SnapshotParameter instance. The description argument is used only for logging purposes. The quantity argument specifies the physical quantity represented by the parameter. It must match one of the quantity strings supported by the Units system, or one of the special quantity strings recognized by the TextInFile::addColumn() function. The defaultUnit argument specifies the default unit string, which is used in case the input file does not contain unit information for the parameter.

◆ defaultUnit()

const string & SnapshotParameter::defaultUnit ( ) const
inline

This function returns the default units to be used for the snapshot parameter in case the input file does not contain unit information for it.

◆ description()

const string & SnapshotParameter::description ( ) const
inline

This function returns the description of the snapshot parameter.

◆ identifier()

Identifier SnapshotParameter::identifier ( ) const
inline

This function returns the identifier for the snapshot parameter. All custom snapshot parameters have the same identifier; there is no formal way to tell them apart.

◆ initialMass()

static SnapshotParameter SnapshotParameter::initialMass ( )
static

This function returns a SnapshotParameter instance of type InitialMass with default units of solar mass.

◆ metallicity()

static SnapshotParameter SnapshotParameter::metallicity ( )
static

This function returns a SnapshotParameter instance of type Metallicity.

◆ quantity()

const string & SnapshotParameter::quantity ( ) const
inline

This function returns the string defining the physical quantity represented by the snapshot parameter.

◆ temperature()

static SnapshotParameter SnapshotParameter::temperature ( )
static

This function returns a SnapshotParameter instance of type Temperature with default units of Kelvin.


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