cleanup: renaming voltage excitation E_* to Volt_*
parent
0319c35f55
commit
35939584df
|
@ -126,12 +126,12 @@ void Engine::ApplyVoltageExcite()
|
||||||
{
|
{
|
||||||
int exc_pos;
|
int exc_pos;
|
||||||
//soft voltage excitation here (E-field excite)
|
//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);
|
exc_pos *= (exc_pos>0 && exc_pos<=(int)Op->Exc->Length);
|
||||||
// if (n==0) cerr << numTS << " => " << Op->ExciteSignal[exc_pos] << endl;
|
// 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"
|
// 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...
|
//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;
|
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)
|
if ((int)m_Op_mur->m_Op->Exc->Volt_delay[n]>maxDelay)
|
||||||
maxDelay = (int)m_Op_mur->m_Op->Exc->E_delay[n];
|
maxDelay = (int)m_Op_mur->m_Op->Exc->Volt_delay[n];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_start_TS = 0;
|
m_start_TS = 0;
|
||||||
|
|
|
@ -25,15 +25,15 @@ Excitation::Excitation( double timestep )
|
||||||
{
|
{
|
||||||
Signal_volt = 0;
|
Signal_volt = 0;
|
||||||
Signal_curr = 0;
|
Signal_curr = 0;
|
||||||
E_delay = 0;
|
Volt_delay = 0;
|
||||||
E_amp = 0;
|
Volt_amp = 0;
|
||||||
E_dir = 0;
|
Volt_dir = 0;
|
||||||
Curr_delay = 0;
|
Curr_delay = 0;
|
||||||
Curr_amp = 0;
|
Curr_amp = 0;
|
||||||
Curr_dir = 0;
|
Curr_dir = 0;
|
||||||
|
|
||||||
for (int n=0;n<3;++n) {
|
for (int n=0;n<3;++n) {
|
||||||
E_index[n] = 0;
|
Volt_index[n] = 0;
|
||||||
Curr_index[n] = 0;
|
Curr_index[n] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,14 +45,14 @@ Excitation::~Excitation()
|
||||||
{
|
{
|
||||||
delete[] Signal_volt;
|
delete[] Signal_volt;
|
||||||
delete[] Signal_curr;
|
delete[] Signal_curr;
|
||||||
delete[] E_delay;
|
delete[] Volt_delay;
|
||||||
delete[] E_dir;
|
delete[] Volt_dir;
|
||||||
delete[] E_amp;
|
delete[] Volt_amp;
|
||||||
delete[] Curr_delay;
|
delete[] Curr_delay;
|
||||||
delete[] Curr_dir;
|
delete[] Curr_dir;
|
||||||
delete[] Curr_amp;
|
delete[] Curr_amp;
|
||||||
for (int n=0;n<3;++n) {
|
for (int n=0;n<3;++n) {
|
||||||
delete[] E_index[n];
|
delete[] Volt_index[n];
|
||||||
delete[] Curr_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,
|
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 )
|
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++)
|
for (int n=0; n<3; n++)
|
||||||
{
|
{
|
||||||
Volt_Count_Dir[n]=0;
|
Volt_Count_Dir[n]=0;
|
||||||
delete[] E_index[n];
|
delete[] Volt_index[n];
|
||||||
E_index[n] = new unsigned int[E_Count];
|
Volt_index[n] = new unsigned int[Volt_Count];
|
||||||
}
|
}
|
||||||
delete[] E_delay;
|
delete[] Volt_delay;
|
||||||
delete[] E_amp;
|
delete[] Volt_amp;
|
||||||
delete[] E_dir;
|
delete[] Volt_dir;
|
||||||
E_delay = new unsigned int[E_Count];
|
Volt_delay = new unsigned int[Volt_Count];
|
||||||
E_amp = new FDTD_FLOAT[E_Count];
|
Volt_amp = new FDTD_FLOAT[Volt_Count];
|
||||||
E_dir = new unsigned short[E_Count];
|
Volt_dir = new unsigned short[Volt_Count];
|
||||||
|
|
||||||
// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << E_Count << endl;
|
// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << Volt_Count << endl;
|
||||||
// if (E_Count==0)
|
// if (Volt_Count==0)
|
||||||
// cerr << "No E-Field/voltage excitation found!" << endl;
|
// cerr << "No E-Field/voltage excitation found!" << endl;
|
||||||
for (int n=0; n<3; n++)
|
for (int n=0; n<3; n++)
|
||||||
for (unsigned int i=0; i<E_Count; i++)
|
for (unsigned int i=0; i<Volt_Count; i++)
|
||||||
E_index[n][i] = volt_vIndex[n].at(i);
|
Volt_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++)
|
||||||
{
|
{
|
||||||
E_delay[i] = volt_vDelay.at(i);
|
Volt_delay[i] = volt_vDelay.at(i);
|
||||||
E_amp[i] = volt_vExcit.at(i);
|
Volt_amp[i] = volt_vExcit.at(i);
|
||||||
E_dir[i] = volt_vDir.at(i);
|
Volt_dir[i] = volt_vDir.at(i);
|
||||||
++Volt_Count_Dir[E_dir[i]];
|
++Volt_Count_Dir[Volt_dir[i]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,12 +49,12 @@ public:
|
||||||
FDTD_FLOAT* Signal_curr;
|
FDTD_FLOAT* Signal_curr;
|
||||||
|
|
||||||
//E-Field/voltage Excitation
|
//E-Field/voltage Excitation
|
||||||
unsigned int E_Count;
|
unsigned int Volt_Count;
|
||||||
unsigned int Volt_Count_Dir[3];
|
unsigned int Volt_Count_Dir[3];
|
||||||
unsigned int* E_index[3];
|
unsigned int* Volt_index[3];
|
||||||
unsigned short* E_dir;
|
unsigned short* Volt_dir;
|
||||||
FDTD_FLOAT* E_amp; //represented as edge-voltages!!
|
FDTD_FLOAT* Volt_amp; //represented as edge-voltages!!
|
||||||
unsigned int* E_delay;
|
unsigned int* Volt_delay;
|
||||||
|
|
||||||
//H-Field/current Excitation
|
//H-Field/current Excitation
|
||||||
unsigned int Curr_Count;
|
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 Operator\t: " << OpSize << " Byte (" << (double)OpSize/MBdiff << " MiB) " << endl;
|
||||||
cout << "Size of Field-Data\t: " << FieldSize << " Byte (" << (double)FieldSize/MBdiff << " MiB) " << endl;
|
cout << "Size of Field-Data\t: " << FieldSize << " Byte (" << (double)FieldSize/MBdiff << " MiB) " << endl;
|
||||||
cout << "-----------------------------------" << 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 << "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 << "-----------------------------------" << endl;
|
||||||
cout << "Number of PEC edges\t: " << m_Nr_PEC[0]+m_Nr_PEC[1]+m_Nr_PEC[2] << 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);
|
FDTD_FLOAT**** exc = Create_N_3DArray<FDTD_FLOAT>(numLines);
|
||||||
if (Exc) {
|
if (Exc) {
|
||||||
for (unsigned int n=0;n<Exc->E_Count;++n)
|
for (unsigned int n=0;n<Exc->Volt_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];
|
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"};
|
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);
|
FDTD_FLOAT**** exc = Create_N_3DArray<FDTD_FLOAT>(numLines);
|
||||||
if (Exc) {
|
if (Exc) {
|
||||||
for (unsigned int n=0;n<Exc->E_Count;++n)
|
for (unsigned int n=0;n<Exc->Volt_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];
|
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);
|
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
|
//add all timesteps to end-crit field processing with max excite amplitude
|
||||||
unsigned int maxExcite = FDTD_Op->Exc->GetMaxExcitationTimestep();
|
unsigned int maxExcite = FDTD_Op->Exc->GetMaxExcitationTimestep();
|
||||||
for (unsigned int n=0;n<FDTD_Op->Exc->E_Count;++n)
|
for (unsigned int n=0;n<FDTD_Op->Exc->Volt_Count;++n)
|
||||||
ProcField->AddStep(FDTD_Op->Exc->E_delay[n]+maxExcite);
|
ProcField->AddStep(FDTD_Op->Exc->Volt_delay[n]+maxExcite);
|
||||||
|
|
||||||
double change=1;
|
double change=1;
|
||||||
int prevTS=0,currTS=0;
|
int prevTS=0,currTS=0;
|
||||||
|
|
Loading…
Reference in New Issue