A monte carlo pin cell spectral code for nuclear engineering applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Region Class Referenceabstract

The region class represents a region in 2D space. More...

#include "src/pinspec/Region.h"

Inheritance diagram for Region:
BoundedRegion EquivalenceRegion InfiniteMediumRegion BoundedFuelRegion BoundedGeneralRegion BoundedModeratorRegion EquivalenceFuelRegion EquivalenceModeratorRegion

Public Member Functions

 Region (const char *region_name=(char *)"")
 Region constructor. More...
 
virtual ~Region ()
 Empty destructor allows SWIG to cleanup memory for surfaces. More...
 
char * getName ()
 Return the name of the region. More...
 
int getUid () const
 Returns the unique ID auto-generated for the region. More...
 
MaterialgetMaterial ()
 Returns a pointer to the material filling this region. More...
 
bool containsIsotope (Isotope *isotope)
 Determines whether this region contains a particular isotope. More...
 
regionType getRegionType ()
 Return the type of region. More...
 
float getVolume ()
 returns the volume of this Region $ (cm^3) $. More...
 
float getBucklingSquared ()
 Returns the squared geometric buckling. More...
 
float getTotalMacroXS (float energy)
 Computes and returns the total macroscopic cross-section in the region at some energy (eV). More...
 
float getTotalMacroXS (int energy_index)
 Computes and returns the total macroscopic cross-section in the region at some index into the uniform lethargy grid. More...
 
float getTotalMicroXS (float energy)
 Computes and returns the total microscopic cross-section in the region at some energy (eV). More...
 
float getTotalMicroXS (int energy_index)
 Computes and returns the total microscopic cross-section in the region at some index into the uniform lethargy grid. More...
 
float getElasticMacroXS (float energy)
 Computes and returns the macroscopic elastic scattering cross-section in the region at some energy (eV). More...
 
float getElasticMacroXS (int energy_index)
 Computes and returns the macroscopic elastic scattering cross-section in the region at some index into the uniform lethargy grid. More...
 
float getElasticMicroXS (float energy)
 Computes and returns the microscopic elastic scattering cross-section in the region at some energy (eV). More...
 
float getElasticMicroXS (int energy_index)
 Computes and returns the microscopic elastic scattering cross-section in the region at some index into the uniform lethargy grid. More...
 
float getAbsorptionMacroXS (float energy)
 Computes and returns the macroscopic absorption cross-section in the region at energy (eV). More...
 
float getAbsorptionMacroXS (int energy_index)
 Computes and returns the macroscopic absorption cross-section in the region at some index into the uniform lethargy grid. More...
 
float getAbsorptionMicroXS (float energy)
 Computes and returns the microscopic absorption cross-section in the region at some energy (eV). More...
 
float getAbsorptionMicroXS (int energy_index)
 Computes and returns the microscopic absorption cross-section in the region at some index into the uniform lethargy grid. More...
 
float getCaptureMacroXS (float energy)
 Computes and returns the macroscopic capture cross-section in the region at some energy (eV). More...
 
float getCaptureMacroXS (int energy_index)
 Computes and returns the macroscopic capture cross-section in the region at some index into the uniform lethargy grid. More...
 
float getCaptureMicroXS (float energy)
 Computes and returns the microscopic capture cross-section in the region at some energy (eV). More...
 
float getCaptureMicroXS (int energy_index)
 Computes and returns the microscopic capture cross-section in the region at some index into the uniform lethargy grid. More...
 
float getFissionMacroXS (float energy)
 Computes and returns the macroscopic fission cross-section in the region at some energy (eV). More...
 
float getFissionMacroXS (int energy_index)
 Computes and returns the macroscopic fission cross-section in the region at some index into the uniform lethargy grid. More...
 
float getFissionMicroXS (float energy)
 Computes and returns the microscopic fission cross-section in the region at some energy (eV) More...
 
float getFissionMicroXS (int energy_index)
 Computes and returns the microscopic fission cross-section in the region at some index into the uniform lethargy grid. More...
 
float getTransportMicroXS (float energy)
 Computes and returns the microscopic transport cross-section in the region at some index into the uniform lethargy grid. More...
 
