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

An infinite rectangular prism aligned with the z-axis. More...

#include "src/Region.h"

Public Member Functions

 RectangularPrism (double width_x, double width_y, double origin_x=0., double origin_y=0., double width_z=3E300, double origin_z=0.)
 Constructor creates an Intersection of the Intersection of two XPlane and two YPlane (and two ZPlane in 3D) objects. More...
 
void setBoundaryType (boundaryType boundary_type)
 Sets the boundary condition type (ie., VACUUM, REFLECTIVE, etc) to assign to each of the planes bounding the prism. More...
 
- Public Member Functions inherited from Intersection
 Intersection ()
 Constructor sets the type of Region (INTERSECTION).
 
bool containsPoint (Point *point)
 Determines whether a Point is contained inside the Intersection. More...
 
- Public Member Functions inherited from Region
 Region ()
 Constructor sets a few pointers to NULL.
 
virtual ~Region ()
 Destructor clears vector of the nodes within the Region.
 
virtual void addNode (Region *node, bool clone=true)
 Add a node to the Region. More...
 
void removeHalfspace (Surface *surface, int halfspace)
 Removes a Node from this Region. More...
 
regionType getRegionType ()
 Return the type of Region (ie, UNION, INTERSECTION, etc). More...
 
void setParentRegion (Region *node)
 Set the parent of the current node/Region. More...
 
RegiongetParentRegion ()
 Get the parent of the current node/Region. More...
 
virtual std::vector< Region * > getNodes ()
 Return a vector of all of the Region's immediate nodes. More...
 
virtual std::vector< Region * > getAllNodes ()
 Return a vector of all of the Region's nodes. More...
 
virtual std::map< int, Halfspace * > getAllSurfaces ()
 Extracts a map of all Halfspaces contained in the Region. More...
 
virtual double getMinX ()
 Return the minimum reachable x-coordinate in the Region. More...
 
virtual double getMaxX ()
 Return the maximum reachable x-coordinate in the Region. More...
 
virtual double getMinY ()
 Return the minimum reachable y-coordinate in the Region. More...
 
virtual double getMaxY ()
 Return the maximum reachable y-coordinate in the Region. More...
 
virtual double getMinZ ()
 Return the minimum reachable z-coordinate in the Region. More...
 
virtual double getMaxZ ()
 Return the maximum reachable z-coordinate in the Region. More...
 
virtual boundaryType getMinXBoundaryType ()
 Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the minimum reachable x-coordinate in the Region. More...
 
virtual boundaryType getMaxXBoundaryType ()
 Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the maximum reachable x-coordinate in the Region. More...
 
virtual boundaryType getMinYBoundaryType ()
 Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the minimum reachable y-coordinate in the Region. More...
 
virtual boundaryType getMaxYBoundaryType ()
 Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the maximum reachable y-coordinate in the Region. More...
 
virtual boundaryType getMinZBoundaryType ()
 Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the minimum reachable z-coordinate in the Region. More...
 
virtual boundaryType getMaxZBoundaryType ()
 Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the maximum reachable z-coordinate in the Region. More...
 
virtual double minSurfaceDist (LocalCoords *coords)
 Computes the minimum distance to a Surface in the Region from a point with a given trajectory at a certain angle stored in a LocalCoords object. More...
 
virtual double minSurfaceDist (Point *point, double azim, double polar=M_PI_2)
 Computes the minimum distance to a Surface in the Region from a point with a given trajectory at a certain angle stored in a LocalCoords object. More...
 
virtual Regionclone ()
 Create a duplicate of the Region. More...
 

Additional Inherited Members

- Protected Attributes inherited from Region
regionType _region_type
 
std::vector< Region * > _nodes
 
Region_parent_region
 

Detailed Description

An infinite rectangular prism aligned with the z-axis.

Constructor & Destructor Documentation

◆ RectangularPrism()

RectangularPrism::RectangularPrism ( double  width_x,
double  width_y,
double  origin_x = 0.,
double  origin_y = 0.,
double  width_z = 3E300,
double  origin_z = 0. 
)

Constructor creates an Intersection of the Intersection of two XPlane and two YPlane (and two ZPlane in 3D) objects.

This is a special subclass of the Intersection which represents the interior of a rectangular prism aligned with th z-axis.

Parameters
width_xthe width of the prism along the x-axis (in cm)
width_ythe width of the prism along the y-axis (in cm)
origin_xthe center of the prism along the x-axis (in cm)
origin_ythe center of the prism along the y-axis (in cm)
width_zthe width of the prism along the z-axis (in cm)
origin_zthe center of the prism along the z-axis (in cm)
Returns
a pointer to an Intersection object

Member Function Documentation

◆ setBoundaryType()

void RectangularPrism::setBoundaryType ( boundaryType  boundary_type)

Sets the boundary condition type (ie., VACUUM, REFLECTIVE, etc) to assign to each of the planes bounding the prism.

Parameters
boundary_typethe boundary condition type for this Prism

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