fix in Processing: disable processings outside the field domain
This commit is contained in:
parent
7df39bafcb
commit
5b2e9b1ac9
@ -156,6 +156,18 @@ void Processing::AddFrequency(vector<double> *freqs)
|
||||
|
||||
void Processing::DefineStartStopCoord(double* dstart, double* dstop)
|
||||
{
|
||||
for (int n=0;n<3;++n)
|
||||
{
|
||||
double min = Op->GetDiscLine(n,0);
|
||||
double max = Op->GetDiscLine(n,Op->GetNumberOfLines(n)-1);
|
||||
if ( ((dstart[n]<min) && (dstop[n]<min)) || ((dstart[n]>max) && (dstop[n]>max)) )
|
||||
{
|
||||
cerr << "Processing::DefineStartStopCoord: Warning in " << m_Name << " (" << GetProcessingName() << ") : Box is outside the field domain!! Disabling" << endl;
|
||||
Enabled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Op->SnapToMesh(dstart,start,m_dualMesh,m_start_inside)==false)
|
||||
cerr << "Processing::DefineStartStopCoord: Warning in " << m_Name << " (" << GetProcessingName() << ") : Snapped start line outside field domain!!" << endl;
|
||||
if (Op->SnapToMesh(dstop,stop,m_dualMesh,m_stop_inside)==false)
|
||||
|
@ -79,6 +79,7 @@ void ProcessModeMatch::InitProcess()
|
||||
m_Eng_Interface->SetInterpolationType(Engine_Interface_Base::NODE_INTERPOLATE);
|
||||
|
||||
int Dump_Dim=0;
|
||||
m_ny = -1;
|
||||
for (int n=0; n<3; ++n)
|
||||
{
|
||||
if (start[n]>stop[n])
|
||||
@ -94,19 +95,14 @@ void ProcessModeMatch::InitProcess()
|
||||
if (stop[n]==Op->GetNumberOfLines(n)-1)
|
||||
--stop[n];
|
||||
|
||||
if (stop[n]>start[n])
|
||||
if (stop[n]!=start[n])
|
||||
++Dump_Dim;
|
||||
|
||||
if (stop[n] == start[n])
|
||||
m_ny = n;
|
||||
}
|
||||
|
||||
int nP = (m_ny+1)%3;
|
||||
int nPP = (m_ny+2)%3;
|
||||
m_numLines[0] = stop[nP] - start[nP] + 1;
|
||||
m_numLines[1] = stop[nPP] - start[nPP] + 1;
|
||||
|
||||
if (Dump_Dim!=2)
|
||||
if ((Dump_Dim!=2) || (m_ny<0))
|
||||
{
|
||||
cerr << "ProcessModeMatch::InitProcess(): Warning Mode Matching Integration Box \"" << m_filename << "\" is not a surface (found dimension: " << Dump_Dim << ")" << endl;
|
||||
SetEnable(false);
|
||||
@ -114,6 +110,11 @@ void ProcessModeMatch::InitProcess()
|
||||
return;
|
||||
}
|
||||
|
||||
int nP = (m_ny+1)%3;
|
||||
int nPP = (m_ny+2)%3;
|
||||
m_numLines[0] = stop[nP] - start[nP] + 1;
|
||||
m_numLines[1] = stop[nPP] - start[nPP] + 1;
|
||||
|
||||
for (int n=0; n<2; ++n)
|
||||
{
|
||||
int ny = (m_ny+n+1)%3;
|
||||
|
Loading…
Reference in New Issue
Block a user