dispersive material: critical bug fixes
parent
65c835dbf2
commit
3abe10848d
|
@ -34,7 +34,7 @@ void Engine_Ext_LorentzMaterial::DoPreVoltageUpdates()
|
||||||
{
|
{
|
||||||
for (int o=0;o<m_Order;++o)
|
for (int o=0;o<m_Order;++o)
|
||||||
{
|
{
|
||||||
if (m_Op_Ext_Lor->m_volt_ADE_On==false) continue;
|
if (m_Op_Ext_Lor->m_volt_ADE_On[o]==false) continue;
|
||||||
|
|
||||||
unsigned int **pos = m_Op_Ext_Lor->m_LM_pos[o];
|
unsigned int **pos = m_Op_Ext_Lor->m_LM_pos[o];
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void Engine_Ext_LorentzMaterial::DoPreCurrentUpdates()
|
||||||
{
|
{
|
||||||
for (int o=0;o<m_Order;++o)
|
for (int o=0;o<m_Order;++o)
|
||||||
{
|
{
|
||||||
if (m_Op_Ext_Lor->m_curr_ADE_On==false) continue;
|
if (m_Op_Ext_Lor->m_curr_ADE_On[o]==false) continue;
|
||||||
|
|
||||||
unsigned int **pos = m_Op_Ext_Lor->m_LM_pos[o];
|
unsigned int **pos = m_Op_Ext_Lor->m_LM_pos[o];
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ void Operator_Ext_Dispersive::ShowStat(ostream &ostr) const
|
||||||
ostr << " Max. Dispersion Order N = " << m_Order << endl;
|
ostr << " Max. Dispersion Order N = " << m_Order << endl;
|
||||||
for (int i=0;i<m_Order;++i)
|
for (int i=0;i<m_Order;++i)
|
||||||
{
|
{
|
||||||
ostr << " N=" << i << ":\t Active cells\t\t: " << m_LM_Count[i] << endl;
|
ostr << " N=" << i << ":\t Active cells\t\t: " << m_LM_Count.at(i) << endl;
|
||||||
ostr << " N=" << i << ":\t Voltage ADE is \t: " << On_Off[m_volt_ADE_On[i]] << endl;
|
ostr << " N=" << i << ":\t Voltage ADE is \t: " << On_Off[m_volt_ADE_On[i]] << endl;
|
||||||
ostr << " N=" << i << ":\t Current ADE is \t: " << On_Off[m_curr_ADE_On[i]] << endl;
|
ostr << " N=" << i << ":\t Current ADE is \t: " << On_Off[m_curr_ADE_On[i]] << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ bool Operator_Ext_LorentzMaterial::BuildExtension()
|
||||||
m_LM_pos[order][n] = new unsigned int[m_LM_Count.at(order)];
|
m_LM_pos[order][n] = new unsigned int[m_LM_Count.at(order)];
|
||||||
for (unsigned int i=0; i<m_LM_Count.at(order); ++i)
|
for (unsigned int i=0; i<m_LM_Count.at(order); ++i)
|
||||||
m_LM_pos[order][n][i] = v_pos[n].at(i);
|
m_LM_pos[order][n][i] = v_pos[n].at(i);
|
||||||
if (m_volt_ADE_On)
|
if (m_volt_ADE_On[order])
|
||||||
{
|
{
|
||||||
v_int_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
v_int_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
||||||
v_ext_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
v_ext_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
||||||
|
@ -237,7 +237,7 @@ bool Operator_Ext_LorentzMaterial::BuildExtension()
|
||||||
v_ext_ADE[order][n][i] = v_ext[n].at(i);
|
v_ext_ADE[order][n][i] = v_ext[n].at(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_curr_ADE_On)
|
if (m_curr_ADE_On[order])
|
||||||
{
|
{
|
||||||
i_int_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
i_int_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
||||||
i_ext_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
i_ext_ADE[order][n] = new FDTD_FLOAT[m_LM_Count.at(order)];
|
||||||
|
|
|
@ -623,14 +623,14 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
|
|
||||||
SetupBoundaryConditions(BC);
|
SetupBoundaryConditions(BC);
|
||||||
|
|
||||||
if (m_CSX->GetQtyPropertyType(CSProperties::LORENTZMATERIAL)>0)
|
|
||||||
FDTD_Op->AddExtension(new Operator_Ext_LorentzMaterial(FDTD_Op));
|
|
||||||
|
|
||||||
double timestep=0;
|
double timestep=0;
|
||||||
FDTD_Opts->QueryDoubleAttribute("TimeStep",×tep);
|
FDTD_Opts->QueryDoubleAttribute("TimeStep",×tep);
|
||||||
if (timestep)
|
if (timestep)
|
||||||
FDTD_Op->SetTimestep(timestep);
|
FDTD_Op->SetTimestep(timestep);
|
||||||
|
|
||||||
|
if (m_CSX->GetQtyPropertyType(CSProperties::LORENTZMATERIAL)>0)
|
||||||
|
FDTD_Op->AddExtension(new Operator_Ext_LorentzMaterial(FDTD_Op));
|
||||||
|
|
||||||
//check all properties to request material storage during operator creation...
|
//check all properties to request material storage during operator creation...
|
||||||
SetupMaterialStorages();
|
SetupMaterialStorages();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue