From d316b74c25ea98d0145a9adad4ff9953f07581e4 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 1 May 2019 22:05:06 +0200 Subject: Adapt refinement apps to meta-descriptor --- apps/adrian/cylinder2d/optimized_grid/cylinder2d.cpp | 4 +--- apps/adrian/cylinder2d/optimized_grid_n20/cylinder2d.cpp | 4 +--- apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp | 4 +--- apps/adrian/cylinder2d/playground/cylinder2d.cpp | 4 +--- apps/adrian/poiseuille2d/poiseuille2d.cpp | 12 +++++------- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/apps/adrian/cylinder2d/optimized_grid/cylinder2d.cpp b/apps/adrian/cylinder2d/optimized_grid/cylinder2d.cpp index 16fb95c..640311d 100644 --- a/apps/adrian/cylinder2d/optimized_grid/cylinder2d.cpp +++ b/apps/adrian/cylinder2d/optimized_grid/cylinder2d.cpp @@ -24,15 +24,13 @@ */ #include "olb2D.h" -#ifndef OLB_PRECOMPILED #include "olb2D.hh" -#endif using namespace olb; typedef double T; -#define DESCRIPTOR descriptors::D2Q9Descriptor +#define DESCRIPTOR descriptors::D2Q9<> /// Setup geometry relative to cylinder diameter as defined by [SchaeferTurek96] const T cylinderD = 0.1; diff --git a/apps/adrian/cylinder2d/optimized_grid_n20/cylinder2d.cpp b/apps/adrian/cylinder2d/optimized_grid_n20/cylinder2d.cpp index e4b0c5f..dffcc50 100644 --- a/apps/adrian/cylinder2d/optimized_grid_n20/cylinder2d.cpp +++ b/apps/adrian/cylinder2d/optimized_grid_n20/cylinder2d.cpp @@ -24,15 +24,13 @@ */ #include "olb2D.h" -#ifndef OLB_PRECOMPILED #include "olb2D.hh" -#endif using namespace olb; typedef double T; -#define DESCRIPTOR descriptors::D2Q9Descriptor +#define DESCRIPTOR descriptors::D2Q9<> /// Setup geometry relative to cylinder diameter as defined by [SchaeferTurek96] const T cylinderD = 0.1; diff --git a/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp b/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp index 5a6725b..0a601e0 100644 --- a/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp +++ b/apps/adrian/cylinder2d/outflow_refinement/cylinder2d.cpp @@ -24,15 +24,13 @@ */ #include "olb2D.h" -#ifndef OLB_PRECOMPILED #include "olb2D.hh" -#endif using namespace olb; typedef double T; -#define DESCRIPTOR descriptors::D2Q9Descriptor +#define DESCRIPTOR descriptors::D2Q9<> /// Setup geometry relative to cylinder diameter as defined by [SchaeferTurek96] const T cylinderD = 0.1; diff --git a/apps/adrian/cylinder2d/playground/cylinder2d.cpp b/apps/adrian/cylinder2d/playground/cylinder2d.cpp index c3c5c1b..3523161 100644 --- a/apps/adrian/cylinder2d/playground/cylinder2d.cpp +++ b/apps/adrian/cylinder2d/playground/cylinder2d.cpp @@ -24,9 +24,7 @@ */ #include "olb2D.h" -#ifndef OLB_PRECOMPILED #include "olb2D.hh" -#endif #include @@ -34,7 +32,7 @@ using namespace olb; typedef double T; -#define DESCRIPTOR descriptors::D2Q9Descriptor +#define DESCRIPTOR descriptors::D2Q9<> /// Setup geometry relative to cylinder diameter as defined by [SchaeferTurek96] const T cylinderD = 0.1; diff --git a/apps/adrian/poiseuille2d/poiseuille2d.cpp b/apps/adrian/poiseuille2d/poiseuille2d.cpp index d4d8e0f..81870a8 100644 --- a/apps/adrian/poiseuille2d/poiseuille2d.cpp +++ b/apps/adrian/poiseuille2d/poiseuille2d.cpp @@ -24,9 +24,7 @@ */ #include "olb2D.h" -#ifndef OLB_PRECOMPILED #include "olb2D.hh" -#endif #include @@ -34,7 +32,7 @@ using namespace olb; typedef double T; -#define DESCRIPTOR descriptors::D2Q9Descriptor +#define DESCRIPTOR descriptors::D2Q9<> const T lx = 4.0; // length of the channel const T ly = 1.0; // height of the channel @@ -123,7 +121,7 @@ void prepareLattice(Grid2D& grid) const T Lx = converter.getLatticeLength(lx); const T Ly = converter.getLatticeLength(ly); const T p0 = 8.*converter.getLatticeViscosity()*converter.getCharLatticeVelocity()*Lx/(Ly*Ly); - AnalyticalLinear2D rho(-p0/lx*DESCRIPTOR::invCs2, 0, p0*DESCRIPTOR::invCs2+1); + AnalyticalLinear2D rho(-p0/lx*descriptors::invCs2(), 0, p0*descriptors::invCs2()+1); const T maxVelocity = converter.getCharLatticeVelocity(); const T radius = ly/2; @@ -248,8 +246,8 @@ int main(int argc, char* argv[]) prepareLattice(fineGrid); - clout << "Total number of active cells: " << coarseGrid.getActiveVoxelN() << endl; - clout << "starting simulation..." << endl; + clout << "Total number of active cells: " << coarseGrid.getActiveVoxelN() << std::endl; + clout << "starting simulation..." << std::endl; Timer timer( coarseGrid.getConverter().getLatticeTime(maxPhysT), coarseGrid.getSuperGeometry().getStatistics().getNvoxel()); @@ -260,7 +258,7 @@ int main(int argc, char* argv[]) for (int iT = 0; iT < coarseGrid.getConverter().getLatticeTime(maxPhysT); ++iT) { if (converge.hasConverged()) { - clout << "Simulation converged." << endl; + clout << "Simulation converged." << std::endl; break; } -- cgit v1.2.3