Monte Carlo eXtreme (MCX)
Public Attributes | List of all members
MCXConfig Struct Reference

#include <mcx_utils.h>

Collaboration diagram for MCXConfig:
Collaboration graph
[legend]

Public Attributes

size_t nphoton
 
unsigned int nblocksize
 
unsigned int nthread
 
int seed
 
float4 srcpos
 
float4 srcdir
 
float4 srciquv
 
float tstart
 
float tstep
 
float tend
 
float3 steps
 
uint3 dim
 
uint3 crop0
 
uint3 crop1
 
unsigned int medianum
 
unsigned int polmedianum
 
unsigned int detnum
 
unsigned int maxdetphoton
 
float detradius
 
float sradius
 
Mediumprop
 
POLMediumpolprop
 
float4detpos
 
float4smatrix
 
unsigned int maxgate
 
int respin
 
unsigned int printnum
 
int gpuid
 
unsigned int * vol
 
char session [MAX_SESSION_LENGTH]
 
char isrowmajor
 
char isreflect
 
char isref3
 
char isrefint
 
char isnormalized
 
char issavedet
 
char issave2pt
 
char isgpuinfo
 
char isspecular
 
char issrcfrom0
 
char isdumpmask
 
char autopilot
 
char issaveseed
 
char issaveexit
 
char issaveref
 
char ismomentum
 
char isdumpjson
 
char internalsrc
 
int zipid
 
char srctype
 
char outputtype
 
char outputformat
 
char faststep
 
float minenergy
 
float unitinmm
 
float omega
 
float lambda
 
FILE * flog
 
History his
 
float * exportfield
 
float * exportdetected
 
unsigned long int detectedcount
 
char rootpath [MAX_PATH_LENGTH]
 
char * shapedata
 
char * extrajson
 
int maxvoidstep
 
int voidtime
 
float4 srcparam1
 
float4 srcparam2
 
unsigned int srcnum
 
float * srcpattern
 
Replay replay
 
void * seeddata
 
int replaydet
 
char seedfile [MAX_PATH_LENGTH]
 
char jsonfile [MAX_PATH_LENGTH]
 
unsigned int debuglevel
 
unsigned int savedetflag
 
char deviceid [MAX_DEVICE]
 
float workload [MAX_DEVICE]
 
int parentid
 
unsigned int runtime
 
double energytot
 
double energyabs
 
double energyesc
 
float normalizer
 
unsigned int maxjumpdebug
 
unsigned int debugdatalen
 
unsigned int gscatter
 
float * exportdebugdata
 
uint mediabyte
 
float * dx
 
float * dy
 
float * dz
 
char bc [12]
 
unsigned int nphase
 
float * invcdf
 

Detailed Description

Data structure for MCX simulation settings

Member Data Documentation

◆ autopilot

char MCXConfig::autopilot

1 optimal setting for dedicated card, 2, for non dedicated card

◆ bc

char MCXConfig::bc[12]

boundary condition flag for [-x,-y,-z,+x,+y,+z, det(-x,-y,-z,+x,+y,+z)]

◆ crop0

uint3 MCXConfig::crop0

sub-volume for cache

◆ crop1

uint3 MCXConfig::crop1

the other end of the caching box

◆ debugdatalen

unsigned int MCXConfig::debugdatalen

max number of photon trajectory position length

◆ debuglevel

unsigned int MCXConfig::debuglevel

a flag to control the printing of the debug information

◆ detectedcount

unsigned long int MCXConfig::detectedcount

total number of detected photons

◆ detnum

unsigned int MCXConfig::detnum

total detector numbers

◆ detpos

float4* MCXConfig::detpos

detector positions and radius, overwrite detradius

◆ detradius

float MCXConfig::detradius

default detector radius

◆ deviceid

char MCXConfig::deviceid[MAX_DEVICE]

a 0-1 mask for all the GPUs, a mask of 1 means this GPU will be used

◆ dim

uint3 MCXConfig::dim

domain size

◆ dx

float* MCXConfig::dx

anisotropic voxel spacing for x-axis

◆ dy

float* MCXConfig::dy

anisotropic voxel spacing for y-axis

◆ dz

float* MCXConfig::dz

anisotropic voxel spacing for z-axis

◆ energyabs

double MCXConfig::energyabs

total absorbed photon packet weights

◆ energyesc

