change: Boundardy.hpp, Grd.hpp, Simulation.hpp, Boundary.cpp, Grid.cpp | change constructors
This commit is contained in:
parent
2ab924a162
commit
01a589889f
@ -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
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user