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

A complement of a Region. More...

#include "src/Region.h"

Public Member Functions

 Complement ()
 Constructor sets the type of Region (COMPLEMENT).
 
void addNode (Region *node, bool clone=true)
 Add a node to the complement Region. More...
 
bool containsPoint (Point *point)
 Determines whether a Point is contained inside the Complement. 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.
 
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

A complement of a Region.

Member Function Documentation

◆ addNode()

void Complement::addNode ( Region node,
bool  clone = true 
)
virtual

Add a node to the complement Region.

NOTE: This method deep copies the Region and stores the copy. Any changes made to the Region will not be reflected in the Region copy stored by the Region. The clone boolean can be used to avoid this behavior. A complement may only have one node.

Parameters
nodea Region node to add to this Region
clonewhether to clone or not the node when adding it

Reimplemented from Region.

◆ containsPoint()

bool Complement::containsPoint ( Point point)
virtual

Determines whether a Point is contained inside the Complement.

Queries each of the Complement's nodes to determine if the Point is within the Complement. This point is only inside the Complement if not contained by the Complement's node.

Parameters
pointa pointer to a Point
Returns
true if the Point is inside the Complement; otherwise false

Implements Region.


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