fixed unnecessary memory allocation for lorentz material extension

pull/1/head
Thorsten Liebig 2012-06-06 10:30:47 +02:00
parent a29ba68729
commit d7d5802ba9
1 changed files with 21 additions and 4 deletions

View File

@ -220,10 +220,27 @@ bool Operator_Ext_LorentzMaterial::BuildExtension()
m_LM_pos[order] = new unsigned int*[3];
v_int_ADE[order] = new FDTD_FLOAT*[3];
v_ext_ADE[order] = new FDTD_FLOAT*[3];
i_int_ADE[order] = new FDTD_FLOAT*[3];
i_ext_ADE[order] = new FDTD_FLOAT*[3];
if (m_volt_ADE_On[order])
{
v_int_ADE[order] = new FDTD_FLOAT*[3];
v_ext_ADE[order] = new FDTD_FLOAT*[3];
}
else
{
v_int_ADE[order] = NULL;
v_ext_ADE[order] = NULL;
}
if (m_curr_ADE_On[order])
{
i_int_ADE[order] = new FDTD_FLOAT*[3];
i_ext_ADE[order] = new FDTD_FLOAT*[3];
}
else
{
i_int_ADE[order] = NULL;
i_ext_ADE[order] = NULL;
}
for (int n=0; n<3; ++n)
{