diff --git a/README.md b/README.md index f4db49e..7030965 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ The physics is coded in C++, with Python as user interface for easy and fast usa - [ ] Write full benchmark - [ ] In C++. - [ ] In Python. +- [ ] Mesh refiner, rings and sectors for cell - [ ] Enable users to test the lib with codespace and notebooks. - [ ] GPU offload. diff --git a/examples/main.cpp b/examples/main.cpp index f8870b7..e643a1b 100644 --- a/examples/main.cpp +++ b/examples/main.cpp @@ -10,6 +10,7 @@ int main() { CheckOpenMP(); + // Define materials ArrayXd sigma_t{{0.222222, 0.833333}}; ArrayXXd sigma_s{{0.00, 0.02}, {0.00, 0.00}}; ArrayXd sigma_a{{0.010120, 0.080032}}; @@ -34,6 +35,7 @@ int main() { for (const auto* m : {&UO2, &M4, &H2O}) std::cout << *m << '\n'; std::cout << '\n'; + // Define cells double side = 1.0; Cell UO2cell(side, {0.5}, {UO2, H2O}, "UO2"); Cell M4cell(side, {0.4, 0.6}, {M4, UO2, H2O}, "M4"); @@ -42,13 +44,26 @@ int main() { for (const auto* c : {&UO2cell, &M4cell, &H2Ocell}) std::cout << *c << '\n'; std::cout << '\n'; + // Define assemblies Lattice assm00{{UO2cell, H2Ocell, UO2cell, H2Ocell}, "assm00"}; Lattice assm01{{M4cell, UO2cell, H2Ocell, H2Ocell}, "assm01"}; Lattice assm10{{UO2cell, H2Ocell, UO2cell, M4cell}, "assm10"}; Lattice assm11{{UO2cell, M4cell, H2Ocell, UO2cell}, "assm11"}; + // Define core Lattice core{{assm00, assm01, assm10, assm11}, "core"}; std::cout << core << '\n'; + // Set boundary conditions + // core.BoundaryCondition(BoundarySide::xmin, BoundaryCondition::Vacuum); + // core.BoundaryCondition(BoundarySide::xmax, BoundaryCondition::Reflection); + + // Define solver and solve the transport equation + // SNConfig sn(2); // SN type, order + // FEMConfig dg(2); // fem type, order + // Solver solver(sn, dg); + // solver.geometry(core); + // solver.solve(); + return 0; } \ No newline at end of file diff --git a/src/demeter/model.hpp b/src/demeter/model.hpp index fe31217..52fda22 100644 --- a/src/demeter/model.hpp +++ b/src/demeter/model.hpp @@ -2,4 +2,5 @@ #include "model/cell.hpp" #include "model/material.hpp" -#include "model/lattice.hpp" \ No newline at end of file +#include "model/lattice.hpp" +#include "model/boundary.hpp" \ No newline at end of file diff --git a/src/demeter/model/boundary.hpp b/src/demeter/model/boundary.hpp new file mode 100644 index 0000000..8769305 --- /dev/null +++ b/src/demeter/model/boundary.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "demeter/common.hpp" +#include "demeter/model/lattice.hpp" + +namespace Demeter { + +/** + * @brief Possible boundary condition + */ +enum class BoundaryCondition { Vacuum, Reflection }; + +/** + * @brief Possible side of a lattice + */ +enum class BoundarySide { + xmin, + xmax, + ymin, + ymax, + zmin, + zmax +}; // TODO diagonal + +} // namespace Demeter \ No newline at end of file diff --git a/src/demeter/solve/solver.hpp b/src/demeter/solve/solver.hpp new file mode 100644 index 0000000..ad3d651 --- /dev/null +++ b/src/demeter/solve/solver.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include "demeter/common.hpp" +#include "demeter/model/lattice.hpp" + +namespace Demeter { + +class Solver { + public: + +}; +} // namespace Demeter \ No newline at end of file