change: Boundardy.hpp, Grd.hpp, Simulation.hpp, Boundary.cpp, Grid.cpp | change constructors

This commit is contained in:
Hannes Signer 2023-07-14 00:02:49 +02:00
parent 2ab924a162
commit 01a589889f
5 changed files with 4 additions and 6 deletions

View File

@ -24,7 +24,7 @@ class Boundary {
* @param grid * @param grid
* @param type * @param type
*/ */
Boundary(Grid grid, BC_TYPE type); Boundary(Grid &grid, BC_TYPE type);
/** /**
* @brief Get the Boundary Condition Type object * @brief Get the Boundary Condition Type object

View File

@ -49,7 +49,7 @@ class Grid {
*/ */
void setAlpha(Matrix2d alpha_x, Matrix2d alpha_y); void setAlpha(Matrix2d alpha_x, Matrix2d alpha_y);
auto getDim(); int getDim();
auto getRow(); auto getRow();

View File

@ -1,5 +1,4 @@
#include "Boundary.hpp" #include "Boundary.hpp"
#include "Grid.hpp"
enum APPROACH { enum APPROACH {
FTCS, FTCS,
@ -71,7 +70,6 @@ class Simulation {
int iterations; int iterations;
CSV_OUTPUT csv_output; CSV_OUTPUT csv_output;
Grid grid;
Boundary bc; Boundary bc;
APPROACH approach; APPROACH approach;

View File

@ -3,7 +3,7 @@
using namespace std; using namespace std;
Boundary::Boundary(Grid grid, BC_TYPE type) { Boundary::Boundary(Grid &grid, BC_TYPE type) : grid(grid) {
this->type = type; this->type = type;
if (type == BC_TYPE_CONSTANT) { if (type == BC_TYPE_CONSTANT) {

View File

@ -35,7 +35,7 @@ void Grid::setAlpha(Matrix2d alpha_x, Matrix2d alpha_y) {
this->alpha_y = alpha_y; this->alpha_y = alpha_y;
} }
auto Grid::getDim() { int Grid::getDim() {
return dim; return dim;
} }