The SKIRT project
advanced radiative transfer for astrophysics
ConfigurationSetup Class Reference

#include <ConfigurationSetup.hpp>

Inheritance diagram for ConfigurationSetup:

Public Member Functions

 ConfigurationSetup (SimulationItem *parent)
Range simulationWavelengthRange () const override
vector< double > simulationWavelengths () const override
Public Member Functions inherited from Configuration
 Configuration (SimulationItem *parent)
double angularDiameterDistance () const
SpatialCellLibrarycellLibrary () const
double dustEmissionSourceWeight () const
double dustEmissionWavelengthBias () const
WavelengthDistributiondustEmissionWavelengthBiasDistribution () const
DisjointWavelengthGriddustEmissionWLG () const
bool emulationMode () const
bool explicitAbsorption () const
bool forceScattering () const
int gridDimension () const
bool hasConstantPerceivedWavelength () const
bool hasDustEmission () const
bool hasDynamicState () const
bool hasDynamicStateRecipes () const
bool hasGasEmission () const
bool hasMagneticField () const
bool hasMedium () const
bool hasMergedIterations () const
bool hasMovingMedia () const
bool hasMultipleConstantSectionMedia () const
bool hasNegativeExtinction () const
bool hasPanRadiationField () const
bool hasPolarization () const
bool hasPrimaryDynamicState () const
bool hasPrimaryDynamicStateMedia () const
bool hasPrimaryIterations () const
bool hasRadiationField () const
bool hasSecondaryDynamicState () const
bool hasSecondaryDynamicStateMedia () const
bool hasSecondaryEmission () const
bool hasSecondaryIterations () const
bool hasSecondaryRadiationField () const
bool hasSingleConstantSectionMedium () const
bool hasSpheroidalPolarization () const
bool hasStochasticDustEmission () const
bool hasVariableMedia () const
double hubbleExpansionRate () const
bool includeHeatingByCMB () const
double luminosityDistance () const
LyaAccelerationScheme lyaAccelerationScheme () const
double lyaAccelerationStrength () const
int magneticFieldMediumIndex () const
double maxFractionOfPrevious () const
double maxFractionOfPrimary () const
int maxPrimaryIterations () const
int maxSecondaryIterations () const
int mediaDimension () const
bool mediaNeedGeneratePosition () const
int minPrimaryIterations () const
int minScattEvents () const
int minSecondaryIterations () const
double minWeightReduction () const
int modelDimension () const
bool needIndividualPeelOff () const
int numDensitySamples () const
double numPrimaryIterationPackets () const
double numPrimaryPackets () const
int numPropertySamples () const
double numSecondaryIterationPackets () const
double numSecondaryPackets () const
bool oligochromatic () const
WavelengthDistributionoligoWavelengthBiasDistribution ()
double pathLengthBias () const
double primaryIterationInitialPacketsFraction () const
double primaryIterationPacketsRamp () const
DisjointWavelengthGridradiationFieldWLG () const
double redshift () const
bool scatteringEmulatesSecondaryEmission () const
double secondarySourceBias () const
double secondarySpatialBias () const
void setEmulationMode ()
bool snapshotsNeedGetEntities () const
int sourceDimension () const
Range sourceWavelengthRange () const
bool storeEmissionRadiationField () const
WavelengthGridwavelengthGrid (WavelengthGrid *localWavelengthGrid) const
Public Member Functions inherited from SimulationItem
template<class T>
T * find (bool setup=true) const
template<class T>
T * interface (int upLevels, int downLevels, bool setup) 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

void setupSelfAfter () override
void setupSelfBefore () override
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
Protected Member Functions inherited from Item
 Item ()

Additional Inherited Members

