An open source method of characteristics neutron transport code.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Cell.h File Reference

The Cell class. More...

Go to the source code of this file.

Classes

class  Cell
 Represents a Cell inside of a Universe. More...
 

Enumerations

enum  cellType { MATERIAL, FILL, UNFILLED }
 The type of cell. More...
 

Functions

int cell_id ()
 Returns an auto-generated unique Cell ID. More...
 
void reset_cell_id ()
 Resets the auto-generated unique Cell ID counter to 1,000,000.
 
void maximize_cell_id (int cell_id)
 Maximize the auto-generated unique Cell ID counter. More...
 

Detailed Description

The Cell class.

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

Enumeration Type Documentation

◆ cellType

enum cellType

The type of cell.

Enumerator
MATERIAL 

A cell filled by a Material

FILL 

A cell filled by a Universe

UNFILLED 

A cell not yet filled by anything

Function Documentation

◆ cell_id()

int cell_id ( )

Returns an auto-generated unique Cell ID.

This method is intended as a utility method for users writing OpenMOC input files. The method makes use of a static Cell 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 Cell IDs greater than or equal to 1,000,000 are prohibited.

◆ maximize_cell_id()

void maximize_cell_id ( int  cell_id)

Maximize the auto-generated unique Cell ID counter.

This method updates the auto-generated unique Cell 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 Cell IDs do not collide with those created in OpenMC.

Parameters
cell_idthe id assigned to the auto-generated counter