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

The XPlane is a plane perpendicular to the y-axis. More...

#include "pinspec/src/Surface.h"

Inheritance diagram for XPlane:
Surface

Public Member Functions

 XPlane (const char *surface_name=(char *)"")
 The XPlane constructor. More...
 
virtual ~XPlane ()
 XPlane destructor.
 
float getX ()
 Returns the x-coordinate of the plane's intersection point with the x-axis. More...
 
void setX (float x)
 Sets the x-coordinate of the plane's intersection point with the x-axis. More...
 
float evaluate (neutron *neutron)
 Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to the quadratic surface representing this x-plane: $ f(x,y,z) = qx + d = x - x_0 $. More...
 
float evaluate (float x, float y, float z)
 Returns the evaluation of a 3D coordinate $ (x,y,z) $ with respect to the quadratic surface representing this x-plane: $ f(x,y,z) = qx + d = x - x_0 $. More...
 
float computeParametrizedDistance (neutron *neutron)
 Computes the parametrized distance to the XPlane along a neutron's trajectory. More...
 
bool onSurface (neutron *neutron)
 Checks whether a neutron is on the XPlane. More...
 
void reflectNeutron (neutron *neutron)
 Perfectly reflects a neutron at a xplane. More...
 
- Public Member Functions inherited from Surface
 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...
 

Private Attributes

float _x
 

Additional Inherited Members

- Protected Attributes inherited from Surface
char * _surface_name
 
int _uid
 
surfaceType _surface_type
 
boundaryType _boundary_type
 
- Static Protected Attributes inherited from Surface
static int _n = 1
 

Detailed Description

The XPlane is a plane perpendicular to the y-axis.

The XPlane represents planes perpendicular to the x-axis using the quadratic surface formulation. The XPlane is a Surface subclass.

Constructor & Destructor Documentation

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

The XPlane constructor.

Parameters
surface_namethe (optional) name of the surface

Assigns a default value of x=0 for the x-axis intersection point.

Member Function Documentation

float XPlane::computeParametrizedDistance ( neutron neutron)
virtual

Computes the parametrized distance to the XPlane along a neutron's trajectory.

The distance returned is a parametrized distance along the unit vectory defining the neutron's trajectory, not a Cartesian distance. If the neutron is traveling away from the surface then the distance returned will be infinity. The equation used to compute the parametrized distance $ d $ from a neutron at $ x $ traveling with component an x-component of its unit trajectory vector $ u $ to this xplane at $ x_0 $ is: $ d = \frac{x_0 - x}{u} $

Parameters
neutrona pointer to a neutron struct
Returns
the parametrized distance to the surface along the neutron's trajectory

Implements Surface.

float XPlane::evaluate ( neutron neutron)
virtual

Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to the quadratic surface representing this x-plane: $ f(x,y,z) = qx + d = x - x_0 $.

Parameters
neutronthe neutron of interest

Implements Surface.

float XPlane::evaluate ( float  x,
float  y,
float  z 
)
virtual

Returns the evaluation of a 3D coordinate $ (x,y,z) $ with respect to the quadratic surface representing this x-plane: $ f(x,y,z) = qx + d = x - x_0 $.

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

Implements Surface.

float XPlane::getX ( )

Returns the x-coordinate of the plane's intersection point with the x-axis.

Returns
the x-coordinate of the intersection point
bool XPlane::onSurface ( neutron neutron)
virtual

Checks whether a neutron is on the XPlane.

The threshold used to compute whether or not a neutron is on the on the XPlane is 1E-6 for the difference between the x-coordinate of the neutron's position and the location of the XPlane.

Parameters
neutronthe neutron of interest
Returns
true if on the XPlane, otherwise false

Implements Surface.

void XPlane::reflectNeutron ( neutron neutron)
virtual

Perfectly reflects a neutron at a xplane.

Parameters
neutronthe neutron of interest

Implements Surface.

void XPlane::setX ( float  x)

Sets the x-coordinate of the plane's intersection point with the x-axis.

Parameters
xthe x-coordinate of the intersectiont point

Member Data Documentation

float XPlane::_x
private

The location of the plane's intersection with the x-axis


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