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

Represents a Plane perpendicular to the xy-plane. More...

#include "src/Surface.h"

Public Member Functions

 Plane (const double A, const double B, const double C, const double D, const int id=0, const char *name="")
 Constructor. More...
 
double getMinX (int halfspace)
 Returns the minimum x value of -INFINITY. More...
 
double getMaxX (int halfspace)
 Returns the maximum x value of INFINITY. 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...
 
std::string toString ()
 Converts this Plane's attributes to a character array. 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.
 

Protected Attributes

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
 

Friends

class Surface
 
class ZCylinder
 

Additional Inherited Members

- Static Protected Attributes inherited from Surface
static int _n = 0
 

Detailed Description

Represents a Plane perpendicular to the xy-plane.

Constructor & Destructor Documentation

◆ Plane()

Plane::Plane ( const double  A,
const double  B,
const double  C,
const double  D,
const int  id = 0,
const char *  name = "" 
)

Constructor.

Parameters
Athe first coefficient in $ A * x + B * y + C * z + D = 0 $
Bthe second coefficient in $ A * x + B * y + C * z + D = 0 $
Cthe third coefficient in $ A * x + B * y + C * z + D = 0 $
Dthe fourth coefficient in $ A * x + B * y + C * z + D = 0 $
idthe optional Surface ID
namethe optional name of the Surface

Member Function Documentation

◆ evaluate()

double Plane::evaluate ( const Point point) const
inlinevirtual

Evaluate a Point using the Plane's quadratic Surface equation.

Parameters
pointa pointer to the Point of interest
Returns
the value of Point in the Plane's quadratic equation

Implements Surface.

◆ getA()

double Plane::getA ( )

Returns the A coefficient multiplying x in the surface equation.

Returns
the value for the A coefficient

◆ getB()

double Plane::getB ( )

Returns the B coefficient multiplying y in the surface equation.

Returns
the value for the B coefficient

◆ getC()

double Plane::getC ( )

Returns the C coefficient multiplying z in the surface equation.

Returns
the value for the C coefficient

◆ getD()

double Plane::getD ( )

Returns the D constant coefficient.

Returns
the value for the D coefficient

◆ getMaxX()

double Plane::getMaxX ( int  halfspace)
virtual

Returns the maximum x value of INFINITY.

Parameters
halfspacethe halfspace of the Surface to consider
Returns
the maximum x value of INFINITY

Implements Surface.

Reimplemented in XPlane.

◆ getMaxY()

double Plane::getMaxY ( int  halfspace)
virtual

Returns the maximum y value of INFINITY.

Parameters
halfspacethe halfspace of the Surface to consider
Returns
the maximum y value of INFINITY

Implements Surface.

Reimplemented in YPlane.

◆ getMaxZ()

double Plane::getMaxZ ( int  halfspace)
virtual

Returns the maximum z value of INFINITY.

Parameters
halfspacethe halfspace of the Surface to consider
Returns
the maximum z value of INFINITY

Implements Surface.

Reimplemented in ZPlane.

◆ getMinX()

double Plane::getMinX ( int  halfspace)
virtual

Returns the minimum x value of -INFINITY.

Parameters
halfspacethe halfspace of the Surface to consider
Returns
the minimum x value of -INFINITY

Implements Surface.

Reimplemented in XPlane.

◆ getMinY()

double Plane::getMinY ( int  halfspace)
virtual

Returns the minimum y value of -INFINITY.

Parameters
halfspacethe halfspace of the Surface to consider
Returns
the minimum y value of -INFINITY

Implements Surface.

Reimplemented in YPlane.

◆ getMinZ()

double Plane::getMinZ ( int  halfspace)
virtual

Returns the minimum z value of -INFINITY.

Parameters
halfspacethe halfspace of the Surface to consider
Returns
the minimum z value of -INFINITY

Implements Surface.

Reimplemented in ZPlane.

◆ intersection()

int Plane::intersection ( Point point,
double  azim,
double  polar,
Point points 
)
virtual

Finds the intersection Point with this Plane from a given Point and trajectory defined by an azim/polar.

Parameters
pointpointer to the Point of interest
azimthe azimuthal angle defining the trajectory in radians
polarthe polar angle defining the trajectory in radians
pointspointer to a Point to store the intersection Point
Returns
the number of intersection Points (0 or 1)

Implements Surface.

◆ toString()

std::string Plane::toString ( )
virtual

Converts this Plane's attributes to a character array.

The character array returned conatins the type of Plane (ie, PLANE) and the A, B, and C coefficients in the quadratic Surface equation.

Returns
a character array of this Plane's attributes

Implements Surface.

Reimplemented in ZPlane, YPlane, and XPlane.

Friends And Related Function Documentation

◆ Surface

friend class Surface
friend

The Plane is a friend of class Surface

◆ ZCylinder

friend class ZCylinder
friend

The Plane is a friend of class Zcylinder

Member Data Documentation

◆ _A

double Plane::_A
protected

The coefficient for the linear term in x

◆ _B

double Plane::_B
protected

The coefficient for the linear term in y

◆ _C

double Plane::_C
protected

The coefficient for the linear term in z

◆ _D

double Plane::_D
protected

The constant offset


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