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)
 
 Sampler (std::string filename, std::map< std::string, std::string > tag_names, std::vector< double > e_bounds, int mode)
 
pyne::SourceParticle particle_birth (std::vector< double > rands)
 
int get_cell_list_size ()
 Return cell_list_size.
 

Detailed Description

Mesh based Monte Carlo source sampling.

Constructor & Destructor Documentation

◆ Sampler() [1/3]

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.

◆ Sampler() [2/3]

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.

◆ Sampler() [3/3]

pyne::Sampler::Sampler ( std::string  filename,
std::map< std::string, std::string >  tag_names,
std::vector< double >  e_bounds,
int  mode 
)

Constuctor for overall sampler

Parameters
filenameThe filename of the h5m file
tag_namesThe map of src_tag_name and bias_tag_name
e_boundsThe energy boundaries, note there are N + 1 energy bounds for N energy groups
modeThe mode number, 0, 1, 2, 3, 4 or 5

Member Function Documentation

◆ particle_birth()

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

Samples particle birth parameters

Parameters
randsSix pseudo-random numbers in range [0, 1].
Returns
A SourceParticle object containing the x position, y, position, z, position, e, energy and w, weight of a particle.

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