An open source method of characteristics neutron transport code.
XPlane Class Reference

Represents a Plane perpendicular to the x-axis. More...

#include "src/Surface.h"

Public Member Functions

 XPlane (const double x, const int id=0, const char *name="")
 Constructor for a Plane perpendicular to the x-axis. More...
 
void setX (const double x)
 Set the location of this XPlane on the x-axis. More...
 
double getX ()
 Returns the location of the XPlane on the x-axis. More...
 
double getMinX (int halfspace)
 Returns the minimum x value for one of this XPlane's halfspaces. More...
 
double getMaxX (int halfspace)
 Returns the maximum x value for one of this XPlane's halfspaces. More...
 
std::string toString ()
 Converts this XPlane's attributes to a character array. More...
 
- Public Member Functions inherited from Plane
 Plane (const double A, const double B, const double C, const double D, const int id=0, const char *name="")
 Constructor. More...
 
double getMinY (int halfspace)
 Returns the minimum y value of -INFINITY. More...
 
double getMaxY (int halfspace)
 Returns the maximum y value of INFINITY. More...
 
double getMinZ (int halfspace)
 Returns the minimum z value of -INFINITY. More...
 
double getMaxZ (int halfspace)
 Returns the maximum z value of INFINITY. More...
 
double getA ()
 Returns the A coefficient multiplying x in the surface equation. More...
 
double getB ()
 Returns the B coefficient multiplying y in the surface equation. More...
 
double getC ()
 Returns the C coefficient multiplying z in the surface equation. More...
 
double getD ()
 Returns the D constant coefficient. More...
 
double evaluate (const Point *point) const
 Evaluate a Point using the Plane's quadratic Surface equation. More...
 
int intersection (Point *point, double azim, double polar, Point *points)
 Finds the intersection Point with this Plane from a given Point and trajectory defined by an azim/polar. More...
 
- Public Member Functions inherited from Surface
 Surface (const int id=0, const char *name="")
 Constructor assigns unique ID and user-defined ID for a Surface. More...
 
virtual ~Surface ()
 Destructor.
 
int getUid () const
 Return the Surface's unique ID. More...
 
int getId () const
 Return the Surface's user-defined ID. More...
 
char * getName () const
 Return the user-defined name of the Surface. More...
 
surfaceType getSurfaceType ()
 Return the type of Surface (ie, XPLANE, ZYCLINDER, etc). More...
 
boundaryType getBoundaryType ()
 Returns the type of boundary conditions for this Surface (REFLECTIVE, VACUUM or BOUNDARY_NONE). More...
 
double getMin (int axis, int halfspace)
 Returns the minimum coordinate in the axis direction of the space defined by halfspace and this surface. More...
 
double getMax (int axis, int halfspace)
 Returns the maximum coordinate in the axis direction of the space defined by halfspace and this surface. More...
 
void setName (const char *name)
 Sets the name of the Surface. More...
 
void setBoundaryType (const boundaryType boundary_type)
 Sets the boundary condition type (ie, VACUUM or REFLECTIVE) for this Surface. More...
 
void addNeighborCell (int halfspace, Cell *cell)
 Adds a neighbor Cell to this Surface's collection of neighbors. More...
 
bool isPointOnSurface (Point *point)
 Return true or false if a Point is on or off of a Surface. More...
 
bool isCoordOnSurface (LocalCoords *coord)
 Return true or false if a LocalCoord is on or off of a Surface. More...
 
double getMinDistance (Point *point, double azim, double polar)
 Finds the minimum distance to a Surface. More...
 
double getMinDistance (LocalCoords *coord)
 Finds the minimum distance to a Surface. More...
 
void printString ()
 Prints a string representation of all of the Surface's objects to the console.
 

Additional Inherited Members

- Protected Attributes inherited from Plane
double _A
 
double _B
 
double _C
 
double _D
 
- Protected Attributes inherited from Surface
int _uid
 
int _id
 
char * _name
 
surfaceType _surface_type
 
boundaryType _boundary_type
 
std::map< int, std::vector< Cell * > *> _neighbors
 
- Static Protected Attributes inherited from Surface
static int _n = 0
 

Detailed Description

Represents a Plane perpendicular to the x-axis.

Constructor & Destructor Documentation

◆ XPlane()

XPlane::XPlane ( const double  x,
const int  id = 0,
const char *  name = "" 
)

Constructor for a Plane perpendicular to the x-axis.

Parameters
xthe location of the Plane along the x-axis
idthe optional Surface id
namethe optional name of the XPlane

Member Function Documentation

◆ getMaxX()

double XPlane::getMaxX ( int  halfspace)
virtual

Returns the maximum x value for one of this XPlane's halfspaces.

Parameters
halfspacethe halfspace of the XPlane to consider
Returns
the maximum x value

Reimplemented from Plane.

◆ getMinX()

double XPlane::getMinX ( int  halfspace)
virtual

Returns the minimum x value for one of this XPlane's halfspaces.

Parameters
halfspacethe halfspace of the XPlane to consider
Returns
the minimum x value

Reimplemented from Plane.

◆ getX()

double XPlane::getX ( )

Returns the location of the XPlane on the x-axis.

Returns
the location of the XPlane on the x-axis

◆ setX()

void XPlane::setX ( const double  x)

Set the location of this XPlane on the x-axis.

Parameters
xthe location of the XPlane on the x-axis

◆ toString()

std::string XPlane::toString ( )
virtual

Converts this XPlane's attributes to a character array.

The character array returned conatins the type of Plane (ie, XPLANE) and the A, B, and C coefficients in the quadratic Surface equation and the location of the Plane on the x-axis.

Returns
a character array of this XPlane's attributes

Reimplemented from Plane.


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