double MCXConfig::energyesc

total escaped photon packet weights

◆ energytot

double MCXConfig::energytot

total launched photon packet weights

◆ exportdebugdata

float* MCXConfig::exportdebugdata

pointer to the buffer where the photon trajectory data are stored

◆ exportdetected

float* MCXConfig::exportdetected

memory buffer when returning the partial length info to external programs such as matlab

◆ exportfield

float* MCXConfig::exportfield

memory buffer when returning the flux to external programs such as matlab

◆ extrajson

char* MCXConfig::extrajson

a pointer points to a string defining the extra JSON input data

◆ faststep

char MCXConfig::faststep

1 use tMCimg-like approximated photon stepping (obsolete)

◆ flog

FILE* MCXConfig::flog

stream handle to print log information

◆ gpuid

int MCXConfig::gpuid

the ID of the GPU to use, starting from 1, 0 for auto

◆ gscatter

unsigned int MCXConfig::gscatter

after how many scattering events that we can use mus' instead of mus

◆ his

History MCXConfig::his

header info of the history file

◆ internalsrc

char MCXConfig::internalsrc

1 all photons launch positions are inside non-zero voxels, 0 let mcx search entry point

◆ invcdf

float* MCXConfig::invcdf

equal-space sampled inversion of CDF(cos(theta)) for the phase function of the zenith angle

◆ isdumpjson

char MCXConfig::isdumpjson

1 to save json

◆ isdumpmask

char MCXConfig::isdumpmask

1 dump detector mask; 0 not

◆ isgpuinfo

char MCXConfig::isgpuinfo

1 to print gpu info when attach, 0 do not print

◆ ismomentum

char MCXConfig::ismomentum

1 to save momentum transfer for detected photons, implies issavedet=1

◆ isnormalized

char MCXConfig::isnormalized

1 to normalize the fluence, 0 for raw fluence

◆ isref3

char MCXConfig::isref3

1 considering maximum 3 ref. interfaces; 0 max 2 ref

◆ isrefint

char MCXConfig::isrefint

1 to consider reflections at internal boundaries; 0 do not

◆ isreflect

char MCXConfig::isreflect

1 for reflecting photons at boundary,0 for exiting

◆ isrowmajor

char MCXConfig::isrowmajor

1 for C-styled array in vol, 0 for matlab-styled array

◆ issave2pt

char MCXConfig::issave2pt

1 to save the 2-point distribution, 0 do not save

◆ issavedet

char MCXConfig::issavedet

1 to count all photons hits the detectors

◆ issaveexit

char MCXConfig::issaveexit

1 save the exit position and dir of a detected photon, 0 do not save

◆ issaveref

char MCXConfig::issaveref

1 save diffuse reflectance at the boundary voxels, 0 do not save

◆ issaveseed

char MCXConfig::issaveseed

1 save the seed for a detected photon, 0 do not save

◆ isspecular

char MCXConfig::isspecular

1 calculate the initial specular ref if outside the mesh, 0 do not calculate

◆ issrcfrom0

char MCXConfig::issrcfrom0

1 do not subtract 1 from src/det positions, 0 subtract 1

◆ jsonfile

char MCXConfig::jsonfile[MAX_PATH_LENGTH]

if the seed is specified as a file (mch), mcx will replay the photons

◆ lambda

float MCXConfig::lambda

light wavelength (in nm), for polarized light simulation

◆ maxdetphoton

unsigned int MCXConfig::maxdetphoton

anticipated maximum detected photons

◆ maxgate

unsigned int MCXConfig::maxgate

simultaneous recording gates

◆ maxjumpdebug

unsigned int MCXConfig::maxjumpdebug

num of photon scattering events to save when saving photon trajectory is enabled

◆ maxvoidstep

int MCXConfig::maxvoidstep

max number of steps that a photon can advance before reaching a non-zero voxel

◆ mediabyte

uint MCXConfig::mediabyte

how many bytes per media index, mcx supports 1, 2 and 4, 4 is the default

◆ medianum

unsigned int MCXConfig::medianum

total types of media

◆ minenergy

float MCXConfig::minenergy

minimum energy to propagate photon

◆ nblocksize

unsigned int MCXConfig::nblocksize

thread block size

◆ normalizer

float MCXConfig::normalizer

normalization factor

◆ nphase

unsigned int MCXConfig::nphase

