PyNE C++
Classes | Namespaces | Enumerations | Functions
source_sampling.h File Reference

Mesh-based Monte Carlo source sampling. More...

#include <assert.h>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <stdexcept>
#include <sstream>
#include <string>
#include <map>
#include "moab/Range.hpp"
#include "moab/Core.hpp"
#include "measure.h"
#include "moab/CartVect.hpp"

Go to the source code of this file.

Classes

struct  pyne::edge_points
 Stores 4 connected points in a mesh volume element. More...
 
class  pyne::AliasTable
 A data structure for O(1) source sampling. More...
 
class  pyne::SourceParticle
 
class  pyne::Sampler
 Mesh based Monte Carlo source sampling. More...
 

Namespaces

 pyne
 A container representing enrichment cascades.
 

Enumerations

enum  pyne::BiasMode { USER, ANALOG, UNIFORM }
 Problem modes.
 
enum  MeshMode { VOXEL, SUBVOXEL, TET }
 

Functions

void pyne::sampling_setup_ (int *mode, int *cell_list_size)
 
void pyne::particle_birth_ (double *rands, double *x, double *y, double *z, double *e, double *w, int *cell_list)
 
std::vector< double > pyne::read_e_bounds (std::string e_bounds_file)
 

Detailed Description

Mesh-based Monte Carlo source sampling.

Author
Elliott Biondo (biondo@wisc.edu)

The Sampler class is used for Monte Carlo source sampling from mesh-based sources. The source density distribution and optional biased source density distribution are defined on a MOAB mesh. Upon instantiation, a Sampler object reads this mesh and creates an alias table for randomly sampling particle birth parameters. The particle_birth member function is supplied with 6 pseudo-random numbers and returns the position, energy, and weight of a particle upon birth. There are three sampling modes: analog, uniform, and user-speficied In analog sampling, no source biasing is used and birth weights are all 1. In uniform sampling, the position of the particle (but not the energy) is sampled uniformly and weights are adjusted accordingly. In user-speficied mode, a supplied biased source density distribution is used for sampling and particle weights are adjusted accordingly. The biased source density distribution must have the same number of energy groups as the unbiased distribution. Alternatively, it may have exactly 1 energy group, in which case only spatial biasing is done, and energies are sampled in analog.