diff options
Diffstat (limited to 'src/refinement/grid2D.hh')
-rw-r--r-- | src/refinement/grid2D.hh | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/src/refinement/grid2D.hh b/src/refinement/grid2D.hh index 4f76896..d4310e5 100644 --- a/src/refinement/grid2D.hh +++ b/src/refinement/grid2D.hh @@ -28,12 +28,14 @@ #include "coupler2D.hh" #include "utilities/vectorHelpers.h" +#include "boundary/superBoundaryCondition2D.h" +#include "boundary/superOffBoundaryCondition2D.h" #include "communication/heuristicLoadBalancer.h" namespace olb { -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Grid2D<T,DESCRIPTOR>::Grid2D(FunctorPtr<IndicatorF2D<T>>&& domainF, RelaxationTime<T> tau, int resolution, @@ -68,7 +70,7 @@ Grid2D<T,DESCRIPTOR>::Grid2D(FunctorPtr<IndicatorF2D<T>>&& domainF, _converter->print(); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Grid2D<T,DESCRIPTOR>::Grid2D(FunctorPtr<IndicatorF2D<T>>&& domainF, LatticeVelocity<T> latticeVelocity, int resolution, @@ -103,7 +105,7 @@ Grid2D<T,DESCRIPTOR>::Grid2D(FunctorPtr<IndicatorF2D<T>>&& domainF, _converter->print(); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Grid2D<T,DESCRIPTOR>::Grid2D( FunctorPtr<IndicatorF2D<T>>&& domainF, RelaxationTime<T> tau, @@ -115,7 +117,7 @@ Grid2D<T,DESCRIPTOR>::Grid2D( Characteristics<T>(re)) { } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Grid2D<T,DESCRIPTOR>::Grid2D( FunctorPtr<IndicatorF2D<T>>&& domainF, LatticeVelocity<T> latticeVelocity, @@ -127,43 +129,43 @@ Grid2D<T,DESCRIPTOR>::Grid2D( Characteristics<T>(re)) { } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Characteristics<T> Grid2D<T,DESCRIPTOR>::getCharacteristics() const { return _characteristics; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> UnitConverter<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getConverter() { return *_converter; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> CuboidGeometry2D<T>& Grid2D<T,DESCRIPTOR>::getCuboidGeometry() { return *_cuboids; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> LoadBalancer<T>& Grid2D<T,DESCRIPTOR>::getLoadBalancer() { return *_balancer; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> SuperGeometry2D<T>& Grid2D<T,DESCRIPTOR>::getSuperGeometry() { return *_geometry; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> SuperLattice2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getSuperLattice() { return *_lattice; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Dynamics<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addDynamics( std::unique_ptr<Dynamics<T,DESCRIPTOR>>&& dynamics) { @@ -172,7 +174,7 @@ Dynamics<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addDynamics( return ref; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> sOnLatticeBoundaryCondition2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getOnLatticeBoundaryCondition() { _onLatticeBoundaryConditions.emplace_back( @@ -180,7 +182,7 @@ sOnLatticeBoundaryCondition2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getOnLatticeB return *_onLatticeBoundaryConditions.back(); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> sOffLatticeBoundaryCondition2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getOffLatticeBoundaryCondition() { _offLatticeBoundaryConditions.emplace_back( @@ -188,7 +190,7 @@ sOffLatticeBoundaryCondition2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::getOffLattic return *_offLatticeBoundaryConditions.back(); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> void Grid2D<T,DESCRIPTOR>::collideAndStream() { for ( auto& fineCoupler : _fineCouplers ) { @@ -220,7 +222,7 @@ void Grid2D<T,DESCRIPTOR>::collideAndStream() } } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> FineCoupler2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addFineCoupling( Grid2D<T,DESCRIPTOR>& fineGrid, Vector<T,2> origin, Vector<T,2> extend) { @@ -230,7 +232,7 @@ FineCoupler2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addFineCoupling( return *_fineCouplers.back(); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> CoarseCoupler2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addCoarseCoupling( Grid2D<T,DESCRIPTOR>& fineGrid, Vector<T,2> origin, Vector<T,2> extend) { @@ -240,7 +242,7 @@ CoarseCoupler2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::addCoarseCoupling( return *_coarseCouplers.back(); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Vector<T,2> Grid2D<T,DESCRIPTOR>::alignOriginToGrid(Vector<T,2> physR) const { Vector<int,3> latticeR{}; @@ -248,7 +250,7 @@ Vector<T,2> Grid2D<T,DESCRIPTOR>::alignOriginToGrid(Vector<T,2> physR) const return _cuboids->getPhysR(latticeR.toStdVector()); } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Vector<T,2> Grid2D<T,DESCRIPTOR>::alignExtendToGrid(Vector<T,2> extend) const { const T deltaX = _converter->getPhysDeltaX(); @@ -258,7 +260,7 @@ Vector<T,2> Grid2D<T,DESCRIPTOR>::alignExtendToGrid(Vector<T,2> extend) const }; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> void Grid2D<T,DESCRIPTOR>::forEachGrid(std::function<void(Grid2D<T,DESCRIPTOR>&)>&& f) { f(*this); @@ -267,7 +269,7 @@ void Grid2D<T,DESCRIPTOR>::forEachGrid(std::function<void(Grid2D<T,DESCRIPTOR>&) } } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> void Grid2D<T,DESCRIPTOR>::forEachGrid( const std::string& id, std::function<void(Grid2D<T,DESCRIPTOR>&,const std::string&)>&& f) @@ -280,7 +282,7 @@ void Grid2D<T,DESCRIPTOR>::forEachGrid( } } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Grid2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::locate(Vector<T,2> pos) { int iC; @@ -292,7 +294,7 @@ Grid2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::locate(Vector<T,2> pos) return *this; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> std::size_t Grid2D<T,DESCRIPTOR>::getActiveVoxelN() const { std::size_t n = _geometry->getStatistics().getNvoxel(); @@ -302,7 +304,7 @@ std::size_t Grid2D<T,DESCRIPTOR>::getActiveVoxelN() const return n; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> RefiningGrid2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::refine( Vector<T,2> wantedOrigin, Vector<T,2> wantedExtend, bool addCouplers) { @@ -348,7 +350,7 @@ RefiningGrid2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::refine( } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> RefiningGrid2D<T,DESCRIPTOR>::RefiningGrid2D( Grid2D<T,DESCRIPTOR>& parentGrid, Vector<T,2> origin, Vector<T,2> extend): Grid2D<T,DESCRIPTOR>( @@ -360,19 +362,19 @@ RefiningGrid2D<T,DESCRIPTOR>::RefiningGrid2D( _extend(extend), _parentGrid(parentGrid) { } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Vector<T,2> RefiningGrid2D<T,DESCRIPTOR>::getOrigin() const { return _origin; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> Vector<T,2> RefiningGrid2D<T,DESCRIPTOR>::getExtend() const { return _extend; } -template <typename T, template<typename> class DESCRIPTOR> +template <typename T, typename DESCRIPTOR> std::unique_ptr<IndicatorF2D<T>> RefiningGrid2D<T,DESCRIPTOR>::getRefinedOverlap() const { const T coarseDeltaX = _parentGrid.getConverter().getPhysDeltaX(); |