summaryrefslogtreecommitdiff
path: root/apps/adrian/cylinder2d/outflow_refinement
diff options
context:
space:
mode:
Diffstat (limited to 'apps/adrian/cylinder2d/outflow_refinement')
-rw-r--r--apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp b/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp
index 8b6a49c..7e506c1 100644
--- a/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp
+++ b/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp
@@ -189,17 +189,15 @@ void setBoundaryValues(Grid2D<T,DESCRIPTOR>& grid, int iT)
}
}
-void getResults(const std::string& prefix,
- Grid2D<T,DESCRIPTOR>& grid,
+void getResults(Grid2D<T,DESCRIPTOR>& grid,
+ const std::string& prefix,
int iT)
{
- OstreamManager clout(std::cout,"getResults");
-
auto& converter = grid.getConverter();
auto& sLattice = grid.getSuperLattice();
auto& sGeometry = grid.getSuperGeometry();
- SuperVTMwriter2D<T> vtmWriter(prefix + "cylinder2d");
+ SuperVTMwriter2D<T> vtmWriter(prefix);
SuperLatticePhysVelocity2D<T,DESCRIPTOR> velocity(sLattice, converter);
SuperLatticePhysPressure2D<T,DESCRIPTOR> pressure(sLattice, converter);
SuperLatticeGeometry2D<T,DESCRIPTOR> geometry(sLattice, sGeometry);
@@ -333,9 +331,9 @@ int main(int argc, char* argv[])
timer.update(iT);
timer.printStep();
- getResults("level0_", coarseGrid, iT);
- getResults("level1_outflow_", fineOutflowGrid, iT);
- getResults("level2_outflow_", fineOutflowGrid2, iT);
+ coarseGrid.forEachGrid("cylinder2d", [&](Grid2D<T,DESCRIPTOR>& grid, const std::string& id) {
+ getResults(grid, id, iT);
+ });
takeMeasurements(coarseGrid);
}