diff --git a/openems.cpp b/openems.cpp index de05feb..b99507b 100644 --- a/openems.cpp +++ b/openems.cpp @@ -614,6 +614,13 @@ void openEMS::Set_BC_Type(int idx, int type) m_BC_type[idx] = type; } +int openEMS::Get_BC_Type(int idx) +{ + if ((idx<0) || (idx>5)) + return -1; + return m_BC_type[idx]; +} + void openEMS::Set_BC_PML(int idx, unsigned int size) { if ((idx<0) || (idx>5)) @@ -622,6 +629,15 @@ void openEMS::Set_BC_PML(int idx, unsigned int size) m_PML_size[idx] = size; } +int openEMS::Get_PML_Size(int idx) +{ + if ((idx<0) || (idx>5)) + return -1; + if (m_BC_type[idx]!=3) + return -1; // return -1 if BC was *not* a PML + return m_PML_size[idx]; +} + void openEMS::Set_Mur_PhaseVel(int idx, double val) { if ((idx<0) || (idx>5)) diff --git a/openems.h b/openems.h index d902c43..1221a96 100644 --- a/openems.h +++ b/openems.h @@ -74,7 +74,9 @@ public: void DebugBox() {m_debugBox=true;} void Set_BC_Type(int idx, int type); + int Get_BC_Type(int idx); void Set_BC_PML(int idx, unsigned int size); + int Get_PML_Size(int idx); void Set_Mur_PhaseVel(int idx, double val); //! Get informations about external libs used by openEMS