float getTransportMicroXS (int energy_index)
 Computes and returns the microscopic transport cross-section in the region at some index into the uniform lethargy grid. More...
 
float getTransportMacroXS (float energy)
 Computes and returns the macroscopic transport cross-section in the region at some index into the uniform lethargy grid. More...
 
float getTransportMacroXS (int energy_index)
 Computes and returns the macroscopic transport cross-section in the region at some index into the uniform lethargy grid. More...
 
void setMaterial (Material *material)
 Set the material filling this region. More...
 
void setVolume (float volume)
 Sets the volume for this region $ (cm^3) $. More...
 
void setBucklingSquared (float buckling_squared)
 Sets the squared geometric buckling for the geometry. More...
 
virtual void collideNeutron (neutron *neutron)=0
 This method collides a neutron within the region. More...
 

Protected Attributes

char * _region_name
 
int _uid
 
Material_material
 
regionType _region_type
 
float _buckling_squared
 
float _volume
 

Static Protected Attributes

static int _n = 1
 

Detailed Description

The region class represents a region in 2D space.

The region class is a superclass allowing for subclasses representing infinited media, heterogeneous/homogeneous equivalance fuel/moderator regions, or even heterogeneous regions bounded by 2D quadratic surfaces, filled by a material.

Constructor & Destructor Documentation

Region::Region ( const char *  region_name = (char*)"")

Region constructor.

Sets defaults for the geometric parameters to 0.

Parameters
region_namethe (optional) name of the region
Region::~Region ( )
virtual

Empty destructor allows SWIG to cleanup memory for surfaces.

Destructor lets SWIG delete the materials and isotopes during garbage collection.

Member Function Documentation

virtual void Region::collideNeutron ( neutron neutron)
pure virtual

This method collides a neutron within the region.

This method encapsulates all of the neutron scattering physics which is further encapsulated by the material and isotope classes. This method must be implemented for each region subclass type.

Parameters
neutronthe neutron of interest

Implemented in BoundedRegion, EquivalenceRegion, and InfiniteMediumRegion.

bool Region::containsIsotope ( Isotope isotope)

Determines whether this region contains a particular isotope.

Parameters
isotopethe isotope of interest
Returns
true if the region contains the isotope; otherwise false
float Region::getAbsorptionMacroXS ( float  energy)

Computes and returns the macroscopic absorption cross-section in the region at energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the macroscopic absorpotion cross-section $ (cm^{-1}) $
float Region::getAbsorptionMacroXS ( int  energy_index)

Computes and returns the macroscopic absorption cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid
Returns
the macroscopic absorption cross-section $ (cm^{-1}) $
float Region::getAbsorptionMicroXS ( float  energy)

Computes and returns the microscopic absorption cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the microscopic absorption cross-section
float Region::getAbsorptionMicroXS ( int  energy_index)

Computes and returns the microscopic absorption cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid
Returns
the microscopic absorption cross-section
float Region::getBucklingSquared ( )

Returns the squared geometric buckling.

Returns
the geometric buckling squared
float Region::getCaptureMacroXS ( float  energy)

Computes and returns the macroscopic capture cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the macroscopic capture cross-section $ (cm^{-1}) $
float Region::getCaptureMacroXS ( int  energy_index)

Computes and returns the macroscopic capture cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid.
Returns
the macroscopic capture cross-section $ (cm^{-1}) $
float Region::getCaptureMicroXS ( float  energy)

Computes and returns the microscopic capture cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the microscopic capture cross-section
float Region::getCaptureMicroXS ( int  energy_index)

Computes and returns the microscopic capture cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid.
Returns
the microscopic capture cross-section
float Region::getElasticMacroXS ( float  energy)

Computes and returns the macroscopic elastic scattering cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the macroscopic elastic scattering cross-section $ (cm^{-1}) $
float Region::getElasticMacroXS ( int  energy_index)

Computes and returns the macroscopic elastic scattering cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid
Returns
the total macroscopic cross-section $ (cm^{-1}) $
float Region::getElasticMicroXS ( float  energy)

