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

The Universe class. More...

Go to the source code of this file.

Classes

class  Universe
 A Universe represents an unbounded space in 3D. More...
 
class  Lattice
 Represents a repeating 3D Lattice of Universes. More...
 
struct  second_t< tPair >
 A helper struct for the Universe::findCell() method. More...
 

Enumerations

enum  universeType { SIMPLE, LATTICE }
 The type of universe. More...
 

Functions

int universe_id ()
 Returns an auto-generated unique Universe ID. More...
 
void reset_universe_id ()
 Resets the auto-generated unique Universe ID counter to 1,000,000.
 
void maximize_universe_id (int universe_id)
 Maximize the auto-generated unique Universe ID counter. More...
 
template<typename tMap >
second_t< typename tMap::value_type > pair_second (const tMap &map)
 A helper routine for the Universe::findCell() method. More...
 

Detailed Description

The Universe class.

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

Enumeration Type Documentation

◆ universeType

The type of universe.

Enumerator
SIMPLE 

A simple non-repeating Universe

LATTICE 

A collection of Universes in a rectangular Lattice

Function Documentation

◆ maximize_universe_id()

void maximize_universe_id ( int  universe_id)

Maximize the auto-generated unique Universe ID counter.

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

Parameters
universe_idthe id assigned to the auto-generated counter

◆ pair_second()

template<typename tMap >
second_t<typename tMap::value_type> pair_second ( const tMap &  map)

A helper routine for the Universe::findCell() method.

This is used to insert a Universe's Cells to the back of a vector of neighbor Cells in Universe::findCell() routine. This works in symbiosis with the second_t struct template defined above.

Parameters
mapa std::map iterator
Returns
the second element in the iterator (e.g., map value)

◆ universe_id()

int universe_id ( )

Returns an auto-generated unique Universe ID.

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