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

Represents the state of a nuclear system. More...

#include <World.hpp>

Public Member Functions

 World (const pugi::xml_node &root)
 Constructs a World from an XML document.
 
const CellFindCellContaining (const Point &p) const
 Returns the current Cell occupied by a given Point. More...
 
bool HasConstantTemperature () const noexcept
 Returns true if global temperature has no spatial dependence. More...
 
std::shared_ptr< const CSGSurfaceFindSurfaceByName (const std::string &name) const
 Returns the CSGSurface with the given name. More...
 
std::shared_ptr< const NuclideFindNuclideByName (const std::string &name) const
 Returns the Nuclide with the given name. More...
 

Public Attributes

const std::shared_ptr< const ScalarFieldtemperature
 Global temperature field, if present.
 
const std::vector< Cellcells
 Cells that appear in the World (C++ Core Guidelines C.131)
 

Detailed Description

Represents the state of a nuclear system.

Manages the construction of all Surface, Nuclide, Material, and Cell objects. Access to shared members is given by World when necessary.

Todo:
Consider using the Immediately Invoked Function Expression (IIFE) idiom for construction of const members

Member Function Documentation

◆ FindCellContaining()

const Cell & World::FindCellContaining ( const Point p) const

Returns the current Cell occupied by a given Point.

Todo:
More than one Cell may contain a Particle. This should be checked during input parsing if possible.

◆ FindNuclideByName()

std::shared_ptr< const Nuclide > World::FindNuclideByName ( const std::string &  name) const

Returns the Nuclide with the given name.

Exceptions
std::runtime_errorNuclide with the given name not found
Todo:
Template this and FindSurfaceByName

◆ FindSurfaceByName()

std::shared_ptr< const CSGSurface > World::FindSurfaceByName ( const std::string &  name) const

Returns the CSGSurface with the given name.

Exceptions
std::runtime_errorCSGSurface with given name not found
Todo:
Template this and FindNuclideByName

◆ HasConstantTemperature()

bool World::HasConstantTemperature ( ) const
noexcept

Returns true if global temperature has no spatial dependence.

Todo:
Check each Cell if it has constant temperature dependence

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