14 #ifdef MOOSE_UNIT_TEST 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 153 FRIEND_TEST(CSGLatticeTest, testCartSetUniverseAtIndex);
155 FRIEND_TEST(CSGLatticeTest, testCartLatticeEquality);
std::string name(const ElemQuality q)
void setPitch(Real pitch)
set the pitch of the lattice
unsigned int getNRows() const
get the number of rows
Real getPitch() const
get lattice pitch
unsigned int getNCols() const
get number of columns
FRIEND_TEST(CSGLatticeTest, testCartSetUniverses)
Friends for unit testing.
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).
CSGLattice is the abstract class for defining lattices.
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.
virtual bool compareAttributes(const CSGLattice &other) const override
compare the attributes returned in getAttributes of this lattice to another lattice ...
virtual void setUniverses(std::vector< std::vector< std::reference_wrapper< const CSGUniverse >>> universes) override
set the universes that define the lattice layout
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CSGCartesianLattice(const std::string &name, const Real pitch, std::vector< std::vector< std::reference_wrapper< const CSGUniverse >>> universes, const std::optional< OuterVariant > &outer=std::nullopt)
Construct a new CSGCartesianLattice object from the map of universes provided.
std::unique_ptr< CSGLattice > clone() const override
clone this Cartesian lattice
unsigned int _nrow
number of elements in the first dimension (rows)
CSGCartesianLattice is the class for constructing regular Cartesian lattices of CSGUniverses.
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.
CSGBase creates an internal representation of a Constructive Solid Geometry (CSG) model...
virtual ~CSGCartesianLattice()=default
Destructor.