From 0a0e16bb56a3a39d67a3b808ff40f4450286968f Mon Sep 17 00:00:00 2001 From: philippun Date: Fri, 28 Jul 2023 13:02:45 +0200 Subject: [PATCH] feat: added getters to Boundary --- include/tug/Boundary.hpp | 5 +++++ src/Boundary.cpp | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/tug/Boundary.hpp b/include/tug/Boundary.hpp index c4ad577..bf1d6a9 100644 --- a/include/tug/Boundary.hpp +++ b/include/tug/Boundary.hpp @@ -83,6 +83,10 @@ class Boundary { BoundaryElement getBoundaryElement(BC_SIDE side, int index); + BC_TYPE getBoundaryElementType(BC_SIDE side, int index); + + double getBoundaryElementValue(BC_SIDE side, int index); + private: Grid grid; @@ -90,3 +94,4 @@ class Boundary { }; #endif + diff --git a/src/Boundary.cpp b/src/Boundary.cpp index 3c3ac04..9a1012a 100644 --- a/src/Boundary.cpp +++ b/src/Boundary.cpp @@ -70,4 +70,13 @@ vector Boundary::getBoundarySide(BC_SIDE side) { BoundaryElement Boundary::getBoundaryElement(BC_SIDE side, int index) { return this->boundaries[side][index]; -} \ No newline at end of file +} + +BC_TYPE Boundary::getBoundaryElementType(BC_SIDE side, int index) { + return this->boundaries[side][index].getType(); +} + +double Boundary::getBoundaryElementValue(BC_SIDE side, int index) { + return this->boundaries[side][index].getValue(); +} +