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

The Surface represents a quadratic surface in the xy-plane. More...

#include "pinspec/src/Surface.h"

Inheritance diagram for Surface:
XPlane YPlane ZCylinder

Public Member Functions

 Surface (const char *surface_name=(char *)"")
 Surface class constructor. More...
 
virtual ~Surface ()
 Surface destructor.
 
char * getSurfaceName ()
 Return the name of the surface. More...
 
int getUid () const
 Returns the unique ID auto-generated for the surface. More...
 
boundaryType getBoundaryType () const
 Returns this surface's boundary type. More...
 
surfaceType getSurfaceType () const
 Returns this surface's type (XPLANE, YPLANE, CIRCLE, etc.) More...
 
void setBoundaryType (boundaryType type)
 Sets the boundary type for this Surface. More...
 
virtual float evaluate (neutron *neutron)=0
 Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to a quadratic surface $ f(x,y,z) $. More...
 
virtual float evaluate (float x, float y, float z)=0
 Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to a quadratic surface $ f(x,y,z) $. More...
 
virtual float computeParametrizedDistance (neutron *neutron)=0
 Computes the parametrized distance between a neutron at some location with some trajectory and this surface. More...
 
virtual bool onSurface (neutron *neutron)=0
 Determines whether or not a neutron at some location is on the surface. More...
 
virtual void reflectNeutron (neutron *neutron)=0
 Perfectly reflects a neutron at the surface for REFLECTIVE boundary conditions. More...
 

Protected Attributes

char * _surface_name
 
int _uid
 
surfaceType _surface_type
 
boundaryType _boundary_type
 

Static Protected Attributes

static int _n = 1
 

Detailed Description

The Surface represents a quadratic surface in the xy-plane.

The Surface is an abstract class with stub for the function calls needed to trace rays across a 2D geometry. Each surface type to be used in a simulation is a subclass of the Surface class

Constructor & Destructor Documentation

Surface::Surface ( const char *  surface_name = (char*)"")

Surface class constructor.

Parameters
surface_namethe (optional) name of the surface

By default, the constructor sets the surface boundary conditions to vacuum.

Member Function Documentation

virtual float Surface::computeParametrizedDistance ( neutron neutron)
pure virtual

Computes the parametrized distance between a neutron at some location with some trajectory and this surface.

This virtual class method must be implemented for each surface type to be used in a PINSPEC simulation.

Parameters
neutronthe neutron of interest

Implemented in ZCylinder, YPlane, and XPlane.

virtual float Surface::evaluate ( neutron neutron)
pure virtual

Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to a quadratic surface $ f(x,y,z) $.

Parameters
neutronthe neutron of interest

Implemented in ZCylinder, YPlane, and XPlane.

virtual float Surface::evaluate ( float  x,
float  y,
float  z 
)
pure virtual

Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to a quadratic surface $ f(x,y,z) $.

Parameters
xthe x-coordinate of interest
ythe y-coordinate of interest
zthe z-coordinate of interest

Implemented in ZCylinder, YPlane, and XPlane.

boundaryType Surface::getBoundaryType ( ) const

Returns this surface's boundary type.

Returns the surface's boundary type which can be REFLECTIVE, VACUUM, or INTERFACE.

Returns
Surface boundary type
char * Surface::getSurfaceName ( )

Return the name of the surface.

Returns
a character array representing this surface's name
surfaceType Surface::getSurfaceType ( ) const

Returns this surface's type (XPLANE, YPLANE, CIRCLE, etc.)

Returns
Surface type
int Surface::getUid ( ) const

Returns the unique ID auto-generated for the surface.

Returns
a unique ID for the surface
virtual bool Surface::onSurface ( neutron neutron)
pure virtual

Determines whether or not a neutron at some location is on the surface.

This virtual class method must be implemented for each surface type to be used in a PINSPEC simulation.

Parameters
neutronthe neutron of interest

Implemented in ZCylinder, YPlane, and XPlane.

virtual void Surface::reflectNeutron ( neutron neutron)
pure virtual

Perfectly reflects a neutron at the surface for REFLECTIVE boundary conditions.

This virtual class method must be implemented for each surface type to be used in a PINSPEC simulation.

Parameters
neutronthe neutron of interest

Implemented in ZCylinder, YPlane, and XPlane.

void Surface::setBoundaryType ( boundaryType  type)

Sets the boundary type for this Surface.

Sets the Surface's boundary type which can be REFLECTIVE, VACUUM, or INTERFACE).

Parameters
typethe boundary type

Member Data Documentation

boundaryType Surface::_boundary_type
protected

The boundary condition for this Surface

int Surface::_n = 1
staticprotected

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

char* Surface::_surface_name
protected

The surface's name

surfaceType Surface::_surface_type
protected

The type of surface

int Surface::_uid
protected

The surface's unique identifier


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