cleanup: renaming voltage excitation E_* to Volt_*
parent
0319c35f55
commit
35939584df
|
@ -126,12 +126,12 @@ void Engine::ApplyVoltageExcite()
|
|||
{
|
||||
int exc_pos;
|
||||
//soft voltage excitation here (E-field excite)
|
||||
for (unsigned int n=0;n<Op->Exc->E_Count;++n)
|
||||
for (unsigned int n=0;n<Op->Exc->Volt_Count;++n)
|
||||
{
|
||||
exc_pos = (int)numTS - (int)Op->Exc->E_delay[n];
|
||||
exc_pos = (int)numTS - (int)Op->Exc->Volt_delay[n];
|
||||
exc_pos *= (exc_pos>0 && exc_pos<=(int)Op->Exc->Length);
|
||||
// if (n==0) cerr << numTS << " => " << Op->ExciteSignal[exc_pos] << endl;
|
||||
GetVolt(Op->Exc->E_dir[n],Op->Exc->E_index[0][n],Op->Exc->E_index[1][n],Op->Exc->E_index[2][n]) += Op->Exc->E_amp[n]*Op->Exc->Signal_volt[exc_pos];
|
||||
GetVolt(Op->Exc->Volt_dir[n],Op->Exc->Volt_index[0][n],Op->Exc->Volt_index[1][n],Op->Exc->Volt_index[2][n]) += Op->Exc->Volt_amp[n]*Op->Exc->Signal_volt[exc_pos];
|
||||
}
|
||||
|
||||
// write the first excitation into the file "et"
|
||||
|
|
|
@ -40,12 +40,12 @@ Engine_Ext_Mur_ABC::Engine_Ext_Mur_ABC(Operator_Ext_Mur_ABC* op_ext) : Engine_Ex
|
|||
|
||||
//find if some excitation is on this mur-abc and find the max length of this excite, so that the abc can start after the excitation is done...
|
||||
int maxDelay=-1;
|
||||
for (unsigned int n=0;n<m_Op_mur->m_Op->Exc->E_Count;++n)
|
||||
for (unsigned int n=0;n<m_Op_mur->m_Op->Exc->Volt_Count;++n)
|
||||
{
|
||||
if ( ((m_Op_mur->m_Op->Exc->E_dir[n]==m_nyP) || (m_Op_mur->m_Op->Exc->E_dir[n]==m_nyPP)) && (m_Op_mur->m_Op->Exc->E_index[m_ny][n]==m_LineNr) )
|
||||
if ( ((m_Op_mur->m_Op->Exc->Volt_dir[n]==m_nyP) || (m_Op_mur->m_Op->Exc->Volt_dir[n]==m_nyPP)) && (m_Op_mur->m_Op->Exc->Volt_index[m_ny][n]==m_LineNr) )
|
||||
{
|
||||
if ((int)m_Op_mur->m_Op->Exc->E_delay[n]>maxDelay)
|
||||
maxDelay = (int)m_Op_mur->m_Op->Exc->E_delay[n];
|
||||
if ((int)m_Op_mur->m_Op->Exc->Volt_delay[n]>maxDelay)
|
||||
maxDelay = (int)m_Op_mur->m_Op->Exc->Volt_delay[n];
|
||||
}
|
||||
}
|
||||
m_start_TS = 0;
|
||||
|
|
|
@ -25,15 +25,15 @@ Excitation::Excitation( double timestep )
|
|||
{
|
||||
Signal_volt = 0;
|
||||
Signal_curr = 0;
|
||||
E_delay = 0;
|
||||
E_amp = 0;
|
||||
E_dir = 0;
|
||||
Volt_delay = 0;
|
||||
Volt_amp = 0;
|
||||
Volt_dir = 0;
|
||||
Curr_delay = 0;
|
||||
Curr_amp = 0;
|
||||
Curr_dir = 0;
|
||||
|
||||
for (int n=0;n<3;++n) {
|
||||
E_index[n] = 0;
|
||||
Volt_index[n] = 0;
|
||||
Curr_index[n] = 0;
|
||||
}
|
||||
|
||||
|
@ -45,14 +45,14 @@ Excitation::~Excitation()
|
|||
{
|
||||
delete[] Signal_volt;
|
||||
delete[] Signal_curr;
|
||||
delete[] E_delay;
|
||||
delete[] E_dir;
|
||||
delete[] E_amp;
|
||||
delete[] Volt_delay;
|
||||
delete[] Volt_dir;
|
||||
delete[] Volt_amp;
|
||||
delete[] Curr_delay;
|
||||
delete[] Curr_dir;
|
||||
delete[] Curr_amp;
|
||||
for (int n=0;n<3;++n) {
|
||||
delete[] E_index[n];
|
||||
delete[] Volt_index[n];
|
||||
delete[] Curr_index[n];
|
||||
}
|
||||
|
||||
|
@ -243,32 +243,32 @@ void Excitation::CalcSinusExcitation(double f0, int nTS)
|
|||
void Excitation::setupVoltageExcitation( vector<unsigned int> const volt_vIndex[3], vector<FDTD_FLOAT> const& volt_vExcit,
|
||||
vector<unsigned int> const& volt_vDelay, vector<unsigned int> const& volt_vDir )
|
||||
{
|
||||
E_Count = volt_vIndex[0].size();
|
||||
Volt_Count = volt_vIndex[0].size();
|
||||
for (int n=0; n<3; n++)
|
||||
{
|
||||
Volt_Count_Dir[n]=0;
|
||||
delete[] E_index[n];
|
||||
E_index[n] = new unsigned int[E_Count];
|
||||
delete[] Volt_index[n];
|
||||
Volt_index[n] = new unsigned int[Volt_Count];
|
||||
}
|
||||
delete[] E_delay;
|
||||
delete[] E_amp;
|
||||
delete[] E_dir;
|
||||
E_delay = new unsigned int[E_Count];
|
||||
E_amp = new FDTD_FLOAT[E_Count];
|
||||
E_dir = new unsigned short[E_Count];
|
||||
delete[] Volt_delay;
|
||||
delete[] Volt_amp;
|
||||
delete[] Volt_dir;
|
||||
Volt_delay = new unsigned int[Volt_Count];
|
||||
Volt_amp = new FDTD_FLOAT[Volt_Count];
|
||||
Volt_dir = new unsigned short[Volt_Count];
|
||||
|
||||
// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << E_Count << endl;
|
||||
// if (E_Count==0)
|
||||
// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << Volt_Count << endl;
|
||||
// if (Volt_Count==0)
|
||||
// cerr << "No E-Field/voltage excitation found!" << endl;
|
||||
for (int n=0; n<3; n++)
|
||||
for (unsigned int i=0; i<E_Count; i++)
|
||||
E_index[n][i] = volt_vIndex[n].at(i);
|
||||
for (unsigned int i=0; i<E_Count; i++)
|
||||
for (unsigned int i=0; i<Volt_Count; i++)
|
||||
Volt_index[n][i] = volt_vIndex[n].at(i);
|
||||
for (unsigned int i=0; i<Volt_Count; i++)
|
||||
{
|
||||
E_delay[i] = volt_vDelay.at(i);
|
||||
E_amp[i] = volt_vExcit.at(i);
|
||||
E_dir[i] = volt_vDir.at(i);
|
||||
++Volt_Count_Dir[E_dir[i]];
|
||||
Volt_delay[i] = volt_vDelay.at(i);
|
||||
Volt_amp[i] = volt_vExcit.at(i);
|
||||
Volt_dir[i] = volt_vDir.at(i);
|
||||
++Volt_Count_Dir[Volt_dir[i]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,12 +49,12 @@ public:
|
|||
FDTD_FLOAT* Signal_curr;
|
||||
|
||||
//E-Field/voltage Excitation
|
||||
unsigned int E_Count;
|
||||
unsigned int Volt_Count;
|
||||
unsigned int Volt_Count_Dir[3];
|
||||
unsigned int* E_index[3];
|
||||
unsigned short* E_dir;
|
||||
FDTD_FLOAT* E_amp; //represented as edge-voltages!!
|
||||
unsigned int* E_delay;
|
||||
unsigned int* Volt_index[3];
|
||||
unsigned short* Volt_dir;
|
||||
FDTD_FLOAT* Volt_amp; //represented as edge-voltages!!
|
||||
unsigned int* Volt_delay;
|
||||
|
||||
//H-Field/current Excitation
|
||||
unsigned int Curr_Count;
|
||||
|
|
|
@ -294,7 +294,7 @@ void Operator::ShowStat() const
|
|||
cout << "Size of Operator\t: " << OpSize << " Byte (" << (double)OpSize/MBdiff << " MiB) " << endl;
|
||||
cout << "Size of Field-Data\t: " << FieldSize << " Byte (" << (double)FieldSize/MBdiff << " MiB) " << endl;
|
||||
cout << "-----------------------------------" << endl;
|
||||
cout << "Voltage excitations\t: " << Exc->E_Count << "\t (" << Exc->Volt_Count_Dir[0] << ", " << Exc->Volt_Count_Dir[1] << ", " << Exc->Volt_Count_Dir[2] << ")" << endl;
|
||||
cout << "Voltage excitations\t: " << Exc->Volt_Count << "\t (" << Exc->Volt_Count_Dir[0] << ", " << Exc->Volt_Count_Dir[1] << ", " << Exc->Volt_Count_Dir[2] << ")" << endl;
|
||||
cout << "Current excitations\t: " << Exc->Curr_Count << "\t (" << Exc->Curr_Count_Dir[0] << ", " << Exc->Curr_Count_Dir[1] << ", " << Exc->Curr_Count_Dir[2] << ")" << endl;
|
||||
cout << "-----------------------------------" << endl;
|
||||
cout << "Number of PEC edges\t: " << m_Nr_PEC[0]+m_Nr_PEC[1]+m_Nr_PEC[2] << endl;
|
||||
|
@ -339,8 +339,8 @@ void Operator::DumpOperator2File(string filename)
|
|||
|
||||
FDTD_FLOAT**** exc = Create_N_3DArray<FDTD_FLOAT>(numLines);
|
||||
if (Exc) {
|
||||
for (unsigned int n=0;n<Exc->E_Count;++n)
|
||||
exc[Exc->E_dir[n]][Exc->E_index[0][n]][Exc->E_index[1][n]][Exc->E_index[2][n]] = Exc->E_amp[n];
|
||||
for (unsigned int n=0;n<Exc->Volt_Count;++n)
|
||||
exc[Exc->Volt_dir[n]][Exc->Volt_index[0][n]][Exc->Volt_index[1][n]][Exc->Volt_index[2][n]] = Exc->Volt_amp[n];
|
||||
}
|
||||
|
||||
string names[] = {"vv", "vi", "iv" , "ii", "exc"};
|
||||
|
|
|
@ -104,8 +104,8 @@ void Operator_sse::DumpOperator2File(string filename)
|
|||
|
||||
FDTD_FLOAT**** exc = Create_N_3DArray<FDTD_FLOAT>(numLines);
|
||||
if (Exc) {
|
||||
for (unsigned int n=0;n<Exc->E_Count;++n)
|
||||
exc[Exc->E_dir[n]][Exc->E_index[0][n]][Exc->E_index[1][n]][Exc->E_index[2][n]] = Exc->E_amp[n];
|
||||
for (unsigned int n=0;n<Exc->Volt_Count;++n)
|
||||
exc[Exc->Volt_dir[n]][Exc->Volt_index[0][n]][Exc->Volt_index[1][n]][Exc->Volt_index[2][n]] = Exc->Volt_amp[n];
|
||||
}
|
||||
|
||||
vv = Create_N_3DArray<FDTD_FLOAT>(numLines);
|
||||
|
|
|
@ -498,8 +498,8 @@ void openEMS::RunFDTD()
|
|||
|
||||
//add all timesteps to end-crit field processing with max excite amplitude
|
||||
unsigned int maxExcite = FDTD_Op->Exc->GetMaxExcitationTimestep();
|
||||
for (unsigned int n=0;n<FDTD_Op->Exc->E_Count;++n)
|
||||
ProcField->AddStep(FDTD_Op->Exc->E_delay[n]+maxExcite);
|
||||
for (unsigned int n=0;n<FDTD_Op->Exc->Volt_Count;++n)
|
||||
ProcField->AddStep(FDTD_Op->Exc->Volt_delay[n]+maxExcite);
|
||||
|
||||
double change=1;
|
||||
int prevTS=0,currTS=0;
|
||||
|
|
Loading…
Reference in New Issue