15#include "gtest/gtest.h"
38 std::vector<std::vector<std::reference_wrapper<const CSGUniverse>>> universes,
39 const std::optional<OuterVariant> & outer = std::nullopt);
52 const std::optional<OuterVariant> & outer = std::nullopt);
64 std::unique_ptr<CSGLattice>
clone()
const override
66 return std::make_unique<CSGCartesianLattice>(*
this);
77 virtual std::unordered_map<std::string, AttributeVariant>
getAttributes()
const override;
86 virtual bool isValidIndex(
const std::pair<int, int> index)
const override;
96 std::vector<std::vector<std::reference_wrapper<const CSGUniverse>>> universes)
const override;
136 std::vector<std::vector<std::reference_wrapper<const CSGUniverse>>> universes)
override;
149#ifdef MOOSE_UNIT_TEST
CSGBase creates an internal representation of a Constructive Solid Geometry (CSG) model.
CSGCartesianLattice is the class for constructing regular Cartesian lattices of CSGUniverses.
FRIEND_TEST(CSGLatticeTest, testCartSetUniverseAtIndex)
FRIEND_TEST(CSGLatticeTest, testEmptyToFilled)
unsigned int getNRows() const
get the number of rows
virtual bool isValidIndex(const std::pair< int, int > index) const override
Checks if the given index location (row, column) is a valid index for the lattice.
virtual ~CSGCartesianLattice()=default
Destructor.
unsigned int getNCols() const
get number of columns
virtual void setUniverses(std::vector< std::vector< std::reference_wrapper< const CSGUniverse > > > universes) override
set the universes that define the lattice layout
virtual bool compareAttributes(const CSGLattice &other) const override
compare the attributes returned in getAttributes of this lattice to another lattice
unsigned int _ncol
number of elements in the second direction (columns)
virtual std::unordered_map< std::string, AttributeVariant > getAttributes() const override
Get attributes that define the lattice (excluding the universe map).
void setPitch(Real pitch)
set the pitch of the lattice
virtual bool isValidUniverseMap(std::vector< std::vector< std::reference_wrapper< const CSGUniverse > > > universes) const override
check that any provided list of list of CSGUniverses are the correct dimensions.
std::unique_ptr< CSGLattice > clone() const override
clone this Cartesian lattice
FRIEND_TEST(CSGLatticeTest, testCartLatticeEquality)
Real getPitch() const
get lattice pitch
FRIEND_TEST(CSGLatticeTest, testCartSetUniverses)
Friends for unit testing.
unsigned int _nrow
number of elements in the first dimension (rows)
CSGLattice is the abstract class for defining lattices.