number of samples for inverse-cdf, will be added by 2 to include -1 and 1 on the two ends

◆ nphoton

size_t MCXConfig::nphoton

total simulated photon number

◆ nthread

unsigned int MCXConfig::nthread

num of total threads, multiple of 128

◆ omega

float MCXConfig::omega

modulation angular frequency (2*pi*f), in rad/s, for FD/RF replay

◆ outputformat

char MCXConfig::outputformat

'mc2' output is text, 'nii': binary, 'img': regular json, 'ubj': universal binary json

◆ outputtype

char MCXConfig::outputtype

'X' output is flux, 'F' output is fluence, 'E' energy deposit

◆ parentid

int MCXConfig::parentid

flag for testing if mcx is executed inside matlab

◆ polmedianum

unsigned int MCXConfig::polmedianum

total types of media for polarized photon simulation

◆ polprop

POLMedium* MCXConfig::polprop

absorption and scatterer mapping table for polarized photon simulation

◆ printnum

unsigned int MCXConfig::printnum

number of printed threads (for debugging)

◆ prop

Medium* MCXConfig::prop

optical property mapping table

◆ replay

Replay MCXConfig::replay

a structure to prepare for photon replay

◆ replaydet

int MCXConfig::replaydet

the detector id for which to replay the detected photons, start from 1

◆ respin

int MCXConfig::respin

number of repeatitions (if positive), or number of divisions (if negative)

◆ rootpath

char MCXConfig::rootpath[MAX_PATH_LENGTH]

sets the input and output root folder

◆ runtime

unsigned int MCXConfig::runtime

variable to store the total kernel simulation time in ms

◆ savedetflag

unsigned int MCXConfig::savedetflag

a flag to control the output fields of detected photon data

◆ seed

int MCXConfig::seed

random number generator seed

◆ seeddata

void* MCXConfig::seeddata

poiinter to a buffer where detected photon seeds are stored

◆ seedfile

char MCXConfig::seedfile[MAX_PATH_LENGTH]

if the seed is specified as a file (mch), mcx will replay the photons

◆ session

char MCXConfig::session[MAX_SESSION_LENGTH]

session id, a string

◆ shapedata

char* MCXConfig::shapedata

a pointer points to a string defining the JSON-formatted shape data

◆ smatrix

float4* MCXConfig::smatrix

scattering Mueller matrix

◆ sradius

float MCXConfig::sradius

source region radius, if set to non-zero, accumulation will not perform for dist<sradius

◆ srcdir

float4 MCXConfig::srcdir

src normal direction

◆ srciquv

float4 MCXConfig::srciquv

initial stokes parameter

◆ srcnum

unsigned int MCXConfig::srcnum

total number of pattern sources

◆ srcparam1

float4 MCXConfig::srcparam1

a quadruplet {x,y,z,w} for additional source parameters

◆ srcparam2

float4 MCXConfig::srcparam2

a quadruplet {x,y,z,w} for additional source parameters

◆ srcpattern

float* MCXConfig::srcpattern

a string for the source form, options include "pencil","isotropic", etc

◆ srcpos

float4 MCXConfig::srcpos

src position in mm

◆ srctype

char MCXConfig::srctype

0:pencil,1:isotropic,2:cone,3:gaussian,4:planar,5:pattern,\ 6:fourier,7:arcsine,8:disk,9:fourierx,10:fourierx2d,11:zgaussian,\ 12:line,13:slit,14:pencilarray,15:pattern3d,16:hyperboloid,17:ring

◆ steps

float3 MCXConfig::steps

voxel sizes along x/y/z in mm

◆ tend

float MCXConfig::tend

end time in second

◆ tstart

float MCXConfig::tstart

start time in second

◆ tstep

float MCXConfig::tstep

time step in second

◆ unitinmm

float MCXConfig::unitinmm

defines the length unit in mm for grid

◆ voidtime

int MCXConfig::voidtime

1 start counting photon time when moves inside 0 voxels; 0: count time only after enters non-zero voxel

◆ vol

unsigned int* MCXConfig::vol

pointer to the volume

◆ workload

float MCXConfig::workload[MAX_DEVICE]

an array storing the relative weight when distributing photons between multiple GPUs

◆ zipid

int MCXConfig::zipid

data zip method "zlib","gzip","base64","lzip","lzma","lz4","lz4hc"


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