Operator-Base: access stored discrete material
This commit is contained in:
parent
24bac9499f
commit
2e2f75807e
@ -81,6 +81,8 @@ public:
|
|||||||
//! Check storage flags and cleanup
|
//! Check storage flags and cleanup
|
||||||
virtual void CleanupMaterialStorage() = 0;
|
virtual void CleanupMaterialStorage() = 0;
|
||||||
|
|
||||||
|
//! Get stored discrete material (if storage is enabled).
|
||||||
|
virtual double GetDiscMaterial(int type, int ny, const unsigned int pos[3]) const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Operator_Base();
|
Operator_Base();
|
||||||
|
@ -669,6 +669,30 @@ void Operator::CleanupMaterialStorage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double Operator::GetDiscMaterial(int type, int n, const unsigned int pos[3]) const
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if (m_epsR==0)
|
||||||
|
return 0;
|
||||||
|
return m_epsR[n][pos[0]][pos[1]][pos[2]];
|
||||||
|
case 1:
|
||||||
|
if (m_kappa==0)
|
||||||
|
return 0;
|
||||||
|
return m_kappa[n][pos[0]][pos[1]][pos[2]];
|
||||||
|
case 2:
|
||||||
|
if (m_mueR==0)
|
||||||
|
return 0;
|
||||||
|
return m_mueR[n][pos[0]][pos[1]][pos[2]];
|
||||||
|
case 3:
|
||||||
|
if (m_sigma==0)
|
||||||
|
return 0;
|
||||||
|
return m_sigma[n][pos[0]][pos[1]][pos[2]];
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void Operator::InitExcitation()
|
void Operator::InitExcitation()
|
||||||
{
|
{
|
||||||
delete Exc;
|
delete Exc;
|
||||||
|
@ -120,6 +120,8 @@ public:
|
|||||||
|
|
||||||
virtual void CleanupMaterialStorage();
|
virtual void CleanupMaterialStorage();
|
||||||
|
|
||||||
|
virtual double GetDiscMaterial(int type, int ny, const unsigned int pos[3]) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! use New() for creating a new Operator
|
//! use New() for creating a new Operator
|
||||||
Operator();
|
Operator();
|
||||||
|
Loading…
Reference in New Issue
Block a user