MCPlusPlus
A Monte Carlo C++ code for radiative transport
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MCPP::Source Class Reference

Base Source class: constructs and initializes a Walker according to given source term modeling. More...

#include <MCPlusPlus/source.h>

+ Inheritance diagram for MCPP::Source:
+ Collaboration diagram for MCPP::Source:

Public Member Functions

void setk0Distribution (AbstractDistribution *cosThetaDistr, AbstractDistribution *psiDistr)
 
void setr0Distribution (AbstractDistribution *x0Distribution, AbstractDistribution *y0Distribution, double _z0)
 
void setWalkTimeDistribution (AbstractDistribution *distr)
 
virtual void setWavelength (double um)
 
 Source (BaseObject *parent=NULL)
 
void spin (Walker *walker) const
 Constructs a new walker. More...
 
MCfloat wavelength () const
 
MCfloat z0 () const
 
- Public Member Functions inherited from MCPP::BaseRandom
 BaseRandom (BaseObject *parent=NULL)
 
unsigned int currentSeed () const
 The seed currently used by the RNG. More...
 
void dumpGeneratorState (const char *fileName) const
 Dumps the RNG internal state to file. More...
 
string generatorState () const
 The RNG internal state. More...
 
void loadGeneratorState (const char *fileName)
 Loads a RNG state from file. More...
 
void setGeneratorState (string state)
 Set the internal RNG state. More...
 
void setSeed (unsigned int seed)
 Sets a new seed for the RNG. More...
 
- Public Member Functions inherited from MCPP::BaseObject
 BaseObject (BaseObject *parent=NULL)
 
list< BaseObject * > childList () const
 
BaseObjectclone () const
 Returns a cloned instance of the current object. More...
 
void describe () const
 Prints a description of the object and its main properties. More...
 
bool hasAParent () const
 
bool inheritsRandom () const
 Determines whether or not the object derives from BaseRandom. More...
 
BaseObjectparent () const
 Returns a pointer to the parent object.
 
bool sanityCheck () const
 Performs a series of integrity checks on internal data to ensure that the object is properly initialized and ready to be used. More...
 
void setParent (BaseObject *parent)
 Makes the object a child of parent. More...
 
string typeName () const
 The class name of the object. More...
 
bool wasCloned () const
 Determines whether or not the object was cloned. More...
 

Protected Member Functions

virtual BaseObjectclone_impl () const
 
void cloneInto (Source *src) const
 
virtual void spinDirection (Walker *walker) const
 
virtual void spinPosition (Walker *walker) const
 
virtual void spinTime (Walker *walker) const
 
- Protected Member Functions inherited from MCPP::BaseObject
void addObjectToCheck (const BaseObject **const obj)
 Adds a BaseObject pointer to the list of objects to be checked. More...
 
void clearObjectsToCheck ()
 
void copyToInternalVariable (char **dest, const char *src)
 
void logMessage (const string &msg) const
 Logs a message to stderr. More...
 
void logMessage (const char *fmt,...) const
 

Protected Attributes

MCfloat _z0
 
AbstractDistributioncosThetaDistribution
 
AbstractDistributionpsiDistribution
 
AbstractDistributionr0Distribution [3]
 
AbstractDistributionwalkTimeDistribution
 
- Protected Attributes inherited from MCPP::BaseRandom
unsigned int _currentSeed
 
MCEngine * mt
 
- Protected Attributes inherited from MCPP::BaseObject
bool _inheritsRandom
 
list< const BaseObject *const * > objectsToCheck
 

Detailed Description

Base Source class: constructs and initializes a Walker according to given source term modeling.

The default wavelength is set to $ \SI{1}{\micro\metre} $.

Member Function Documentation

◆ spin()

void Source::spin ( Walker walker) const

Constructs a new walker.

Returns
A pointer to the newly constructed walker.

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