PyNE C++
Public Member Functions | List of all members
pyne::Sampler Class Reference

Mesh based Monte Carlo source sampling. More...

#include <source_sampling.h>

Public Member Functions

 Sampler (std::string filename, std::string src_tag_name, std::vector< double > e_bounds, bool uniform)
 
 Sampler (std::string filename, std::string src_tag_name, std::vector< double > e_bounds, std::string bias_tag_name)
 
std::vector< double > particle_birth (std::vector< double > rands)
 

Detailed Description

Mesh based Monte Carlo source sampling.

Constructor & Destructor Documentation

pyne::Sampler::Sampler ( std::string  filename,
std::string  src_tag_name,
std::vector< double >  e_bounds,
bool  uniform 
)

Constuctor for analog and uniform sampling

Parameters
filenameThe path to the MOAB mesh (.h5m) file
src_tag_nameThe name of the tag that describes the unbiased source density distribution.
e_boundsThe energy boundaries, note there are N + 1 energy bounds for N energy groups
uniformIf false, analog sampling is used. If true, uniform sampling is used.
pyne::Sampler::Sampler ( std::string  filename,
std::string  src_tag_name,
std::vector< double >  e_bounds,
std::string  bias_tag_name 
)

Constuctor for analog and uniform sampling

Parameters
filenameThe path to the MOAB mesh (.h5m) file
src_tag_nameThe name of the tag with the unbiased source density distribution.
e_boundsThe energy boundaries, note there are N + 1 energy bounds for N energy groups
bias_tag_nameThe name of the tag describing the biased source density distribution. The tag must have the same number of energy groups as <src_tag_name> or 1. If 1 (i.e. spatial biasing only), all energy groups within a mesh volume element are sampled equally.

Member Function Documentation

std::vector< double > pyne::Sampler::particle_birth ( std::vector< double >  rands)

Samples particle birth parameters

Parameters
randsSix pseudo-random numbers in range [0, 1].
Returns
A vector containing the x position, y, position, z, point, energy and weight of a particle (in that order).

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