get BC type and PML size

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/14/head
Thorsten Liebig 2015-12-30 14:17:40 +01:00
parent 6a89ca30aa
commit 22093a6347
2 changed files with 18 additions and 0 deletions

View File

@ -614,6 +614,13 @@ void openEMS::Set_BC_Type(int idx, int type)
m_BC_type[idx] = 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) void openEMS::Set_BC_PML(int idx, unsigned int size)
{ {
if ((idx<0) || (idx>5)) if ((idx<0) || (idx>5))
@ -622,6 +629,15 @@ void openEMS::Set_BC_PML(int idx, unsigned int size)
m_PML_size[idx] = 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) void openEMS::Set_Mur_PhaseVel(int idx, double val)
{ {
if ((idx<0) || (idx>5)) if ((idx<0) || (idx>5))

View File

@ -74,7 +74,9 @@ public:
void DebugBox() {m_debugBox=true;} void DebugBox() {m_debugBox=true;}
void Set_BC_Type(int idx, int type); void Set_BC_Type(int idx, int type);
int Get_BC_Type(int idx);
void Set_BC_PML(int idx, unsigned int size); void Set_BC_PML(int idx, unsigned int size);
int Get_PML_Size(int idx);
void Set_Mur_PhaseVel(int idx, double val); void Set_Mur_PhaseVel(int idx, double val);
//! Get informations about external libs used by openEMS //! Get informations about external libs used by openEMS