summaryrefslogtreecommitdiff
path: root/src/refinement
diff options
context:
space:
mode:
Diffstat (limited to 'src/refinement')
-rw-r--r--src/refinement/grid2D.h2
-rw-r--r--src/refinement/grid2D.hh10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/refinement/grid2D.h b/src/refinement/grid2D.h
index fda38ed..6d3579c 100644
--- a/src/refinement/grid2D.h
+++ b/src/refinement/grid2D.h
@@ -76,6 +76,8 @@ public:
CoarseCoupler2D<T,DESCRIPTOR>& addCoarseCoupling(
Grid2D<T,DESCRIPTOR>& fineGrid, Vector<T,2> origin, Vector<T,2> extend);
+ Vector<T,2> alignToGrid(Vector<T,2> physR) const;
+
Grid2D<T,DESCRIPTOR>& refine(IndicatorF2D<T>& domainF);
Grid2D<T,DESCRIPTOR>& refine(Vector<T,2> origin, Vector<T,2> extend);
diff --git a/src/refinement/grid2D.hh b/src/refinement/grid2D.hh
index 86c3102..d609746 100644
--- a/src/refinement/grid2D.hh
+++ b/src/refinement/grid2D.hh
@@ -169,13 +169,21 @@ Grid2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::refine(IndicatorF2D<T>& domainF)
new Grid2D<T,DESCRIPTOR>(
domainF,
2*getConverter().getResolution(),
- 2.0*getConverter().getLatticeRelaxationTime() - 0.5,
+ 2*getConverter().getLatticeRelaxationTime() - 0.5,
getConverter().getReynoldsNumber()
));
return *_fineGrids.back();
}
template <typename T, template<typename> class DESCRIPTOR>
+Vector<T,2> Grid2D<T,DESCRIPTOR>::alignToGrid(Vector<T,2> physR) const
+{
+ Vector<int,3> latticeR{};
+ _cuboids->getLatticeR(physR, latticeR);
+ return _cuboids->getPhysR(latticeR.toStdVector());
+}
+
+template <typename T, template<typename> class DESCRIPTOR>
Grid2D<T,DESCRIPTOR>& Grid2D<T,DESCRIPTOR>::refine(Vector<T,2> origin, Vector<T,2> extend)
{
IndicatorCuboid2D<T> fineCuboid(extend, origin);