Computes and returns the microscopic elastic scattering cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the microscopic elastic scattering cross-section
float Region::getElasticMicroXS ( int  energy_index)

Computes and returns the microscopic elastic scattering cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid
Returns
the microscopic elastic scattering cross-section
float Region::getFissionMacroXS ( float  energy)

Computes and returns the macroscopic fission cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the macroscopic fission cross-section $ (cm^{-1}) $
float Region::getFissionMacroXS ( int  energy_index)

Computes and returns the macroscopic fission cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid.
Returns
the macroscopic capture cross-section $ (cm^{-1}) $
float Region::getFissionMicroXS ( float  energy)

Computes and returns the microscopic fission cross-section in the region at some energy (eV)

Parameters
energythe energy of interest (eV)
Returns
the microscopic fission cross-section
float Region::getFissionMicroXS ( int  energy_index)

Computes and returns the microscopic fission cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid.
Returns
the microscopic fission cross-section
Material * Region::getMaterial ( )

Returns a pointer to the material filling this region.

Returns
a pointer to the material filling the region
char * Region::getName ( )

Return the name of the region.

Returns
a character array representing this region's name
regionType Region::getRegionType ( )

Return the type of region.

Returns
the region type (INFINITE, EQUIVALENT_FUEL, etc.)
float Region::getTotalMacroXS ( float  energy)

Computes and returns the total macroscopic cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the total macroscopic cross-section $ (cm^{-1}) $
float Region::getTotalMacroXS ( int  energy_index)

Computes and returns the total macroscopic cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid
Returns
the total macroscopic cross-section $ (cm^{-1}) $
float Region::getTotalMicroXS ( float  energy)

Computes and returns the total microscopic cross-section in the region at some energy (eV).

Parameters
energythe energy of interest (eV)
Returns
the total microscopic cross-section
float Region::getTotalMicroXS ( int  energy_index)

Computes and returns the total microscopic cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid
Returns
the total microscopic cross-section
float Region::getTransportMacroXS ( float  energy)

Computes and returns the macroscopic transport cross-section in the region at some index into the uniform lethargy grid.

Parameters
energythe energy of interest (eV)
Returns
the macroscopic transport cross-section
float Region::getTransportMacroXS ( int  energy_index)

Computes and returns the macroscopic transport cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid.
Returns
the macroscopic transport cross-section
float Region::getTransportMicroXS ( float  energy)

Computes and returns the microscopic transport cross-section in the region at some index into the uniform lethargy grid.

Parameters
energythe energy of interest
Returns
the microscopic transport cross-section
float Region::getTransportMicroXS ( int  energy_index)

Computes and returns the microscopic transport cross-section in the region at some index into the uniform lethargy grid.

Parameters
energy_indexthe index into the uniform lethargy grid.
Returns
the microscopic transport cross-section
int Region::getUid ( ) const

Returns the unique ID auto-generated for the region.

Returns
a unique ID for the region
float Region::getVolume ( )

returns the volume of this Region $ (cm^3) $.

Returns
the region's volume
void Region::setBucklingSquared ( float  buckling_squared)

Sets the squared geometric buckling for the geometry.

This method also sets the bucklking squared for the material filling it.

Parameters
buckling_squaredthe squared geometric buckling
void Region::setMaterial ( Material material)

Set the material filling this region.

This method also increments the volume for the material by the volume occuppied by the region.

Parameters
materiala pointer to a material
void Region::setVolume ( float  volume)

Sets the volume for this region $ (cm^3) $.

Parameters
volumethe volume occuppied by this region

Member Data Documentation

float Region::_buckling_squared
protected

The squared geometric buckling

Material* Region::_material
protected

A pointer to the material filling the region

int Region::_n = 1
staticprotected

A static class variable to generate a UID for each new region

char* Region::_region_name
protected

The region's name

regionType Region::_region_type
protected

The type of region (INFINITE, EQUIVALNENCE, or BOUNDED)

int Region::_uid
protected

The region's unique identifier

float Region::_volume
protected

The volume occupied by the region in 2D space


The documentation for this class was generated from the following files: