From acdba1d0ba0de53df326956352ff09bea2b80c6a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 9 Sep 2018 12:08:26 +0200 Subject: Split into compilation units --- src/box_obstacle.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'src/box_obstacle.h') diff --git a/src/box_obstacle.h b/src/box_obstacle.h index 46660a7..149e8e1 100644 --- a/src/box_obstacle.h +++ b/src/box_obstacle.h @@ -1,7 +1,6 @@ #pragma once #include "data_cell_buffer.h" -#include "boundary_conditions.h" struct BoxObstacle { const std::size_t lower_x_; @@ -9,28 +8,9 @@ struct BoxObstacle { const std::size_t upper_x_; const std::size_t upper_y_; - BoxObstacle(std::size_t lX, std::size_t lY, std::size_t uX, std::size_t uY): - lower_x_(lX), lower_y_(lY), upper_x_(uX), upper_y_(uY) { } + BoxObstacle(std::size_t lX, std::size_t lY, std::size_t uX, std::size_t uY); - bool isInside(std::size_t x, std::size_t y) const { - return x > lower_x_ - && x < upper_x_ - && y > lower_y_ - && y < upper_y_; - } + bool isInside(std::size_t x, std::size_t y) const; - void applyBoundary(DataCellBuffer& pop) const { - for ( std::size_t x = lower_x_+1; x < upper_x_; ++x ) { - computeWallCell(pop, {x, lower_y_}, { 0,-1}); - computeWallCell(pop, {x, upper_y_}, { 0, 1}); - } - for ( std::size_t y = lower_y_+1; y < upper_y_; ++y ) { - computeWallCell(pop, {lower_x_, y}, {-1, 0}); - computeWallCell(pop, {upper_x_, y}, { 1, 0}); - } - computeWallCell(pop, {lower_x_, lower_y_}, {-1,-1}); - computeWallCell(pop, {upper_x_, lower_y_}, { 1,-1}); - computeWallCell(pop, {upper_x_, upper_y_}, { 1, 1}); - computeWallCell(pop, {lower_x_, upper_y_}, {-1, 1}); - } + void applyBoundary(DataCellBuffer& pop) const; }; -- cgit v1.2.3