diff --git a/include/tug/Boundary.hpp b/include/tug/Boundary.hpp index 3a2df00..4989ba7 100644 --- a/include/tug/Boundary.hpp +++ b/include/tug/Boundary.hpp @@ -24,7 +24,7 @@ class Boundary { * @param grid * @param type */ - Boundary(Grid grid, BC_TYPE type); + Boundary(Grid &grid, BC_TYPE type); /** * @brief Get the Boundary Condition Type object diff --git a/include/tug/Grid.hpp b/include/tug/Grid.hpp index 35ccb2e..6af953c 100644 --- a/include/tug/Grid.hpp +++ b/include/tug/Grid.hpp @@ -49,7 +49,7 @@ class Grid { */ void setAlpha(Matrix2d alpha_x, Matrix2d alpha_y); - auto getDim(); + int getDim(); auto getRow(); diff --git a/include/tug/Simulation.hpp b/include/tug/Simulation.hpp index 468777c..17c1853 100644 --- a/include/tug/Simulation.hpp +++ b/include/tug/Simulation.hpp @@ -1,5 +1,4 @@ #include "Boundary.hpp" -#include "Grid.hpp" enum APPROACH { FTCS, @@ -71,7 +70,6 @@ class Simulation { int iterations; CSV_OUTPUT csv_output; - Grid grid; Boundary bc; APPROACH approach; diff --git a/src/Boundary.cpp b/src/Boundary.cpp index 865a60f..150b9f2 100644 --- a/src/Boundary.cpp +++ b/src/Boundary.cpp @@ -3,7 +3,7 @@ using namespace std; -Boundary::Boundary(Grid grid, BC_TYPE type) { +Boundary::Boundary(Grid &grid, BC_TYPE type) : grid(grid) { this->type = type; if (type == BC_TYPE_CONSTANT) { diff --git a/src/Grid.cpp b/src/Grid.cpp index 9b60a8d..4e92f01 100644 --- a/src/Grid.cpp +++ b/src/Grid.cpp @@ -35,7 +35,7 @@ void Grid::setAlpha(Matrix2d alpha_x, Matrix2d alpha_y) { this->alpha_y = alpha_y; } -auto Grid::getDim() { +int Grid::getDim() { return dim; }