summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/refinement/grid2D.h6
-rw-r--r--src/refinement/grid2D.hh17
2 files changed, 23 insertions, 0 deletions
diff --git a/src/refinement/grid2D.h b/src/refinement/grid2D.h
index f58a4ea..37e764a 100644
--- a/src/refinement/grid2D.h
+++ b/src/refinement/grid2D.h
@@ -77,6 +77,9 @@ protected:
std::unique_ptr<SuperGeometry2D<T>> _geometry;
std::unique_ptr<SuperLattice2D<T,DESCRIPTOR>> _lattice;
+ std::vector<std::unique_ptr<Dynamics<T,DESCRIPTOR>>> _dynamics;
+ std::vector<std::unique_ptr<sOnLatticeBoundaryCondition2D<T,DESCRIPTOR>>> _onLatticeBoundaryConditions;
+
std::vector<std::unique_ptr<RefiningGrid2D<T,DESCRIPTOR>>> _fineGrids;
std::vector<std::unique_ptr<FineCoupler2D<T,DESCRIPTOR>>> _fineCouplers;
@@ -92,6 +95,9 @@ public:
SuperGeometry2D<T>& getSuperGeometry();
SuperLattice2D<T,DESCRIPTOR>& getSuperLattice();
+ Dynamics<T,DESCRIPTOR>& addDynamics(std::unique_ptr<Dynamics<T,DESCRIPTOR>>&& dynamics);
+ sOnLatticeBoundaryCondition2D<T,DESCRIPTOR>& getOnLatticeBoundaryCondition();
+
void collideAndStream();
FineCoupler2D<T,DESCRIPTOR>& addFineCoupling(
diff --git a/src/refinement/grid2D.hh b/src/refinement/grid2D.hh
index f1caf84..941bff7 100644
--- a/src/refinement/grid2D.hh
+++ b/src/refinement/grid2D.hh
@@ -134,6 +134,23 @@ SuperLattice2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getSuperLattice()
}
template <typename T, template<typename> class DESCRIPTOR>
+Dynamics<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addDynamics(
+ std::unique_ptr<Dynamics<T,DESCRIPTOR>>&& dynamics)
+{
+ Dynamics<T,DESCRIPTOR>& ref = *dynamics;
+ _dynamics.emplace_back(std::move(dynamics));
+ return ref;
+}
+
+template <typename T, template<typename> class DESCRIPTOR>
+sOnLatticeBoundaryCondition2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getOnLatticeBoundaryCondition()
+{
+ _onLatticeBoundaryConditions.emplace_back(
+ new sOnLatticeBoundaryCondition2D<T,DESCRIPTOR>(getSuperLattice()));
+ return *_onLatticeBoundaryConditions.back();
+}
+
+template <typename T, template<typename> class DESCRIPTOR>
void Grid2D<T,DESCRIPTOR>::collideAndStream()
{
for ( auto& fineCoupler : _fineCouplers ) {