27 #define MM_MALLOC(size,alignment) _mm_malloc(size, alignment) 30 #define MM_FREE(array) _mm_free(array) 34 #define MM_MALLOC(size,alignment) memalign(alignment, size) 37 #define MM_FREE(array) free(array) 71 FP_PRECISION* _sigma_t;
74 FP_PRECISION _max_sigma_t;
77 FP_PRECISION* _sigma_s;
80 FP_PRECISION* _sigma_a;
83 FP_PRECISION* _sigma_f;
87 FP_PRECISION* _nu_sigma_f;
93 FP_PRECISION* _fiss_matrix;
104 int _num_vector_groups;
107 Material(
int id=0,
const char* name=
"");
134 void setName(
const char* name);
141 void setSigmaT(
double* xs,
int num_groups);
142 void setSigmaS(
double* xs,
int num_groups);
143 void setSigmaF(
double* xs,
int num_groups);
145 void setChi(
double* xs,
int num_groups);
FP_PRECISION getNuSigmaFByGroup(int group)
Get the Material's nu-fission cross section for some energy group.
Definition: Material.cpp:400
void setNuSigmaFByGroup(double xs, int group)
Set the Material's fission cross-section multiplied by for some energy group.
Definition: Material.cpp:861
int getNumEnergyGroups() const
Returns the number of energy groups for this Material's nuclear data.
Definition: Material.cpp:186
void reset_material_id()
Resets the auto-generated unique Material ID counter to 1,000,000.
Definition: Material.cpp:25
FP_PRECISION * getSigmaF()
Return the array of the Material's fission cross-sections.
Definition: Material.cpp:259
void transposeProductionMatrices()
Transposes the scattering and fission matrices.
Definition: Material.cpp:1091
FP_PRECISION * getChi()
Return the array of the Material's chi .
Definition: Material.cpp:287
void setSigmaSByGroup(double xs, int origin, int destination)
Set the Material's scattering cross-section for some energy group.
Definition: Material.cpp:741
int getNumInstances()
Return the number of instances of this Material in the Geometry.
Definition: Material.cpp:177
double getVolume()
Return the aggregate volume/area of all instances of this Material.
Definition: Material.cpp:166
void setChi(double *xs, int num_groups)
Set the Material's array of chi values.
Definition: Material.cpp:894
Math constants and comparision tolerances.
FP_PRECISION * getSigmaA()
Return the array of the Material's absorption group cross-sections.
Definition: Material.cpp:230
FP_PRECISION * getSigmaS()
Return the array of the Material's scattering cross-section matrix.
Definition: Material.cpp:217
void setVolume(double volume)
Set the volume/area of the Material.
Definition: Material.cpp:503
Material(int id=0, const char *name="")
Constructor sets the ID and unique ID for the Material.
Definition: Material.cpp:50
FP_PRECISION getFissionMatrixByGroup(int origin, int destination)
Get the Material's fission matrix for some energy group.
Definition: Material.cpp:437
Material * clone()
Create a duplicate of the Material.
Definition: Material.cpp:1111
int getId() const
Return the Material's user-defined ID.
Definition: Material.cpp:146
FP_PRECISION getSigmaTByGroup(int group)
Get the Material's total cross section for some energy group.
Definition: Material.cpp:313
FP_PRECISION * getNuSigmaF()
Return the array of the Material's fission cross-sections multiplied by nu .
Definition: Material.cpp:274
int material_id()
Returns an auto-generated unique Material ID.
Definition: Material.cpp:15
void setSigmaS(double *xs, int num_groups)
Set the Material's 2D array of scattering cross-sections.
Definition: Material.cpp:721
int getNumVectorGroups()
Returns the rounded up number of energy groups to fill an integral number of vector lengths...
Definition: Material.cpp:475
void printString()
Prints a string representation of all of the Material's attributes to the console.
Definition: Material.cpp:1200
void setSigmaFByGroup(double xs, int group)
Set the Material's fission cross-section for some energy group.
Definition: Material.cpp:799
void setSigmaTByGroup(double xs, int group)
Set the Material's total cross-section for some energy group.
Definition: Material.cpp:657
void setName(const char *name)
Sets the name of the Material.
Definition: Material.cpp:484
void setNuSigmaF(double *xs, int num_groups)
Set the Material's array of fission cross-sections multiplied by .
Definition: Material.cpp:820
void incrementNumInstances()
Increment the number of instances of this Material.
Definition: Material.cpp:533
void setChiByGroup(double xs, int group)
Set the Material's chi value for some energy group.
Definition: Material.cpp:918
FP_PRECISION getSigmaFByGroup(int group)
Get the Material's fission cross section for some energy group.
Definition: Material.cpp:382
void incrementVolume(double volume)
Increment the volume/area of the Material by some amount.
Definition: Material.cpp:514
FP_PRECISION getChiByGroup(int group)
Get the Material's fission spectrum for some energy group.
Definition: Material.cpp:418
The Material class represents a unique material and its relevant nuclear data (i.e., multigroup cross-sections) for neutron transport.
Definition: Material.h:51
bool isFissionable()
Returns whether or not the Material contains a fissionable (non-zero) fission cross-section.
Definition: Material.cpp:456
virtual ~Material()
Destructor deletes all cross-section data structures from memory.
Definition: Material.cpp:90
void setSigmaT(double *xs, int num_groups)
Set the Material's array of total cross-sections.
Definition: Material.cpp:628
FP_PRECISION getSigmaSByGroup(int origin, int destination)
Get the Material's scattering cross section for some energy group.
Definition: Material.cpp:332
bool isDataAligned()
Returns true if the data is vector aligned, false otherwise (default).
Definition: Material.cpp:465
std::string toString()
Converts this Material's attributes to a character array representation.
Definition: Material.cpp:1144
void setNumInstances(int num_instances)
Set the number of instances of this Material.
Definition: Material.cpp:523
FP_PRECISION getMaxSigmaT()
Return the maximum of the Material's total cross-sections.
Definition: Material.cpp:208
void setNumEnergyGroups(const int num_groups)
Set the number of energy groups for this Material.
Definition: Material.cpp:542
void maximize_material_id(int material_id)
Maximize the auto-generated unique Material ID counter.
Definition: Material.cpp:39
void setSigmaAByGroup(double xs, int group)
Set the Material's absorption cross-section for some energy group.
Definition: Material.cpp:937
void alignData()
Reallocates the Material's cross-section data structures along word-aligned boundaries.
Definition: Material.cpp:993
FP_PRECISION * getFissionMatrix()
Return the array of the Material's fission matrix.
Definition: Material.cpp:300
Utility functions for writing log messages to the screen.
FP_PRECISION getSigmaAByGroup(int group)
Get the Material's absorption cross section for some energy group.
Definition: Material.cpp:352
FP_PRECISION * getSigmaT()
Return the array of the Material's total cross-sections.
Definition: Material.cpp:195
char * getName() const
Return the user-defined name of the Material.
Definition: Material.cpp:155
void setSigmaF(double *xs, int num_groups)
Set the Material's array of fission cross-sections.
Definition: Material.cpp:772
void buildFissionMatrix()
Builds the fission matrix from chi and the fission cross-section.
Definition: Material.cpp:956