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

#include <AdaptiveMeshSource.hpp>

Inheritance diagram for AdaptiveMeshSource:
Inheritance graph
[legend]

Protected Member Functions

 AdaptiveMeshSource ()
 
SnapshotcreateAndOpenSnapshot () override
 
- Protected Member Functions inherited from MeshSource
 MeshSource ()
 
const Boxdomain () const
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from ImportedSource
 ImportedSource ()
 
 ~ImportedSource ()
 
virtual SnapshotcreateAndOpenSnapshot ()=0
 
void setupSelfAfter () override
 
- Protected Member Functions inherited from Source
 Source ()
 
void informAvailableWavelengthRange (Range available, string itemType)
 
Randomrandom () const
 
void setupSelfBefore () override
 
- 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 SourceWavelengthRangeInterface
 SourceWavelengthRangeInterface ()
 
- Protected Member Functions inherited from WavelengthRangeInterface
 WavelengthRangeInterface ()
 

Private Types

using BaseType = MeshSource
 
using ItemType = AdaptiveMeshSource
 

Friends

class ItemRegistry
 

Additional Inherited Members

- Public Member Functions inherited from MeshSource
double maxX () const
 
double maxY () const
 
double maxZ () const
 
double minX () const
 
double minY () const
 
double minZ () const
 
- Public Member Functions inherited from ImportedSource
int dimension () const override
 
string filename () const
 
bool hasVelocity () const override
 
bool importCurrentMass () const
 
bool importVelocity () const
 
bool importVelocityDispersion () const
 
void launch (PhotonPacket *pp, size_t historyIndex, double L) const override
 
double luminosity () const override
 
double meanSpecificLuminosity (const Band *band, int m) const
 
double meanSpecificLuminosity (Range wavelengthRange, int m) const
 
void prepareForLaunch (double sourceBias, size_t firstIndex, size_t numIndices) override
 
SEDFamilysedFamily () const
 
const Snapshotsnapshot () const
 
double specificLuminosity (double wavelength) const override
 
double specificLuminosity (double wavelength, int m) const
 
string useColumns () const
 
Range wavelengthRange () const override
 
- Public Member Functions inherited from Source
virtual int dimension () const =0
 
virtual bool hasVelocity () const =0
 
virtual void launch (PhotonPacket *pp, size_t historyIndex, double L) const =0
 
virtual double luminosity () const =0
 
virtual void prepareForLaunch (double sourceBias, size_t firstIndex, size_t numIndices)
 
double sourceWeight () const
 
virtual double specificLuminosity (double wavelength) const =0
 
double wavelengthBias () const
 
WavelengthDistributionwavelengthBiasDistribution () 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
 
- Public Member Functions inherited from WavelengthRangeInterface
virtual ~WavelengthRangeInterface ()
 
virtual Range wavelengthRange () const =0
 

Detailed Description

An AdaptiveMeshSource instance represents a primary radiation source with a spatial and spectral luminosity distribution described by an Adaptive Mesh Refinement (AMR) grid partitioning a cuboidal domain. The data is usually extracted from a cosmological simulation snapshot, and it must be provided in a column text file formatted as described below.

Refer to the description of the AdaptiveMeshSnapshot class for information on the structure of an adaptive mesh and on how to represent it in text column file format. Refer to the description of the TextInFile class for information on overall formatting and on how to include header lines specifying the units for each column in the input file. In case the input file has no unit specifications, the default units mentioned below are used instead. The number of columns expected in the input file depends on the options configured by the user for this AdaptiveMeshSource instance, including the selected SEDFamily.

\[ [ v_x\,(\mathrm{km/s}) \quad v_y\,(\mathrm{km/s}) \quad v_z\,(\mathrm{km/s}) \quad [ \sigma_v\,(\mathrm{km/s}) ] ] \quad [M_\mathrm{curr}\,(\mathrm{M}_\odot)] \quad \dots \text{SED family parameters}\dots \]

If the importVelocity option is enabled, the first three columns specify the \(v_x\), \(v_y\), \(v_z\) bulk velocity components of the source population represented by the cell. If additionally the importVelocityDispersion option is enabled, the next column specifies the velocity dispersion \(\sigma_v\), adjusting the velocity for each photon packet launch with a random offset sampled from a spherically symmetric Gaussian distribution.

The remaining columns specify the parameters required by the configured SED family to select and scale the appropriate SED. For example for the Bruzual-Charlot SED family, the remaining columns provide the initial mass, the metallicity, and the age of the stellar population represented by the cell corresponding to the site. Refer to the documentation of the configured type of SEDFamily for information about the expected parameters and their default units.

Constructor & Destructor Documentation

◆ AdaptiveMeshSource()

AdaptiveMeshSource::AdaptiveMeshSource ( )
inlineprotected

Default constructor for concrete Item subclass AdaptiveMeshSource : "a primary source imported from data represented on an adaptive mesh (AMR grid)" .

Member Function Documentation

◆ createAndOpenSnapshot()

Snapshot * AdaptiveMeshSource::createAndOpenSnapshot ( )
overrideprotectedvirtual

This function constructs a new AdaptiveMeshSnapshot object, calls its open() function, passes it the domain extent configured by the user (using properties offered by the MeshSource base class), and returns a pointer to the object. Ownership of the Snapshot object is transferred to the caller.

Implements ImportedSource.


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