Skip to content

Commit

Permalink
doxygen comments in datadef.h
Browse files Browse the repository at this point in the history
  • Loading branch information
sellitforcache committed Feb 23, 2017
1 parent 48e3436 commit 588e05b
Showing 1 changed file with 67 additions and 59 deletions.
126 changes: 67 additions & 59 deletions datadef.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@

/**
* \struct wtransform datadef.h
* \brief contains parameters of a wtransform
* \brief contains parameters of a wtransform, a transform used to create a new instance of a wgemetry object
* \details cell number and material, transform coordinates and angles
*/
struct wtransform {
unsigned cellnum; /**< cell number */
unsigned cellmat; /**< cell material */
int tally_index;/**< tally index*/
float dx; /**< dx */
float dy; /**< dy */
float dz; /**< dz */
float theta; /**< polar angle */
float phi; /**< azimuthal angle */
int tally_index;/**< index of tally associated with this instance*/
float dx; /**< displacement in x */
float dy; /**< displacement in y */
float dz; /**< displacement in z */
float theta; /**< roation in polar angle */
float phi; /**< roation in azimuthal angle */
};

/**
* \struct geom_data datadef.h
* \brief contains parameters of a wgeometry
* \details extrema arrays, location array, cell and material numbers, fissile flag
* \details extrema arrays, location array, cell and material numbers, tally number, fissile flag
*/
struct geom_data{
float min[3]; /**< array of coordinate (x,y,z) minima */
Expand All @@ -36,67 +36,67 @@ struct geom_data{

/**
* \struct spatial_data datadef.h
* \brief contains the parameters of the neutron source point
* \details 3D Cartesian coordinates, shifted coordinates, distance to nearest surface, total macroscopic
* cross section, boundary condition enforcement flag
* \brief contains the spatial parameters of the neutron
* \details 3D Cartesian coordinates, direction vector, distance to nearest surface, total macroscopic
* cross section, surface normal vector, boundary condition enforcement flag, neutron statsitical weight
*/
struct spatial_data{
float x; /**< x-coordinate */
float y; /**< y-coordinate */
float z; /**< z-coordinate */
float xhat; /**< shifted x-coordinate */
float yhat; /**< shifted y-coordinate */
float zhat; /**< shifted z-coordinate */
float xhat; /**< direction vector x-component */
float yhat; /**< direction vector y-component */
float zhat; /**< direction vector z-component */
float surf_dist; /**< distance to nearest surface */
float norm[3]; /**< normal vector of intersection */
float norm[3]; /**< normal vector of surface intersection */
unsigned enforce_BC; /**< boundary condition enforcement flag */
unsigned weight; /**< particle statistical weight */
};

/**
* \struct intersection_point datadef.h
* \brief contains information pertinent to an intersection point
* \brief contains information pertinent to an intersection point, used in OptiX
* \details 3D cartesian coordinates of intersection point, distance to nearest surface, first cell
* potentially hit, continuity flag, hit buffer, and hit buffer index
* potentially hit, material of hit cell, fissile flag of hit cell, normal vector of hit surface,
* hit cell sense value, index of tally for hit cell
*/
struct intersection_point {
float x; /**< x-coordinate */
float y; /**< y-coordinate */
float z; /**< z-coordinate */
float surf_dist; /**< distance to nearest surface */
int cell; /**< cell number */
int mat; /**< material number */
int fiss; /**< fissile flag */
float norm[3]; /**< most recent normal */
int sense; /**< most recent cell sense */
int tally_index;/**< tally index of most recent cell */
int cell; /**< most recently hit cell number */
int mat; /**< most recently hit material number */
int fiss; /**< most recently hit fissile flag */
float norm[3]; /**< most recently hit normal */
int sense; /**< most recently hit cell sense */
int tally_index;/**< tally index of most recently hit cell */
};

/**
* \struct material_def datadef.h
* \brief contains information that defines a material
* \details material ID, number, fissile flag, number of isotopes, density, isotope list, isotope
* fraction list
* \details material index, label number, fissile flag, number of isotopes, density, isotope list, isotope
* atom fraction list
*/
struct material_def {
unsigned id; /**< material ID */
unsigned matnum; /**< material number */
unsigned id; /**< material index */
unsigned matnum; /**< material label number */
unsigned is_fissile; /**< fissile flag */
unsigned num_isotopes; /**< number of isotopes */
float density; /**< density [g/cc] */
std::vector<std::string> isotopes; /**< isotope list */
float* fractions; /**< isotope fractions */
float* fractions; /**< isotope atom fractions */
};

/**
* \struct dist_data datadef.h
* \brief contains information that defines a material
* \details material ID, number, fissile flag, number of isotopes, density, isotope list, isotope
* fraction list
* \brief contains information that defines an ENDF cross section distribution
* \details ernergy, length, law, interpolation type, variable/pdf/cdf arrays
*/
struct dist_data {
float erg; /**< energy point of this distribution */
unsigned len; /**< length of the arrays in this ditribution */
unsigned len; /**< length of the arrays in this distribution */
unsigned law; /**< sampling law of this distribution */
unsigned intt; /**< interpolation flag of this distribution */
float* var; /**< independent variable (mu, E, etc.) */
Expand All @@ -106,9 +106,8 @@ struct dist_data {

/**
* \struct dist_container datadef.h
* \brief contains information that defines a material
* \details material ID, number, fissile flag, number of isotopes, density, isotope list, isotope
* fraction list
* \brief container for pointers that map the nearest distributions to the energy grid point where it resides
* \details pointers to the nearest distribution lower and greater in energy
*/
struct dist_container {
dist_data* lower; /**< pointer to distribution data of grid point below current energy */
Expand All @@ -117,9 +116,11 @@ struct dist_container {

/**
* \struct cross_section_data datadef.h
* \brief contains information that defines a material
* \details material ID, number, fissile flag, number of isotopes, density, isotope list, isotope
* fraction list
* \brief structure that holds the topmost level of cross section data
* \details contains pointers and parameters to compute any reaction in this requested isotope set - number of isotopes,
* length of main energy grid, total number of reactions channels, reaction number vector,
* total reaction channels for each isotope, unionized energy grid vector, reaction Q values, cross section data,
* isotope atomic weight ratios, isotope temperatures, energy and scattering data distributions
*/
struct cross_section_data {
unsigned n_isotopes; /**< number of isotopes */
Expand All @@ -132,37 +133,38 @@ struct cross_section_data {
float* xs; /**< cross section data matrix */
float* awr; /**< isotope atomic weight ratio (AWR) list */
float* temp; /**< isotope temperature list (MeV) */
dist_container* dist_scatter; /**< distribution data redirection matrix */
dist_container* dist_energy; /**< distribution data redirection matrix */
dist_container* dist_scatter; /**< scattering distribution data redirection matrix */
dist_container* dist_energy; /**< energy distribution data redirection matrix */
};


/**
* \struct particle_data datadef.h
* \brief contains information that defines a material
* \details material ID, number, fissile flag, number of isotopes, density, isotope list, isotope
* fraction list
* \brief structure that holds all the arrays that define a particle's state
* \details Hold arrays that define a neutron's state and/or need to be passed between kernels. Data locality efficiency
* dictates that this must be a structure of arrays (SoA) and not be a structure built into arrays (array of structures - AoS).
* This container structure is passed to almost all kernels so they can access neutron state data.
*/
struct particle_data {
spatial_data* space; /**< distribution data redirection matrix */
unsigned* rxn; /**< distribution data redirection matrix */
float* E; /**< distribution data redirection matrix */
float* Q; /**< distribution data redirection matrix */
unsigned* rn_bank; /**< distribution data redirection matrix */
unsigned* cellnum; /**< distribution data redirection matrix */
unsigned* matnum; /**< distribution data redirection matrix */
unsigned* isonum; /**< distribution data redirection matrix */
int* talnum;
unsigned* yield; /**< distribution data redirection matrix */
float* weight; /**< distribution data redirection matrix */
unsigned* index; /**< distribution data redirection matrix */
spatial_data* space; /**< spatial data array */
unsigned* rxn; /**< current reaction array */
float* E; /**< energy array */
float* Q; /**< current reaction Q value array */
unsigned* rn_bank; /**< random number seed array */
unsigned* cellnum; /**< current cell number array */
unsigned* matnum; /**< current material number array */
unsigned* isonum; /**< current isotope number array */
int* talnum; /**< current tally number array */
unsigned* yield; /**< total yield of history array */
float* weight; /**< statistical weight array */
unsigned* index; /**< current energy grid index array */
};

/**
* \struct tally_data datadef.h
* \brief contains information that defines a material
* \details material ID, number, fissile flag, number of isotopes, density, isotope list, isotope
* fraction list
* \struct tally_data_host datadef.h
* \brief Tally data that lives on the host side.
* \details Tally data that lives on the host side. Basically holds the same thing as the device array but also contains 64-bit
* arrays that the tallies are accumulated into to avoid too much roundoff error.
*/
struct tally_data_host {
float* score; /**< tally score */
Expand All @@ -177,6 +179,12 @@ struct tally_data_host {
float E_max; /**< maximum energy (input) */
};

/**
* \struct tally_data datadef.h
* \brief Tally data that lives on the device side.
* \details Tally data that lives on the device side. Everything needed to properly index a tally and the vectors to store
* the scores and keep track of statistics
*/
struct tally_data {
float* score; /**< tally score */
float* square; /**< tally square */
Expand Down

0 comments on commit 588e05b

Please sign in to comment.