Commit 7dfb0f2f authored by allens's avatar allens

added check for step size underflow warning

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@26285 18c085ea-50e0-402c-830e-de6fd14e8384
parent 550d8df6
......@@ -289,6 +289,9 @@
<Field name="issueTerminationWarnings" label="Issue Warning When Termination Criteria Is Not Met" type="bool">
true
</Field>
<Field name="issueStepsizeWarnings" label="Issue warnings when the stepsize is too small" type="bool">
true
</Field>
<Field name="issueStiffnessWarnings" label="Issue warnings when stiffness is encountered" type="bool">
true
</Field>
......
......@@ -534,6 +534,7 @@ void IntegralCurveAttributes::Init()
numberOfRandomSamples = 1;
forceNodeCenteredData = false;
issueTerminationWarnings = true;
issueStepsizeWarnings = true;
issueStiffnessWarnings = true;
issueCriticalPointsWarnings = true;
criticalPointThreshold = 0.001;
......@@ -648,6 +649,7 @@ void IntegralCurveAttributes::Copy(const IntegralCurveAttributes &obj)
numberOfRandomSamples = obj.numberOfRandomSamples;
forceNodeCenteredData = obj.forceNodeCenteredData;
issueTerminationWarnings = obj.issueTerminationWarnings;
issueStepsizeWarnings = obj.issueStepsizeWarnings;
issueStiffnessWarnings = obj.issueStiffnessWarnings;
issueCriticalPointsWarnings = obj.issueCriticalPointsWarnings;
criticalPointThreshold = obj.criticalPointThreshold;
......@@ -917,6 +919,7 @@ IntegralCurveAttributes::operator == (const IntegralCurveAttributes &obj) const
(numberOfRandomSamples == obj.numberOfRandomSamples) &&
(forceNodeCenteredData == obj.forceNodeCenteredData) &&
(issueTerminationWarnings == obj.issueTerminationWarnings) &&
(issueStepsizeWarnings == obj.issueStepsizeWarnings) &&
(issueStiffnessWarnings == obj.issueStiffnessWarnings) &&
(issueCriticalPointsWarnings == obj.issueCriticalPointsWarnings) &&
(criticalPointThreshold == obj.criticalPointThreshold) &&
......@@ -1240,6 +1243,7 @@ IntegralCurveAttributes::SelectAll()
Select(ID_numberOfRandomSamples, (void *)&numberOfRandomSamples);
Select(ID_forceNodeCenteredData, (void *)&forceNodeCenteredData);
Select(ID_issueTerminationWarnings, (void *)&issueTerminationWarnings);
Select(ID_issueStepsizeWarnings, (void *)&issueStepsizeWarnings);
Select(ID_issueStiffnessWarnings, (void *)&issueStiffnessWarnings);
Select(ID_issueCriticalPointsWarnings, (void *)&issueCriticalPointsWarnings);
Select(ID_criticalPointThreshold, (void *)&criticalPointThreshold);
......@@ -1634,6 +1638,12 @@ IntegralCurveAttributes::CreateNode(DataNode *parentNode, bool completeSave, boo
node->AddNode(new DataNode("issueTerminationWarnings", issueTerminationWarnings));
}
if(completeSave || !FieldsEqual(ID_issueStepsizeWarnings, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("issueStepsizeWarnings", issueStepsizeWarnings));
}
if(completeSave || !FieldsEqual(ID_issueStiffnessWarnings, &defaultObject))
{
addToParent = true;
......@@ -1976,6 +1986,8 @@ IntegralCurveAttributes::SetFromNode(DataNode *parentNode)
SetForceNodeCenteredData(node->AsBool());
if((node = searchNode->GetNode("issueTerminationWarnings")) != 0)
SetIssueTerminationWarnings(node->AsBool());
if((node = searchNode->GetNode("issueStepsizeWarnings")) != 0)
SetIssueStepsizeWarnings(node->AsBool());
if((node = searchNode->GetNode("issueStiffnessWarnings")) != 0)
SetIssueStiffnessWarnings(node->AsBool());
if((node = searchNode->GetNode("issueCriticalPointsWarnings")) != 0)
......@@ -2442,6 +2454,13 @@ IntegralCurveAttributes::SetIssueTerminationWarnings(bool issueTerminationWarnin
Select(ID_issueTerminationWarnings, (void *)&issueTerminationWarnings);
}
void
IntegralCurveAttributes::SetIssueStepsizeWarnings(bool issueStepsizeWarnings_)
{
issueStepsizeWarnings = issueStepsizeWarnings_;
Select(ID_issueStepsizeWarnings, (void *)&issueStepsizeWarnings);
}
void
IntegralCurveAttributes::SetIssueStiffnessWarnings(bool issueStiffnessWarnings_)
{
......@@ -2928,6 +2947,12 @@ IntegralCurveAttributes::GetIssueTerminationWarnings() const
return issueTerminationWarnings;
}
bool
IntegralCurveAttributes::GetIssueStepsizeWarnings() const
{
return issueStepsizeWarnings;
}
bool
IntegralCurveAttributes::GetIssueStiffnessWarnings() const
{
......@@ -3147,6 +3172,7 @@ IntegralCurveAttributes::GetFieldName(int index) const
case ID_numberOfRandomSamples: return "numberOfRandomSamples";
case ID_forceNodeCenteredData: return "forceNodeCenteredData";
case ID_issueTerminationWarnings: return "issueTerminationWarnings";
case ID_issueStepsizeWarnings: return "issueStepsizeWarnings";
case ID_issueStiffnessWarnings: return "issueStiffnessWarnings";
case ID_issueCriticalPointsWarnings: return "issueCriticalPointsWarnings";
case ID_criticalPointThreshold: return "criticalPointThreshold";
......@@ -3238,6 +3264,7 @@ IntegralCurveAttributes::GetFieldType(int index) const
case ID_numberOfRandomSamples: return FieldType_int;
case ID_forceNodeCenteredData: return FieldType_bool;
case ID_issueTerminationWarnings: return FieldType_bool;
case ID_issueStepsizeWarnings: return FieldType_bool;
case ID_issueStiffnessWarnings: return FieldType_bool;
case ID_issueCriticalPointsWarnings: return FieldType_bool;
case ID_criticalPointThreshold: return FieldType_double;
......@@ -3329,6 +3356,7 @@ IntegralCurveAttributes::GetFieldTypeName(int index) const
case ID_numberOfRandomSamples: return "int";
case ID_forceNodeCenteredData: return "bool";
case ID_issueTerminationWarnings: return "bool";
case ID_issueStepsizeWarnings: return "bool";
case ID_issueStiffnessWarnings: return "bool";
case ID_issueCriticalPointsWarnings: return "bool";
case ID_criticalPointThreshold: return "double";
......@@ -3703,6 +3731,11 @@ IntegralCurveAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) cons
retval = (issueTerminationWarnings == obj.issueTerminationWarnings);
}
break;
case ID_issueStepsizeWarnings:
{ // new scope
retval = (issueStepsizeWarnings == obj.issueStepsizeWarnings);
}
break;
case ID_issueStiffnessWarnings:
{ // new scope
retval = (issueStiffnessWarnings == obj.issueStiffnessWarnings);
......
......@@ -243,6 +243,7 @@ public:
void SetNumberOfRandomSamples(int numberOfRandomSamples_);
void SetForceNodeCenteredData(bool forceNodeCenteredData_);
void SetIssueTerminationWarnings(bool issueTerminationWarnings_);
void SetIssueStepsizeWarnings(bool issueStepsizeWarnings_);
void SetIssueStiffnessWarnings(bool issueStiffnessWarnings_);
void SetIssueCriticalPointsWarnings(bool issueCriticalPointsWarnings_);
void SetCriticalPointThreshold(double criticalPointThreshold_);
......@@ -324,6 +325,7 @@ public:
int GetNumberOfRandomSamples() const;
bool GetForceNodeCenteredData() const;
bool GetIssueTerminationWarnings() const;
bool GetIssueStepsizeWarnings() const;
bool GetIssueStiffnessWarnings() const;
bool GetIssueCriticalPointsWarnings() const;
double GetCriticalPointThreshold() const;
......@@ -460,6 +462,7 @@ public:
ID_numberOfRandomSamples,
ID_forceNodeCenteredData,
ID_issueTerminationWarnings,
ID_issueStepsizeWarnings,
ID_issueStiffnessWarnings,
ID_issueCriticalPointsWarnings,
ID_criticalPointThreshold,
......@@ -531,6 +534,7 @@ private:
int numberOfRandomSamples;
bool forceNodeCenteredData;
bool issueTerminationWarnings;
bool issueStepsizeWarnings;
bool issueStiffnessWarnings;
bool issueCriticalPointsWarnings;
double criticalPointThreshold;
......@@ -544,6 +548,6 @@ private:
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define INTEGRALCURVEATTRIBUTES_TMFS "iDDDDDDdDDbd*d*iiiisiibdbddbddiddidDiiiiibbddiibdbdidddbbiibbbbddddis"
#define INTEGRALCURVEATTRIBUTES_TMFS "iDDDDDDdDDbd*d*iiiisiibdbddbddiddidDiiiiibbddiibdbdidddbbiibbbbbddddis"
#endif
......@@ -61,7 +61,7 @@ import java.util.Vector;
public class IntegralCurveAttributes extends AttributeSubject implements Plugin
{
private static int IntegralCurveAttributes_numAdditionalAtts = 67;
private static int IntegralCurveAttributes_numAdditionalAtts = 68;
// Enum values
public final static int SOURCETYPE_POINT = 0;
......@@ -230,6 +230,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
numberOfRandomSamples = 1;
forceNodeCenteredData = false;
issueTerminationWarnings = true;
issueStepsizeWarnings = true;
issueStiffnessWarnings = true;
issueCriticalPointsWarnings = true;
criticalPointThreshold = 0.001;
......@@ -342,6 +343,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
numberOfRandomSamples = 1;
forceNodeCenteredData = false;
issueTerminationWarnings = true;
issueStepsizeWarnings = true;
issueStiffnessWarnings = true;
issueCriticalPointsWarnings = true;
criticalPointThreshold = 0.001;
......@@ -464,6 +466,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
numberOfRandomSamples = obj.numberOfRandomSamples;
forceNodeCenteredData = obj.forceNodeCenteredData;
issueTerminationWarnings = obj.issueTerminationWarnings;
issueStepsizeWarnings = obj.issueStepsizeWarnings;
issueStiffnessWarnings = obj.issueStiffnessWarnings;
issueCriticalPointsWarnings = obj.issueCriticalPointsWarnings;
criticalPointThreshold = obj.criticalPointThreshold;
......@@ -613,6 +616,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
(numberOfRandomSamples == obj.numberOfRandomSamples) &&
(forceNodeCenteredData == obj.forceNodeCenteredData) &&
(issueTerminationWarnings == obj.issueTerminationWarnings) &&
(issueStepsizeWarnings == obj.issueStepsizeWarnings) &&
(issueStiffnessWarnings == obj.issueStiffnessWarnings) &&
(issueCriticalPointsWarnings == obj.issueCriticalPointsWarnings) &&
(criticalPointThreshold == obj.criticalPointThreshold) &&
......@@ -1062,52 +1066,58 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
Select(58);
}
public void SetIssueStepsizeWarnings(boolean issueStepsizeWarnings_)
{
issueStepsizeWarnings = issueStepsizeWarnings_;
Select(59);
}
public void SetIssueStiffnessWarnings(boolean issueStiffnessWarnings_)
{
issueStiffnessWarnings = issueStiffnessWarnings_;
Select(59);
Select(60);
}
public void SetIssueCriticalPointsWarnings(boolean issueCriticalPointsWarnings_)
{
issueCriticalPointsWarnings = issueCriticalPointsWarnings_;
Select(60);
Select(61);
}
public void SetCriticalPointThreshold(double criticalPointThreshold_)
{
criticalPointThreshold = criticalPointThreshold_;
Select(61);
Select(62);
}
public void SetCorrelationDistanceAngTol(double correlationDistanceAngTol_)
{
correlationDistanceAngTol = correlationDistanceAngTol_;
Select(62);
Select(63);
}
public void SetCorrelationDistanceMinDistAbsolute(double correlationDistanceMinDistAbsolute_)
{
correlationDistanceMinDistAbsolute = correlationDistanceMinDistAbsolute_;
Select(63);
Select(64);
}
public void SetCorrelationDistanceMinDistBBox(double correlationDistanceMinDistBBox_)
{
correlationDistanceMinDistBBox = correlationDistanceMinDistBBox_;
Select(64);
Select(65);
}
public void SetCorrelationDistanceMinDistType(int correlationDistanceMinDistType_)
{
correlationDistanceMinDistType = correlationDistanceMinDistType_;
Select(65);
Select(66);
}
public void SetSelection(String selection_)
{
selection = selection_;
Select(66);
Select(67);
}
// Property getting methods
......@@ -1170,6 +1180,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
public int GetNumberOfRandomSamples() { return numberOfRandomSamples; }
public boolean GetForceNodeCenteredData() { return forceNodeCenteredData; }
public boolean GetIssueTerminationWarnings() { return issueTerminationWarnings; }
public boolean GetIssueStepsizeWarnings() { return issueStepsizeWarnings; }
public boolean GetIssueStiffnessWarnings() { return issueStiffnessWarnings; }
public boolean GetIssueCriticalPointsWarnings() { return issueCriticalPointsWarnings; }
public double GetCriticalPointThreshold() { return criticalPointThreshold; }
......@@ -1301,20 +1312,22 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
if(WriteSelect(58, buf))
buf.WriteBool(issueTerminationWarnings);
if(WriteSelect(59, buf))
buf.WriteBool(issueStiffnessWarnings);
buf.WriteBool(issueStepsizeWarnings);
if(WriteSelect(60, buf))
buf.WriteBool(issueCriticalPointsWarnings);
buf.WriteBool(issueStiffnessWarnings);
if(WriteSelect(61, buf))
buf.WriteDouble(criticalPointThreshold);
buf.WriteBool(issueCriticalPointsWarnings);
if(WriteSelect(62, buf))
buf.WriteDouble(correlationDistanceAngTol);
buf.WriteDouble(criticalPointThreshold);
if(WriteSelect(63, buf))
buf.WriteDouble(correlationDistanceMinDistAbsolute);
buf.WriteDouble(correlationDistanceAngTol);
if(WriteSelect(64, buf))
buf.WriteDouble(correlationDistanceMinDistBBox);
buf.WriteDouble(correlationDistanceMinDistAbsolute);
if(WriteSelect(65, buf))
buf.WriteInt(correlationDistanceMinDistType);
buf.WriteDouble(correlationDistanceMinDistBBox);
if(WriteSelect(66, buf))
buf.WriteInt(correlationDistanceMinDistType);
if(WriteSelect(67, buf))
buf.WriteString(selection);
}
......@@ -1500,27 +1513,30 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
SetIssueTerminationWarnings(buf.ReadBool());
break;
case 59:
SetIssueStiffnessWarnings(buf.ReadBool());
SetIssueStepsizeWarnings(buf.ReadBool());
break;
case 60:
SetIssueCriticalPointsWarnings(buf.ReadBool());
SetIssueStiffnessWarnings(buf.ReadBool());
break;
case 61:
SetCriticalPointThreshold(buf.ReadDouble());
SetIssueCriticalPointsWarnings(buf.ReadBool());
break;
case 62:
SetCorrelationDistanceAngTol(buf.ReadDouble());
SetCriticalPointThreshold(buf.ReadDouble());
break;
case 63:
SetCorrelationDistanceMinDistAbsolute(buf.ReadDouble());
SetCorrelationDistanceAngTol(buf.ReadDouble());
break;
case 64:
SetCorrelationDistanceMinDistBBox(buf.ReadDouble());
SetCorrelationDistanceMinDistAbsolute(buf.ReadDouble());
break;
case 65:
SetCorrelationDistanceMinDistType(buf.ReadInt());
SetCorrelationDistanceMinDistBBox(buf.ReadDouble());
break;
case 66:
SetCorrelationDistanceMinDistType(buf.ReadInt());
break;
case 67:
SetSelection(buf.ReadString());
break;
}
......@@ -1704,6 +1720,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
str = str + intToString("numberOfRandomSamples", numberOfRandomSamples, indent) + "\n";
str = str + boolToString("forceNodeCenteredData", forceNodeCenteredData, indent) + "\n";
str = str + boolToString("issueTerminationWarnings", issueTerminationWarnings, indent) + "\n";
str = str + boolToString("issueStepsizeWarnings", issueStepsizeWarnings, indent) + "\n";
str = str + boolToString("issueStiffnessWarnings", issueStiffnessWarnings, indent) + "\n";
str = str + boolToString("issueCriticalPointsWarnings", issueCriticalPointsWarnings, indent) + "\n";
str = str + doubleToString("criticalPointThreshold", criticalPointThreshold, indent) + "\n";
......@@ -1781,6 +1798,7 @@ public class IntegralCurveAttributes extends AttributeSubject implements Plugin
private int numberOfRandomSamples;
private boolean forceNodeCenteredData;
private boolean issueTerminationWarnings;
private boolean issueStepsizeWarnings;
private boolean issueStiffnessWarnings;
private boolean issueCriticalPointsWarnings;
private double criticalPointThreshold;
......
......@@ -652,6 +652,11 @@ PyIntegralCurveAttributes_ToString(const IntegralCurveAttributes *atts, const ch
else
SNPRINTF(tmpStr, 1000, "%sissueTerminationWarnings = 0\n", prefix);
str += tmpStr;
if(atts->GetIssueStepsizeWarnings())
SNPRINTF(tmpStr, 1000, "%sissueStepsizeWarnings = 1\n", prefix);
else
SNPRINTF(tmpStr, 1000, "%sissueStepsizeWarnings = 0\n", prefix);
str += tmpStr;
if(atts->GetIssueStiffnessWarnings())
SNPRINTF(tmpStr, 1000, "%sissueStiffnessWarnings = 1\n", prefix);
else
......@@ -2560,6 +2565,30 @@ IntegralCurveAttributes_GetIssueTerminationWarnings(PyObject *self, PyObject *ar
return retval;
}
/*static*/ PyObject *
IntegralCurveAttributes_SetIssueStepsizeWarnings(PyObject *self, PyObject *args)
{
IntegralCurveAttributesObject *obj = (IntegralCurveAttributesObject *)self;
int ival;
if(!PyArg_ParseTuple(args, "i", &ival))
return NULL;
// Set the issueStepsizeWarnings in the object.
obj->data->SetIssueStepsizeWarnings(ival != 0);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
IntegralCurveAttributes_GetIssueStepsizeWarnings(PyObject *self, PyObject *args)
{
IntegralCurveAttributesObject *obj = (IntegralCurveAttributesObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetIssueStepsizeWarnings()?1L:0L);
return retval;
}
/*static*/ PyObject *
IntegralCurveAttributes_SetIssueStiffnessWarnings(PyObject *self, PyObject *args)
{
......@@ -2883,6 +2912,8 @@ PyMethodDef PyIntegralCurveAttributes_methods[INTEGRALCURVEATTRIBUTES_NMETH] = {
{"GetForceNodeCenteredData", IntegralCurveAttributes_GetForceNodeCenteredData, METH_VARARGS},
{"SetIssueTerminationWarnings", IntegralCurveAttributes_SetIssueTerminationWarnings, METH_VARARGS},
{"GetIssueTerminationWarnings", IntegralCurveAttributes_GetIssueTerminationWarnings, METH_VARARGS},
{"SetIssueStepsizeWarnings", IntegralCurveAttributes_SetIssueStepsizeWarnings, METH_VARARGS},
{"GetIssueStepsizeWarnings", IntegralCurveAttributes_GetIssueStepsizeWarnings, METH_VARARGS},
{"SetIssueStiffnessWarnings", IntegralCurveAttributes_SetIssueStiffnessWarnings, METH_VARARGS},
{"GetIssueStiffnessWarnings", IntegralCurveAttributes_GetIssueStiffnessWarnings, METH_VARARGS},
{"SetIssueCriticalPointsWarnings", IntegralCurveAttributes_SetIssueCriticalPointsWarnings, METH_VARARGS},
......@@ -3161,6 +3192,8 @@ PyIntegralCurveAttributes_getattr(PyObject *self, char *name)
return IntegralCurveAttributes_GetForceNodeCenteredData(self, NULL);
if(strcmp(name, "issueTerminationWarnings") == 0)
return IntegralCurveAttributes_GetIssueTerminationWarnings(self, NULL);
if(strcmp(name, "issueStepsizeWarnings") == 0)
return IntegralCurveAttributes_GetIssueStepsizeWarnings(self, NULL);
if(strcmp(name, "issueStiffnessWarnings") == 0)
return IntegralCurveAttributes_GetIssueStiffnessWarnings(self, NULL);
if(strcmp(name, "issueCriticalPointsWarnings") == 0)
......@@ -3314,6 +3347,8 @@ PyIntegralCurveAttributes_setattr(PyObject *self, char *name, PyObject *args)
obj = IntegralCurveAttributes_SetForceNodeCenteredData(self, tuple);
else if(strcmp(name, "issueTerminationWarnings") == 0)
obj = IntegralCurveAttributes_SetIssueTerminationWarnings(self, tuple);
else if(strcmp(name, "issueStepsizeWarnings") == 0)
obj = IntegralCurveAttributes_SetIssueStepsizeWarnings(self, tuple);
else if(strcmp(name, "issueStiffnessWarnings") == 0)
obj = IntegralCurveAttributes_SetIssueStiffnessWarnings(self, tuple);
else if(strcmp(name, "issueCriticalPointsWarnings") == 0)
......
......@@ -44,7 +44,7 @@
//
// Functions exposed to the VisIt module.
//
#define INTEGRALCURVEATTRIBUTES_NMETH 136
#define INTEGRALCURVEATTRIBUTES_NMETH 138
void PyIntegralCurveAttributes_StartUp(IntegralCurveAttributes *subj, void *data);
void PyIntegralCurveAttributes_CloseDown();
PyMethodDef * PyIntegralCurveAttributes_GetMethodTable(int *nMethods);
......
......@@ -1019,33 +1019,40 @@ QvisIntegralCurveWindow::CreateAdvancedTab(QWidget *pageAdvanced)
QLabel *maxStepsLabel = new QLabel(tr("Issue warning when the maximum number of steps is reached."), warningsGrp);
warningsGLayout->addWidget(maxStepsLabel, 0, 1, 1, 2);
issueWarningForStepsize = new QCheckBox(central);
connect(issueWarningForStepsize, SIGNAL(toggled(bool)),
this, SLOT(issueWarningForStepsizeChanged(bool)));
warningsGLayout->addWidget(issueWarningForStepsize, 1, 0);
QLabel *stepsizeLabel = new QLabel(tr("Issue warning when a step size underflow is detected."), warningsGrp);
warningsGLayout->addWidget(stepsizeLabel, 1, 1, 1, 2);
issueWarningForStiffness = new QCheckBox(central);
connect(issueWarningForStiffness, SIGNAL(toggled(bool)),
this, SLOT(issueWarningForStiffnessChanged(bool)));
warningsGLayout->addWidget(issueWarningForStiffness, 1, 0);
QLabel *stiffnessLabel = new QLabel(tr("Issue warning when stiffness is detected."), warningsGrp);
warningsGLayout->addWidget(stiffnessLabel, 1, 1, 1, 2);
warningsGLayout->addWidget(issueWarningForStiffness, 2, 0);
QLabel *stiffnessLabel = new QLabel(tr("Issue warning when a stiffness condition is detected."), warningsGrp);
warningsGLayout->addWidget(stiffnessLabel, 2, 1, 1, 2);
QLabel *stiffnessDescLabel1 = new QLabel(tr("(Stiffness refers to one vector component being so much "), warningsGrp);
warningsGLayout->addWidget(stiffnessDescLabel1, 2, 1, 1, 2);
warningsGLayout->addWidget(stiffnessDescLabel1, 3, 1, 1, 2);
QLabel *stiffnessDescLabel2 = new QLabel(tr("larger than another that tolerances can't be met.)"), warningsGrp);
warningsGLayout->addWidget(stiffnessDescLabel2, 3, 1, 1, 2);
warningsGLayout->addWidget(stiffnessDescLabel2, 4, 1, 1, 2);
issueWarningForCriticalPoints = new QCheckBox(central);
connect(issueWarningForCriticalPoints, SIGNAL(toggled(bool)),
this, SLOT(issueWarningForCriticalPointsChanged(bool)));
warningsGLayout->addWidget(issueWarningForCriticalPoints, 4, 0);
warningsGLayout->addWidget(issueWarningForCriticalPoints, 5, 0);
QLabel *critPointLabel = new QLabel(tr("Issue warning when a curve doesn't terminate at a critical point."), warningsGrp);
warningsGLayout->addWidget(critPointLabel, 4, 1, 1, 2);
warningsGLayout->addWidget(critPointLabel, 5, 1, 1, 2);
QLabel *critPointDescLabel = new QLabel(tr("(I.e. the curve circles around the critical point without stopping.)"), warningsGrp);
warningsGLayout->addWidget(critPointDescLabel, 5, 1, 1, 2);
warningsGLayout->addWidget(critPointDescLabel, 6, 1, 1, 2);
criticalPointThresholdLabel = new QLabel(tr("Speed cutoff for critical points"), warningsGrp);
criticalPointThresholdLabel->setAlignment(Qt::AlignRight | Qt::AlignCenter);
warningsGLayout->addWidget(criticalPointThresholdLabel, 6, 1);
warningsGLayout->addWidget(criticalPointThresholdLabel, 7, 1);
criticalPointThreshold = new QLineEdit(warningsGrp);
criticalPointThreshold->setAlignment(Qt::AlignLeft);
connect(criticalPointThreshold, SIGNAL(returnPressed()),
this, SLOT(criticalPointThresholdProcessText()));
warningsGLayout->addWidget(criticalPointThreshold, 6, 2);
warningsGLayout->addWidget(criticalPointThreshold, 7, 2);
}
// ****************************************************************************
......@@ -1609,6 +1616,11 @@ QvisIntegralCurveWindow::UpdateWindow(bool doAll)
issueWarningForCriticalPoints->blockSignals(false);
break;
case IntegralCurveAttributes::ID_issueStepsizeWarnings:
issueWarningForStepsize->blockSignals(true);
issueWarningForStepsize->setChecked(atts->GetIssueStepsizeWarnings());
issueWarningForStepsize->blockSignals(false);
break;
case IntegralCurveAttributes::ID_issueStiffnessWarnings:
issueWarningForStiffness->blockSignals(true);
issueWarningForStiffness->setChecked(atts->GetIssueStiffnessWarnings());
......@@ -3223,6 +3235,13 @@ QvisIntegralCurveWindow::issueWarningForMaxStepsChanged(bool val)
Apply();
}
void
QvisIntegralCurveWindow::issueWarningForStepsizeChanged(bool val)
{
atts->SetIssueStepsizeWarnings(val);
Apply();
}
void
QvisIntegralCurveWindow::issueWarningForStiffnessChanged(bool val)
{
......
......@@ -269,6 +269,7 @@ class QvisIntegralCurveWindow : public QvisOperatorWindow
void pathlineCMFEButtonGroupChanged(int val);
void issueWarningForMaxStepsChanged(bool);
void issueWarningForStepsizeChanged(bool);
void issueWarningForStiffnessChanged(bool);
void issueWarningForCriticalPointsChanged(bool);
void criticalPointThresholdProcessText();
......@@ -377,6 +378,7 @@ class QvisIntegralCurveWindow : public QvisOperatorWindow
QButtonGroup *pathlineCMFEButtonGroup;
QCheckBox *issueWarningForMaxSteps;
QCheckBox *issueWarningForStepsize;
QCheckBox *issueWarningForStiffness;
QCheckBox *issueWarningForCriticalPoints;
QLineEdit *criticalPointThreshold;
......
......@@ -228,6 +228,7 @@ avtIntegralCurveFilter::avtIntegralCurveFilter() : seedVelocity(0,0,0),
storeVelocitiesForLighting = false;
issueWarningForMaxStepsTermination = true;
issueWarningForStepsize = true;
issueWarningForStiffness = true;
issueWarningForCriticalPoints = true;
criticalPointThreshold = 1e-3;
......@@ -671,6 +672,7 @@ avtIntegralCurveFilter::SetAtts(const AttributeGroup *a)
IssueWarningForMaxStepsTermination(atts.GetIssueTerminationWarnings());
IssueWarningForStiffness(atts.GetIssueStiffnessWarnings());
IssueWarningForStepsize(atts.GetIssueStepsizeWarnings());
IssueWarningForCriticalPoints(atts.GetIssueCriticalPointsWarnings(),
atts.GetCriticalPointThreshold());
......@@ -2366,6 +2368,7 @@ avtIntegralCurveFilter::ReportWarnings(std::vector<avtIntegralCurve *> &ics)
int numICs = (int)ics.size();
int numEarlyTerminators = 0;
int numStepSize = 0;
int numStiff = 0;
int numCritPts = 0;
......@@ -2385,6 +2388,9 @@ avtIntegralCurveFilter::ReportWarnings(std::vector<avtIntegralCurve *> &ics)
if (ic->TerminatedBecauseOfMaxSteps())
numEarlyTerminators++;
if (ic->status.StepSizeUnderflow())
numStepSize++;
if (ic->EncounteredNumericalProblems())
numStiff++;
}
......@@ -2427,6 +2433,21 @@ avtIntegralCurveFilter::ReportWarnings(std::vector<avtIntegralCurve *> &ics)
}
}
if (issueWarningForStepsize)
{
SumIntAcrossAllProcessors(numStepSize);
if (numStepSize > 0)
{
SNPRINTF(str, 4096,
"%s\n%d of your integral curves were unable to advect because of the \"stepsize\". "
"Often the step size becomes too small when appraoching a spatial "
"or temporal boundary. This especially happens when the step size matches "
"the temporal spacing. This condition is referred to as stepsize underflow and "
"VisIt stops advecting in this case. If you want to disable this message, "
"you can do this under the Advanced tab.\n", str, numStepSize);
}
}
if (issueWarningForStiffness)
{
SumIntAcrossAllProcessors(numStiff);
......
......@@ -167,6 +167,8 @@ class avtIntegralCurveFilter : public virtual avtPluginFilter,
void IssueWarningForMaxStepsTermination(bool v)
{ issueWarningForMaxStepsTermination = v; };
void IssueWarningForStepsize(bool v)
{ issueWarningForStepsize = v; };
void IssueWarningForStiffness(bool v)
{ issueWarningForStiffness = v; };
void IssueWarningForCriticalPoints(bool v, double speed)
......@@ -261,6 +263,7 @@ class avtIntegralCurveFilter : public virtual avtPluginFilter,
bool storeVelocitiesForLighting;
bool issueWarningForMaxStepsTermination;
bool issueWarningForStepsize;
bool issueWarningForStiffness;
bool issueWarningForCriticalPoints;
double criticalPointThreshold;
......
......@@ -247,6 +247,9 @@
<Field name="issueTerminationWarnings" label="Issue Warning When Termination Criteria Is Not Met" type="bool">
true
</Field>
<Field name="issueStepsizeWarnings" label="Issue warnings when the stepsize is too small" type="bool">
true
</Field>
<Field name="issueStiffnessWarnings" label="Issue warnings when stiffness is encountered" type="bool">
true
</Field>
......
......@@ -644,6 +644,7 @@ void LCSAttributes::Init()
issueAdvectionWarnings = true;
issueBoundaryWarnings = true;
issueTerminationWarnings = true;
issueStepsizeWarnings = true;
issueStiffnessWarnings = true;
issueCriticalPointsWarnings = true;
criticalPointThreshold = 0.001;
......@@ -731,6 +732,7 @@ void LCSAttributes::Copy(const LCSAttributes &obj)
issueAdvectionWarnings = obj.issueAdvectionWarnings;
issueBoundaryWarnings = obj.issueBoundaryWarnings;
issueTerminationWarnings = obj.issueTerminationWarnings;
issueStepsizeWarnings = obj.issueStepsizeWarnings;
issueStiffnessWarnings = obj.issueStiffnessWarnings;
issueCriticalPointsWarnings = obj.issueCriticalPointsWarnings;
criticalPointThreshold = obj.criticalPointThreshold;
......@@ -962,6 +964,7 @@ LCSAttributes::operator == (const LCSAttributes &obj) const
(issueAdvectionWarnings == obj.issueAdvectionWarnings) &&
(issueBoundaryWarnings == obj.issueBoundaryWarnings) &&
(issueTerminationWarnings == obj.issueTerminationWarnings) &&
(issueStepsizeWarnings == obj.issueStepsizeWarnings) &&
(issueStiffnessWarnings == obj.issueStiffnessWarnings) &&
(issueCriticalPointsWarnings == obj.issueCriticalPointsWarnings) &&
(criticalPointThreshold == obj.criticalPointThreshold));
......@@ -1173,6 +1176,7 @@ LCSAttributes::SelectAll()
Select(ID_issueAdvectionWarnings, (void *)&issueAdvectionWarnings);
Select(ID_issueBoundaryWarnings, (void *)&issueBoundaryWarnings);
Select(ID_issueTerminationWarnings, (void *)&issueTerminationWarnings);
Select(ID_issueStepsizeWarnings, (void *)&issueStepsizeWarnings);
Select(ID_issueStiffnessWarnings, (void *)&issueStiffnessWarnings);
Select(ID_issueCriticalPointsWarnings, (void *)&issueCriticalPointsWarnings);
Select(ID_criticalPointThreshold, (void *)&criticalPointThreshold);
......@@ -1514,6 +1518,12 @@ LCSAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd
node->AddNode(new DataNode("issueTerminationWarnings", issueTerminationWarnings));
}
if(completeSave || !FieldsEqual(ID_issueStepsizeWarnings, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("issueStepsizeWarnings", issueStepsizeWarnings));
}
if(completeSave || !FieldsEqual(ID_issueStiffnessWarnings, &defaultObject))
{
addToParent = true;
......@@ -1880,6 +1890,8 @@ LCSAttributes::SetFromNode(DataNode *parentNode)
SetIssueBoundaryWarnings(node->AsBool());
if((node = searchNode->GetNode("issueTerminationWarnings")) != 0)
SetIssueTerminationWarnings(node->AsBool());
if((node = searchNode->GetNode("issueStepsizeWarnings")) != 0)
SetIssueStepsizeWarnings(node->AsBool());
if((node = searchNode->GetNode("issueStiffnessWarnings")) != 0)
SetIssueStiffnessWarnings(node->AsBool());
if((node = searchNode->GetNode("issueCriticalPointsWarnings")) != 0)
......@@ -2257,6 +2269,13 @@ LCSAttributes::SetIssueTerminationWarnings(bool issueTerminationWarnings_)
Select(ID_issueTerminationWarnings, (void *)&issueTerminationWarnings);
}
void
LCSAttributes::SetIssueStepsizeWarnings(bool issueStepsizeWarnings_)
{
issueStepsizeWarnings = issueStepsizeWarnings_;
Select(ID_issueStepsizeWarnings, (void *)&issueStepsizeWarnings);
}
void
LCSAttributes::SetIssueStiffnessWarnings(bool issueStiffnessWarnings_)
{
......@@ -2612,6 +2631,12 @@ LCSAttributes::GetIssueTerminationWarnings() const
return issueTerminationWarnings;
}
bool
LCSAttributes::GetIssueStepsizeWarnings() const
{
return issueStepsizeWarnings;
}
bool
LCSAttributes::GetIssueStiffnessWarnings() const
{
......@@ -2733,6 +2758,7 @@ LCSAttributes::GetFieldName(int index) const
case ID_issueAdvectionWarnings: return "issueAdvectionWarnings";
case ID_issueBoundaryWarnings: return "issueBoundaryWarnings";
case ID_issueTerminationWarnings:</