Public Types inherited from Configuration
enum class  LyaAccelerationScheme { None , Constant , Variable }
Protected Attributes inherited from Configuration
double _angularDiameterDistance
SpatialCellLibrary_cellLibrary
WavelengthGrid_defaultWavelengthGrid
double _dustEmissionSourceWeight
double _dustEmissionWavelengthBias
WavelengthDistribution_dustEmissionWavelengthBiasDistribution
DisjointWavelengthGrid_dustEmissionWLG
bool _emulationMode
bool _explicitAbsorption
bool _forceScattering
int _gridDimension
bool _hasConstantPerceivedWavelength
bool _hasDustEmission
bool _hasDynamicStateRecipes
bool _hasGasEmission
bool _hasLymanAlpha
bool _hasMedium
bool _hasMergedIterations
bool _hasMovingMedia
bool _hasMovingSources
bool _hasMultipleConstantSectionMedia
bool _hasNegativeExtinction
bool _hasPanRadiationField
bool _hasPolarization
bool _hasPrimaryDynamicState
bool _hasPrimaryDynamicStateMedia
bool _hasPrimaryIterations
bool _hasRadiationField
bool _hasScatteringDispersion
bool _hasSecondaryDynamicState
bool _hasSecondaryDynamicStateMedia
bool _hasSecondaryEmission
bool _hasSecondaryIterations
bool _hasSecondaryRadiationField
bool _hasSingleConstantSectionMedium
bool _hasSpheroidalPolarization
bool _hasStochasticDustEmission
bool _hasVariableMedia
double _hubbleExpansionRate
bool _includeHeatingByCMB
double _luminosityDistance
LyaAccelerationScheme _lyaAccelerationScheme
double _lyaAccelerationStrength
int _magneticFieldMediumIndex
double _maxFractionOfPrevious
double _maxFractionOfPrimary
int _maxPrimaryIterations
int _maxSecondaryIterations
int _mediaDimension
bool _mediaNeedGeneratePosition
int _minPrimaryIterations
int _minScattEvents
int _minSecondaryIterations
double _minWeightReduction
int _modelDimension
bool _needIndividualPeelOff
int _numDensitySamples
double _numPrimaryIterationPackets
double _numPrimaryPackets
int _numPropertySamples
double _numSecondaryIterationPackets
double _numSecondaryPackets
bool _oligochromatic
WavelengthDistribution_oligoWavelengthBiasDistribution
double _pathLengthBias
double _primaryIterationInitialPacketsFraction
double _primaryIterationPacketsRamp
DisjointWavelengthGrid_radiationFieldWLG
double _redshift
bool _scatteringEmulatesSecondaryEmission
double _secondarySourceBias
double _secondarySpatialBias
bool _snapshotsNeedGetEntities
int _sourceDimension
Range _sourceWavelengthRange
bool _storeEmissionRadiationField

Detailed Description

ConfigurationSetup is the concrete subclass of Configuration that performs the actual retrieval of overall simulation configuration options.

Each MonteCarloSimulation holds a single ConfigurationSetup object, accessed through the Configuration interface. During setup, it retrieves many properties and options from the simulation hierarchy, verifying consistency of the configuration and flagging any conflicts while doing so, and stores the results in the (protected) data members inherited from Configuration so that they can be returned by any of the getters declared there with minimal overhead. The setup() function of this object is invoked at the very early stages of simulation setup, so that it is safe for other simulation items to retrieve information from the Configuration object during their own setup.

Constructor & Destructor Documentation

◆ ConfigurationSetup()

ConfigurationSetup::ConfigurationSetup ( SimulationItem * parent)
explicit

This constructor creates a ConfigurationSetup object that is hooked up as a child to the specified parent in the simulation hierarchy, so that it will automatically be deleted. The setup() function is not called by this constructor.

Member Function Documentation

◆ setupSelfAfter()

void ConfigurationSetup::setupSelfAfter ( )
overrideprotectedvirtual

This function logs some aspects of the configuration as information to the user.

Reimplemented from SimulationItem.

◆ setupSelfBefore()

void ConfigurationSetup::setupSelfBefore ( )
overrideprotectedvirtual

This function retrieves properties and options from the simulation hierarchy and stores the resulting values internally so that they can be returned by any of the getters with minimal overhead. During this process, the function also verifies the consistency of the simulation configuration, for example checking the configuration against the requirements of the selected simulation mode. If any conflicts are found, the function throws a fatal error.

Reimplemented from SimulationItem.

◆ simulationWavelengthRange()

Range ConfigurationSetup::simulationWavelengthRange ( ) const
overridevirtual

Returns a wavelength range that covers all wavelengths possibly used in the simulation for photon transport or for otherwise probing material properties (e.g. optical depth). See the base class for the full description.

Implements Configuration.

◆ simulationWavelengths()

vector< double > ConfigurationSetup::simulationWavelengths ( ) const
overridevirtual

Returns a list of wavelengths that are explicitly or indirectly mentioned by the simulation configuration. See the base class for the full description.

Implements Configuration.


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