Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethassogba committed Nov 26, 2024
1 parent 213f9e7 commit 2bbc1d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/demeter/common/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,13 @@ namespace Demeter {

void CheckOpenMP();

// auto watch =
// [&](std::vector<std::variant<std::reference_wrapper<Material>,
// std::reference_wrapper<Cell>,
// std::reference_wrapper<Lattice>>>&& vec) {
// for (const auto& v : vec) {
// std::visit([](auto&& v) { std::cout << v.get() << std::endl; }, v);
// }
// };

} // namespace Demeter
4 changes: 1 addition & 3 deletions src/demeter/model/lattice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ namespace Demeter {
std::string Lattice::print() const {
std::ostringstream s;
s << "Lattice:" << name_ << "\n";
// if cell, print the cells, else print the cells inside the lattices

// print names in a matrix view
// for (const auto& c : components_) {
// s += c.get().print(false);
// }
return s.str();
}
Expand Down
2 changes: 2 additions & 0 deletions src/demeter/model/lattice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class Lattice {
}
std::string print() const;

std::string_view name() const { return name_; }

private:
std::vector<FillType> components_; // TODO use matrix

Expand Down

0 comments on commit 2bbc1d8

Please sign in to comment.