From a6a704a176b8042f839be49acf90054c348b2ba9 Mon Sep 17 00:00:00 2001 From: philippun Date: Thu, 13 Jul 2023 11:29:53 +0200 Subject: [PATCH] add: Boundary.hpp Simulation.hpp | adding basic outline --- include/tug/Boundary.hpp | 71 ++++++++++++++++++++++++++++++++++++++ include/tug/Grid.hpp | 3 +- include/tug/Simulation.hpp | 2 ++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 include/tug/Boundary.hpp create mode 100644 include/tug/Simulation.hpp diff --git a/include/tug/Boundary.hpp b/include/tug/Boundary.hpp new file mode 100644 index 0000000..6e94537 --- /dev/null +++ b/include/tug/Boundary.hpp @@ -0,0 +1,71 @@ +#include + +using namespace Eigen; + +enum BC_TYPE { + BC_TYPE_CLOSED, + BC_TYPE_CONSTANT +}; + +enum BC_SIDE { + BC_SIDE_LEFT, + BC_SIDE_RIGHT, + BC_SIDE_TOP, + BC_SIDE_BOTTOM +}; + +class Boundary { + public: + + /** + * @brief Construct a new Boundary object + * + * @param dim + */ + Boundary(int dim); + + /** + * @brief Construct a new Boundary object + * + * @param dim + * @param type + */ + Boundary(int dim, BC_TYPE type); + + /** + * @brief Set the Boundary Condition Type object + * + * @param type + */ + void setBoundaryConditionType(BC_TYPE type); + + /** + * @brief Get the Boundary Condition Type object + * + * @return auto + */ + auto getBoundaryConditionType(); + + /** + * @brief Set the Boundary Condition Value object + * + * @param side + * @param values + */ + void setBoundaryConditionValue(BC_SIDE side, VectorXd values); + + /** + * @brief Get the Boundary Condition Value object + * + * @param side + * @return auto + */ + auto getBoundaryConditionValue(BC_SIDE side); + + + private: + + int dim; + BC_TYPE type; + VectorXd left, right, top, bottom; +}; diff --git a/include/tug/Grid.hpp b/include/tug/Grid.hpp index 5334413..9534357 100644 --- a/include/tug/Grid.hpp +++ b/include/tug/Grid.hpp @@ -1,4 +1,3 @@ -#include #include using namespace Eigen; @@ -49,7 +48,7 @@ class Grid { * @param alpha_y */ void setAlpha(Matrix2d alpha_x, Matrix2d alpha_y); - + private: diff --git a/include/tug/Simulation.hpp b/include/tug/Simulation.hpp new file mode 100644 index 0000000..139597f --- /dev/null +++ b/include/tug/Simulation.hpp @@ -0,0 +1,2 @@ + +