An open source method of characteristics neutron transport code.
Material.h File Reference

Go to the source code of this file.

Classes

class  Material
 The Material class represents a unique material and its relevant nuclear data (i.e., multigroup cross-sections) for neutron transport. More...
 

Macros

#define MM_MALLOC(size, alignment)   memalign(alignment, size)
 
#define MM_FREE(array)   free(array)
 

Functions

int material_id ()
 Returns an auto-generated unique Material ID. More...
 
void reset_material_id ()
 Resets the auto-generated unique Material ID counter to 1,000,000.
 
void maximize_material_id (int material_id)
 Maximize the auto-generated unique Material ID counter. More...
 

Detailed Description

Date
January 19, 2012
Author
William Boyd, MIT, Course 22 (wboyd.nosp@m.@mit.nosp@m..edu)

Macro Definition Documentation

◆ MM_FREE

#define MM_FREE (   array)    free(array)

Aligned memory deallocation for GNU's compiler

◆ MM_MALLOC

#define MM_MALLOC (   size,
  alignment 
)    memalign(alignment, size)

Aligned memory allocation for GNU's compiler

Function Documentation

◆ material_id()

int material_id ( )

Returns an auto-generated unique Material ID.

This method is intended as a utility method for user's writing OpenMOC input files. The method makes use of a static Material ID which is incremented each time the method is called to enable unique generation of monotonically increasing IDs. The method's first ID begins at 1,000,000. Hence, user-defined material IDs greater than or equal to 1,000,000 is prohibited.

◆ maximize_material_id()

void maximize_material_id ( int  material_id)

Maximize the auto-generated unique Material ID counter.

This method updates the auto-generated unique Material ID counter if the input parameter is greater than the present value. This is useful for the OpenMC compatibility module to ensure that the auto-generated Material IDs do not collide with those created in OpenMC.

Parameters
material_idthe id assigned to the auto-generated counter