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

Represents a Cylinder with axis parallel to the z-axis. More...

#include "src/Surface.h"

Public Member Functions

 ZCylinder (const double x, const double y, const double radius, const int id=0, const char *name="")
 Constructor. More...
 
double getX0 ()
 Return the x-coordinate of the ZCylinder's center Point. More...
 
double getY0 ()
 Return the y-coordinate of the ZCylinder's center Point. More...
 
double getRadius ()
 Return the radius of the ZCylinder. More...
 
double getMinX (int halfspace)
 Returns the minimum x value for one of this ZCylinder's halfspaces. More...
 
double getMaxX (int halfspace)
 Returns the maximum x value for one of this ZCylinder's halfspaces. More...
 
double getMinY (int halfspace)
 Returns the minimum y value for one of this ZCylinder's halfspaces. More...
 
double getMaxY (int halfspace)
 Returns the maximum y value for one of this ZCylinder's halfspaces. 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 evaluate (const Point *point) const
 Evaluate a Point using the ZCylinder's quadratic Surface equation. More...
 
int intersection (Point *point, double azim, double polar, Point *points)
 Finds the intersection Point with this zcylinder from a given Point and trajectory defined by an azim/polar angles (0, 1, or 2 points). More...
 
std::string toString ()
 Converts this ZCylinder'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.
 

Friends

class Surface
 
class Plane
 

Additional Inherited Members

- 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 Cylinder with axis parallel to the z-axis.

Constructor & Destructor Documentation

◆ ZCylinder()

ZCylinder::ZCylinder ( const double  x,
const double  y,
const double  radius,
const int  id = 0,
const char *  name = "" 
)

Constructor.

Parameters
xthe x-coordinte of the ZCylinder center
ythe y-coordinate of the ZCylinder center
radiusthe radius of the ZCylinder
idthe optional Surface ID
namethe optional Surface name

Member Function Documentation

◆ evaluate()

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

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

Parameters
pointa pointer to the Point of interest
Returns
the value of Point in the equation

Implements Surface.

◆ getMaxX()

double ZCylinder::getMaxX ( int  halfspace)
virtual

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

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

Implements Surface.

◆ getMaxY()

double ZCylinder::getMaxY ( int  halfspace)
virtual

Returns the maximum y value for one of this ZCylinder's halfspaces.

Parameters
halfspacethe halfspace of the ZCylinder to consider
Returns
the maximum y value

Implements Surface.

◆ getMaxZ()

double ZCylinder::getMaxZ ( int  halfspace)
virtual

Returns the maximum z value of INFINITY.

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

Implements Surface.

◆ getMinX()

double ZCylinder::getMinX ( int  halfspace)
virtual

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

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

Implements Surface.

◆ getMinY()

double ZCylinder::getMinY ( int  halfspace)
virtual

Returns the minimum y value for one of this ZCylinder's halfspaces.

Parameters
halfspacethe halfspace of the ZCylinder to consider
Returns
the minimum y value

Implements Surface.

◆ getMinZ()

double ZCylinder::getMinZ ( int  halfspace)
virtual

Returns the minimum z value of -INFINITY.

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

Implements Surface.

◆ getRadius()

double ZCylinder::getRadius ( )
inline

Return the radius of the ZCylinder.

Returns
the radius of the ZCylinder

◆ getX0()

double ZCylinder::getX0 ( )

Return the x-coordinate of the ZCylinder's center Point.

Returns
the x-coordinate of the ZCylinder center

◆ getY0()

double ZCylinder::getY0 ( )

Return the y-coordinate of the ZCylinder's center Point.

Returns
the y-coordinate of the ZCylinder center

◆ intersection()

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

Finds the intersection Point with this zcylinder from a given Point and trajectory defined by an azim/polar angles (0, 1, or 2 points).

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 an array of Points to store intersection Points
Returns
the number of intersection Points (0 or 1)

Implements Surface.

◆ toString()

std::string ZCylinder::toString ( )
virtual

Converts this ZCylinder's attributes to a character array.

The character array returned contains the type of Plane (ie, ZCYLINDER) and the A, B, C, D and E coefficients in the quadratic Surface equation.

Returns
a character array of this ZCylinder's attributes

Implements Surface.

Friends And Related Function Documentation

◆ Plane

friend class Plane
friend

The ZCylinder is a friend of the Plane class

◆ Surface

friend class Surface
friend

The ZCylinder is a friend of the Surface class


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