minimc 0.5.1
Loading...
Searching...
No Matches
Cell Class Reference

A subset of \( \mathbb{R}^{3} \) defined by constructive solid geometry (CSG) surfaces. More...

#include <Cell.hpp>

Public Member Functions

 Cell (const pugi::xml_node &cell_node, const CSGSurfaceVector &all_surfaces, const MaterialVector &all_materials, const std::shared_ptr< const ScalarField > global_temperature) noexcept
 Constructs a Cell from an XML document. More...
 
bool Contains (const Point &p) const noexcept
 Returns true if the point lies inside this Cell.
 
std::tuple< std::shared_ptr< const CSGSurface >, RealNearestSurface (const Point &p, const Direction &d) const
 Finds the nearest CSGSurface from a point along a given direction. More...
 
bool operator== (const Cell &rhs) const noexcept
 Returns true if both Cell objects are the same object.
 

Public Attributes

const std::string name
 Unique, user-defined identifier (C++ Core Guidelines C.131)
 
const SurfaceSenses surface_senses
 All CSGSurface objects which make up this Cell. More...
 
const std::shared_ptr< const Materialmaterial
 Material this Cell is made of. A nullptr corresponds to a void.
 
const std::shared_ptr< const ScalarFieldtemperature
 Temperature of the Cell.
 

Detailed Description

A subset of \( \mathbb{R}^{3} \) defined by constructive solid geometry (CSG) surfaces.

Constructor & Destructor Documentation

◆ Cell()

Cell::Cell ( const pugi::xml_node &  cell_node,
const CSGSurfaceVector &  all_surfaces,
const MaterialVector &  all_materials,
const std::shared_ptr< const ScalarField global_temperature 
)
noexcept

Constructs a Cell from an XML document.

Parameters
cell_nodeCell node in XML document
all_surfacesCSGSurface objects which may appear in this Cell
all_materialsMaterial objects which may appear in this Cell
global_temperatureIf no temperature is found in the cell node, default to the global temperature

Member Function Documentation

◆ NearestSurface()

std::tuple< std::shared_ptr< const CSGSurface >, Real > Cell::NearestSurface ( const Point p,
const Direction d 
) const

Finds the nearest CSGSurface from a point along a given direction.

Parameters
pposition in the Cell
ddirection to search along
Exceptions
std::runtime_errorNo CSGSurface found
Returns
Returns a tuple to nearest CSGSurface and distance to it

Member Data Documentation

◆ surface_senses

const SurfaceSenses Cell::surface_senses

All CSGSurface objects which make up this Cell.

All CSGSurfaces have a CSGSurface::Contains method which returns true if a Point lies on the "negative" side of the CSGSurface. This map returns true if the Cell lies in the "negative" side of the CSGSurface and false otherwise.


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