diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/boundary_conditions.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/boundary_conditions.cc b/src/boundary_conditions.cc index 08b157c..3f54e85 100644 --- a/src/boundary_conditions.cc +++ b/src/boundary_conditions.cc @@ -32,12 +32,7 @@ void computeWallCell(DataCellBuffer& pop, Vector<std::size_t> cell, Vector<int> void computeMovingWallCell(DataCellBuffer& pop, Vector<std::size_t> cell, Vector<int> normal, Vector<double> u) { const auto [neighborA, neighborB] = neighbors(normal); - const double rho = pop.curr(cell).get(-1,0) + pop.curr(cell).get(0,0) + pop.curr(cell).get(1,0) - + 2.*( - pop.curr(cell).get(-neighborA) + - pop.curr(cell).get(-normal ) + - pop.curr(cell).get(-neighborB) - ); + const double rho = static_cast<Cell&>(pop.curr(cell)).sum(); pop.curr(cell).get(neighborA) = pop.curr(cell).get(-neighborA) - (6. * weight.get(-neighborA) * rho * (-neighborA * u)); pop.curr(cell).get(normal ) = pop.curr(cell).get(-normal ) - (6. * weight.get(-normal) * rho * (-normal * u)); |