Commit b8544330 authored by allens's avatar allens

Clean up of the LCS to work with the IC operator

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@26753 18c085ea-50e0-402c-830e-de6fd14e8384
parent bbe40a3e
......@@ -105,10 +105,10 @@ SET(INSTALLTARGETS ILCSOperator)
IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
QT_WRAP_CPP(GLCSOperator LIBG_SOURCES ${LIBG_MOC_SOURCES})
ADD_LIBRARY(GLCSOperator ${LIBG_SOURCES})
TARGET_LINK_LIBRARIES(GLCSOperator visitcommon gui )
TARGET_LINK_LIBRARIES(GLCSOperator visitcommon gui vtkImagingGeneral )
ADD_LIBRARY(VLCSOperator ${LIBV_SOURCES})
TARGET_LINK_LIBRARIES(VLCSOperator visitcommon viewer )
TARGET_LINK_LIBRARIES(VLCSOperator visitcommon viewer vtkImagingGeneral )
SET(INSTALLTARGETS ${INSTALLTARGETS} GLCSOperator VLCSOperator)
IF(VISIT_PYTHON_SCRIPTING)
......@@ -131,12 +131,12 @@ IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO
ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(ELCSOperator_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(ELCSOperator_ser visitcommon avtexpressions_ser avtfilters_ser avtpipeline_ser avtivp_ser vtkImagingGeneral )
TARGET_LINK_LIBRARIES(ELCSOperator_ser visitcommon avtexpressions_ser avtfilters_ser avtpipeline_ser vtkImagingGeneral avtivp_ser )
SET(INSTALLTARGETS ${INSTALLTARGETS} ELCSOperator_ser)
IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(ELCSOperator_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(ELCSOperator_par visitcommon avtexpressions_par avtfilters_par avtpipeline_par avtivp_par vtkImagingGeneral )
TARGET_LINK_LIBRARIES(ELCSOperator_par visitcommon avtexpressions_par avtfilters_par avtpipeline_par vtkImagingGeneral avtivp_par )
SET(INSTALLTARGETS ${INSTALLTARGETS} ELCSOperator_par)
ENDIF(VISIT_PARALLEL)
......
<?xml version="1.0"?>
<Plugin name="LCS" type="operator" label="LCS" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" category="Integral Curves" createExpression="true" exprInType="vector" exprOutType="scalar,vector">
<Attribute name="LCSAttributes" purpose="Attributes for LCS" persistent="true" keyframe="true" exportAPI="" exportInclude="" codefile="LCSAttributes.code">
<Files components="E">
avtLCSFilter.C
avtLCSFilterFTLE.C
avtLCSFilterFSLE.C
</Files>
<LDFLAGS>
${NEKTAR++_LIBRARY_DIR} ${NEKTAR++_LIBRARY_DIRS} ${NEKTAR++_TP_LIBRARY_DIRS} ${ACCELERATE_FRAMEWORK_LINK_FLAGS}
</LDFLAGS>
<LIBS>
vtkImagingGeneral
</LIBS>
<LIBS components="ESer">
avtivp_ser
vtkImagingGeneral
</LIBS>
<LIBS components="EPar">
avtivp_par
vtkImagingGeneral
</LIBS>
<Enum name="SourceType">
NativeMesh
......@@ -57,7 +66,7 @@
<Enum name="OperationType">
IntegrationTime
ArcLength
AverageDistanceFromSeed
AverageDistanceFromSeed
EigenValue
EigenVector
Lyapunov
......@@ -70,7 +79,10 @@
Smallest
Intermediate
Largest
Combination
PosShearVector
NegShearVector
PosLambdaShearVector
NegLambdaShearVector
</Enum>
<Enum name="OperatorType">
BaseValue
......@@ -116,7 +128,7 @@
None
</Field>
<Field name="auxiliaryGridSpacing" label="Auxiliary grid sspacing" type="double" enabler="auxiliaryGrid:2D">
0.0001
0.000100
</Field>
<Field name="maxSteps" label="Maximum number of steps" type="int">
1000
......@@ -128,10 +140,10 @@
Right
</Field>
<Field name="eigenComponent" label="Eigen component" type="enum" subtype="EigenComponent">
Smallest
Largest
</Field>
<Field name="eigenWeight" label="Weight" type="double" enabler="eigenComponent:Combination">
Smallest
1.000000
</Field>
<Field name="operatorType" label="Operator type" type="enum" subtype="OperatorType">
BaseValue
......@@ -193,7 +205,7 @@
DormandPrince
</Field>
<Field name="clampLogValues" label="Clamp log values" type="bool">
true
false
</Field>
<Field name="parallelizationAlgorithmType" label="Parallelization algorithm type" type="enum" subtype="ParallelizationAlgorithmType">
VisItSelects
......@@ -217,27 +229,23 @@
0.000000
</Field>
<Field name="pathlinesPeriod" label="Pathlines Period" type="double">
0.0
0.000000
</Field>
<Field name="pathlinesCMFE" label="CMFE" type="enum" subtype="PathlinesCMFE">
POS_CMFE
</Field>
<Field name="thresholdLimit" label="Threshold limit" type="double">
0.1
0.100000
</Field>
<Field name="radialLimit" label="Radial crop distance" type="double">
0.1
0.100000
</Field>
<Field name="boundaryLimit" label="Boundary crop distance" type="double">
0.1
0.100000
</Field>
<Field name="seedLimit" label="Maximum number of seeds" type="int">
10
</Field>
<Field name="forceNodeCenteredData" label="forceNodeCenteredData" type="bool">
false
</Field>
<Field name="issueAdvectionWarnings" label="Issue warning when the advection stops before the limits" type="bool">
true
</Field>
......@@ -259,7 +267,6 @@
<Field name="criticalPointThreshold" label="criticalPointThreshold" type="double" enabler="issueCriticalPointsWarnings:true">
0.001000
</Field>
<Function name="CopyAttributes" user="false" member="true">
</Function>
<Function name="CreateCompatible" user="false" member="true">
......
This diff is collapsed.
Target: xml2atts
Function: CopyAttributes
Declaration: bool CopyAttributes(const AttributeGroup *atts);
Definition:
......@@ -38,7 +37,6 @@ LCSAttributes::CopyAttributes(const AttributeGroup *atts)
return retval;
}
Target: xml2atts
Function: CreateCompatible
Declaration: AttributeSubject *CreateCompatible(const std::string &tname) const
Definition:
......@@ -74,7 +72,6 @@ LCSAttributes::CreateCompatible(const std::string &tname) const
return retval;
}
Target: xml2atts
Function: ChangesRequireRecalculation
Declaration: bool ChangesRequireRecalculation(const LCSAttributes &) const;
Definition:
......@@ -130,15 +127,15 @@ LCSAttributes::ChangesRequireRecalculation(const LCSAttributes &obj) const
//Check the general stuff first...
if( sourceType != obj.sourceType ||
auxiliaryGrid != obj.auxiliaryGrid ||
auxiliaryGridSpacing != obj.auxiliaryGridSpacing ||
fieldType != obj.fieldType ||
fieldConstant != obj.fieldConstant ||
integrationDirection != obj.integrationDirection ||
maxSteps != obj.maxSteps ||
terminationType != obj.terminationType ||
terminateBySize != obj.terminateBySize ||
termSize != obj.termSize ||
terminateByDistance != obj.terminateByDistance ||
termDistance != obj.termDistance ||
terminateByTime != obj.terminateByTime ||
termTime != obj.termTime ||
integrationType != obj.integrationType ||
maxStepLength != obj.maxStepLength ||
limitMaximumTimestep != obj.limitMaximumTimestep ||
maxTimeStep != obj.maxTimeStep ||
......@@ -146,23 +143,42 @@ LCSAttributes::ChangesRequireRecalculation(const LCSAttributes &obj) const
absTolSizeType != obj.absTolSizeType ||
absTolAbsolute != obj.absTolAbsolute ||
absTolBBox != obj.absTolBBox ||
fieldType != obj.fieldType ||
fieldConstant != obj.fieldConstant ||
operationType != obj.operationType ||
eigenComponent != obj.eigenComponent ||
eigenWeight != obj.eigenWeight ||
operatorType != obj.operatorType ||
cauchyGreenTensor != obj.cauchyGreenTensor ||
clampLogValues != obj.clampLogValues ||
terminationType != obj.terminationType ||
terminateBySize != obj.terminateBySize ||
termSize != obj.termSize ||
terminateByDistance != obj.terminateByDistance ||
termDistance != obj.termDistance ||
terminateByTime != obj.terminateByTime ||
termTime != obj.termTime ||
maxSteps != obj.maxSteps ||
thresholdLimit != obj.thresholdLimit ||
radialLimit != obj.radialLimit ||
boundaryLimit != obj.boundaryLimit ||
seedLimit != obj.seedLimit ||
integrationType != obj.integrationType ||
parallelizationAlgorithmType != obj.parallelizationAlgorithmType ||
maxProcessCount != obj.maxProcessCount ||
maxDomainCacheSize != obj.maxDomainCacheSize ||
workGroupSize != obj.workGroupSize ||
pathlines != obj.pathlines ||
pathlinesOverrideStartingTimeFlag != obj.pathlinesOverrideStartingTimeFlag ||
pathlinesOverrideStartingTime != obj.pathlinesOverrideStartingTime ||
pathlinesCMFE != obj.pathlinesCMFE ||
forceNodeCenteredData != obj.forceNodeCenteredData ||
parallelizationAlgorithmType != obj.parallelizationAlgorithmType ||
maxProcessCount != obj.maxProcessCount ||
maxDomainCacheSize != obj.maxDomainCacheSize ||
workGroupSize != obj.workGroupSize ||
issueAdvectionWarnings != obj.issueAdvectionWarnings ||
issueBoundaryWarnings != obj.issueBoundaryWarnings ||
issueTerminationWarnings != obj.issueTerminationWarnings ||
issueStepsizeWarnings != obj.issueStepsizeWarnings ||
issueStiffnessWarnings != obj.issueStiffnessWarnings ||
issueCriticalPointsWarnings != obj.issueCriticalPointsWarnings ||
criticalPointThreshold != obj.criticalPointThreshold )
......@@ -183,24 +199,16 @@ LCSAttributes::ChangesRequireRecalculation(const LCSAttributes &obj) const
}
//Check by source type.
if ((sourceType == RegularGrid) &&
POINT_DIFFERS(Resolution, obj.Resolution))
{
return true;
}
if ((sourceType == RegularGrid) &&
UseDataSetStart == Subset &&
POINT_DIFFERS(StartPosition, obj.StartPosition))
if (sourceType == RegularGrid)
{
return true;
}
if ((sourceType == RegularGrid) &&
UseDataSetEnd == Subset &&
POINT_DIFFERS(EndPosition, obj.EndPosition))
{
return true;
if( (POINT_DIFFERS(Resolution, obj.Resolution)) ||
(UseDataSetStart == Subset &&
POINT_DIFFERS(StartPosition, obj.StartPosition)) ||
(UseDataSetEnd == Subset &&
POINT_DIFFERS(EndPosition, obj.EndPosition)) )
{
return true;
}
}
return false;
......@@ -234,10 +242,12 @@ LCSViewerEnginePluginInfo::GetOperatorVarDescription(AttributeSubject *atts,
{
LCSAttributes *atts_in = (LCSAttributes *)atts;
const char *typeString[3][3] = { { "Time", "Arc length",
"Ave. dist. from seed" },
{ "Smallest", "Intermediate", "Largest" },
{ "FTLE", "FDLE", "FSLE" } };
const char *typeString[3][7] =
{ { "Time", "Arc length", "Ave. dist. from seed", "", "", "", "" },
{ "Smallest", "Intermediate", "Largest",
"Pos. shear", "Neg. shear",
"Pos. linear shear", "Pos. combo shear" },
{ "FTLE", "FDLE", "FSLE", "", "", "", "" } };
const char *operatorString[4] = { "Base", "Gradient", "Jacobian", "Ratio" };
......@@ -292,3 +302,4 @@ LCSViewerEnginePluginInfo::GetOperatorVarDescription(AttributeSubject *atts,
return var;
}
......@@ -132,7 +132,10 @@ public:
Smallest,
Intermediate,
Largest,
Combination
PosShearVector,
NegShearVector,
PosLambdaShearVector,
NegLambdaShearVector
};
enum OperatorType
{
......@@ -229,7 +232,6 @@ public:
void SetRadialLimit(double radialLimit_);
void SetBoundaryLimit(double boundaryLimit_);
void SetSeedLimit(int seedLimit_);
void SetForceNodeCenteredData(bool forceNodeCenteredData_);
void SetIssueAdvectionWarnings(bool issueAdvectionWarnings_);
void SetIssueBoundaryWarnings(bool issueBoundaryWarnings_);
void SetIssueTerminationWarnings(bool issueTerminationWarnings_);
......@@ -290,7 +292,6 @@ public:
double GetRadialLimit() const;
double GetBoundaryLimit() const;
int GetSeedLimit() const;
bool GetForceNodeCenteredData() const;
bool GetIssueAdvectionWarnings() const;
bool GetIssueBoundaryWarnings() const;
bool GetIssueTerminationWarnings() const;
......@@ -433,7 +434,6 @@ public:
ID_radialLimit,
ID_boundaryLimit,
ID_seedLimit,
ID_forceNodeCenteredData,
ID_issueAdvectionWarnings,
ID_issueBoundaryWarnings,
ID_issueTerminationWarnings,
......@@ -492,7 +492,6 @@ private:
double radialLimit;
double boundaryLimit;
int seedLimit;
bool forceNodeCenteredData;
bool issueAdvectionWarnings;
bool issueBoundaryWarnings;
bool issueTerminationWarnings;
......@@ -505,6 +504,6 @@ private:
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define LCSATTRIBUTES_TMFS "iIiDiDiidiiiidiibdbdbddbddiddidDibiiiibbddidddibbbbbbbd"
#define LCSATTRIBUTES_TMFS "iIiDiDiidiiiidiibdbdbddbddiddidDibiiiibbddidddibbbbbbd"
#endif
This diff is collapsed.
......@@ -131,6 +131,17 @@ LCSCommonPluginInfo::GetCreatedExpressions(const avtDatabaseMetaData *md)
e2.SetDefinition(defn);
el->AddExpressions(e2);
}
{
Expression e2;
sprintf(name, "operators/LCS/%s", mmd->name.c_str());
e2.SetName(name);
e2.SetType(Expression::VectorMeshVar);
e2.SetFromOperator(true);
e2.SetOperatorName("LCS");
sprintf(defn, "cell_constant(<%s>, 0.)", mmd->name.c_str());
e2.SetDefinition(defn);
el->AddExpressions(e2);
}
}
const ExpressionList &oldEL = md->GetExprList();
for (i = 0 ; i < oldEL.GetNumExpressions() ; i++)
......@@ -151,6 +162,19 @@ LCSCommonPluginInfo::GetCreatedExpressions(const avtDatabaseMetaData *md)
e2.SetDefinition(defn);
el->AddExpressions(e2);
}
{
if (e.GetFromOperator())
continue; // weird ordering behavior otherwise
Expression e2;
sprintf(name, "operators/LCS/%s", e.GetName().c_str());
e2.SetName(name);
e2.SetType(Expression::VectorMeshVar);
e2.SetFromOperator(true);
e2.SetOperatorName("LCS");
sprintf(defn, "cell_constant(<%s>, 0.)", e.GetName().c_str());
e2.SetDefinition(defn);
el->AddExpressions(e2);
}
}
}
return el;
......
......@@ -219,10 +219,12 @@ LCSViewerEnginePluginInfo::GetOperatorVarDescription(AttributeSubject *atts,
{
LCSAttributes *atts_in = (LCSAttributes *)atts;
const char *typeString[3][3] = { { "Time", "Arc length",
"Ave. dist. from seed" },
{ "Smallest", "Intermediate", "Largest" },
{ "FTLE", "FDLE", "FSLE" } };
const char *typeString[3][7] =
{ { "Time", "Arc length", "Ave. dist. from seed", "", "", "", "" },
{ "Smallest", "Intermediate", "Largest",
"Pos. shear", "Neg. shear",
"Pos. linear shear", "Pos. combo shear" },
{ "FTLE", "FDLE", "FSLE", "", "", "", "" } };
const char *operatorString[4] = { "Base", "Gradient", "Jacobian", "Ratio" };
......@@ -296,3 +298,4 @@ LCSViewerEnginePluginInfo::GetMenuName() const
{
return "LCS";
}
......@@ -258,7 +258,8 @@ PyLCSAttributes_ToString(const LCSAttributes *atts, const char *prefix)
break;
}
const char *eigenComponent_names = "Smallest, Intermediate, Largest, Combination";
const char *eigenComponent_names = "Smallest, Intermediate, Largest, PosShearVector, NegShearVector, "
"PosLambdaShearVector, NegLambdaShearVector";
switch (atts->GetEigenComponent())
{
case LCSAttributes::Smallest:
......@@ -273,8 +274,20 @@ PyLCSAttributes_ToString(const LCSAttributes *atts, const char *prefix)
SNPRINTF(tmpStr, 1000, "%seigenComponent = %sLargest # %s\n", prefix, prefix, eigenComponent_names);
str += tmpStr;
break;
case LCSAttributes::Combination:
SNPRINTF(tmpStr, 1000, "%seigenComponent = %sCombination # %s\n", prefix, prefix, eigenComponent_names);
case LCSAttributes::PosShearVector:
SNPRINTF(tmpStr, 1000, "%seigenComponent = %sPosShearVector # %s\n", prefix, prefix, eigenComponent_names);
str += tmpStr;
break;
case LCSAttributes::NegShearVector:
SNPRINTF(tmpStr, 1000, "%seigenComponent = %sNegShearVector # %s\n", prefix, prefix, eigenComponent_names);
str += tmpStr;
break;
case LCSAttributes::PosLambdaShearVector:
SNPRINTF(tmpStr, 1000, "%seigenComponent = %sPosLambdaShearVector # %s\n", prefix, prefix, eigenComponent_names);
str += tmpStr;
break;
case LCSAttributes::NegLambdaShearVector:
SNPRINTF(tmpStr, 1000, "%seigenComponent = %sNegLambdaShearVector # %s\n", prefix, prefix, eigenComponent_names);
str += tmpStr;
break;
default:
......@@ -525,11 +538,6 @@ PyLCSAttributes_ToString(const LCSAttributes *atts, const char *prefix)
str += tmpStr;
SNPRINTF(tmpStr, 1000, "%sseedLimit = %d\n", prefix, atts->GetSeedLimit());
str += tmpStr;
if(atts->GetForceNodeCenteredData())
SNPRINTF(tmpStr, 1000, "%sforceNodeCenteredData = 1\n", prefix);
else
SNPRINTF(tmpStr, 1000, "%sforceNodeCenteredData = 0\n", prefix);
str += tmpStr;
if(atts->GetIssueAdvectionWarnings())
SNPRINTF(tmpStr, 1000, "%sissueAdvectionWarnings = 1\n", prefix);
else
......@@ -1026,14 +1034,15 @@ LCSAttributes_SetEigenComponent(PyObject *self, PyObject *args)
return NULL;
// Set the eigenComponent in the object.
if(ival >= 0 && ival < 4)
if(ival >= 0 && ival < 7)
obj->data->SetEigenComponent(LCSAttributes::EigenComponent(ival));
else
{
fprintf(stderr, "An invalid eigenComponent value was given. "
"Valid values are in the range of [0,3]. "
"Valid values are in the range of [0,6]. "
"You can also use the following names: "
"Smallest, Intermediate, Largest, Combination.");
"Smallest, Intermediate, Largest, PosShearVector, NegShearVector, "
"PosLambdaShearVector, NegLambdaShearVector.");
return NULL;
}
......@@ -1960,30 +1969,6 @@ LCSAttributes_GetSeedLimit(PyObject *self, PyObject *args)
return retval;
}
/*static*/ PyObject *
LCSAttributes_SetForceNodeCenteredData(PyObject *self, PyObject *args)
{
LCSAttributesObject *obj = (LCSAttributesObject *)self;
int ival;
if(!PyArg_ParseTuple(args, "i", &ival))
return NULL;
// Set the forceNodeCenteredData in the object.
obj->data->SetForceNodeCenteredData(ival != 0);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
LCSAttributes_GetForceNodeCenteredData(PyObject *self, PyObject *args)
{
LCSAttributesObject *obj = (LCSAttributesObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetForceNodeCenteredData()?1L:0L);
return retval;
}
/*static*/ PyObject *
LCSAttributes_SetIssueAdvectionWarnings(PyObject *self, PyObject *args)
{
......@@ -2250,8 +2235,6 @@ PyMethodDef PyLCSAttributes_methods[LCSATTRIBUTES_NMETH] = {
{"GetBoundaryLimit", LCSAttributes_GetBoundaryLimit, METH_VARARGS},
{"SetSeedLimit", LCSAttributes_SetSeedLimit, METH_VARARGS},
{"GetSeedLimit", LCSAttributes_GetSeedLimit, METH_VARARGS},
{"SetForceNodeCenteredData", LCSAttributes_SetForceNodeCenteredData, METH_VARARGS},
{"GetForceNodeCenteredData", LCSAttributes_GetForceNodeCenteredData, METH_VARARGS},
{"SetIssueAdvectionWarnings", LCSAttributes_SetIssueAdvectionWarnings, METH_VARARGS},
{"GetIssueAdvectionWarnings", LCSAttributes_GetIssueAdvectionWarnings, METH_VARARGS},
{"SetIssueBoundaryWarnings", LCSAttributes_SetIssueBoundaryWarnings, METH_VARARGS},
......@@ -2373,8 +2356,14 @@ PyLCSAttributes_getattr(PyObject *self, char *name)
return PyInt_FromLong(long(LCSAttributes::Intermediate));
if(strcmp(name, "Largest") == 0)
return PyInt_FromLong(long(LCSAttributes::Largest));
if(strcmp(name, "Combination") == 0)
return PyInt_FromLong(long(LCSAttributes::Combination));
if(strcmp(name, "PosShearVector") == 0)
return PyInt_FromLong(long(LCSAttributes::PosShearVector));
if(strcmp(name, "NegShearVector") == 0)
return PyInt_FromLong(long(LCSAttributes::NegShearVector));
if(strcmp(name, "PosLambdaShearVector") == 0)
return PyInt_FromLong(long(LCSAttributes::PosLambdaShearVector));
if(strcmp(name, "NegLambdaShearVector") == 0)
return PyInt_FromLong(long(LCSAttributes::NegLambdaShearVector));
if(strcmp(name, "eigenWeight") == 0)
return LCSAttributes_GetEigenWeight(self, NULL);
......@@ -2503,8 +2492,6 @@ PyLCSAttributes_getattr(PyObject *self, char *name)
return LCSAttributes_GetBoundaryLimit(self, NULL);
if(strcmp(name, "seedLimit") == 0)
return LCSAttributes_GetSeedLimit(self, NULL);
if(strcmp(name, "forceNodeCenteredData") == 0)
return LCSAttributes_GetForceNodeCenteredData(self, NULL);
if(strcmp(name, "issueAdvectionWarnings") == 0)
return LCSAttributes_GetIssueAdvectionWarnings(self, NULL);
if(strcmp(name, "issueBoundaryWarnings") == 0)
......@@ -2627,8 +2614,6 @@ PyLCSAttributes_setattr(PyObject *self, char *name, PyObject *args)
obj = LCSAttributes_SetBoundaryLimit(self, tuple);
else if(strcmp(name, "seedLimit") == 0)
obj = LCSAttributes_SetSeedLimit(self, tuple);
else if(strcmp(name, "forceNodeCenteredData") == 0)
obj = LCSAttributes_SetForceNodeCenteredData(self, tuple);
else if(strcmp(name, "issueAdvectionWarnings") == 0)
obj = LCSAttributes_SetIssueAdvectionWarnings(self, tuple);
else if(strcmp(name, "issueBoundaryWarnings") == 0)
......
......@@ -44,7 +44,7 @@
//
// Functions exposed to the VisIt module.
//
#define LCSATTRIBUTES_NMETH 112
#define LCSATTRIBUTES_NMETH 110
void PyLCSAttributes_StartUp(LCSAttributes *subj, void *data);
void PyLCSAttributes_CloseDown();
PyMethodDef * PyLCSAttributes_GetMethodTable(int *nMethods);
......
......@@ -48,6 +48,7 @@
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QSlider>
#include <QSpinBox>
#include <QPushButton>
#include <QTabWidget>
......@@ -466,8 +467,11 @@ QvisLCSWindow::CreateIntegrationTab(QWidget *pageIntegration)
eigenComponent->addItem(tr("Smallest"));
eigenComponent->addItem(tr("Intermediate (3D only)"));
eigenComponent->addItem(tr("Largest"));
eigenComponent->addItem(tr("Combination"));
eigenComponent->setMaxCount(4);
eigenComponent->addItem(tr("Shear Pos."));
eigenComponent->addItem(tr("Shear Neg."));
eigenComponent->addItem(tr("Shear Pos. linear combination"));
eigenComponent->addItem(tr("Shear Neg. linear combination"));
eigenComponent->setMaxCount(7);
connect(eigenComponent, SIGNAL(activated(int)),
this, SLOT(eigenComponentChanged(int)));
terminationLayout->addWidget(eigenComponent, 1, 1);
......@@ -485,12 +489,26 @@ QvisLCSWindow::CreateIntegrationTab(QWidget *pageIntegration)
terminationLayout->addWidget(clampLogValues, 1, 3);
// Create the eigen weight text field.
eigenWeightLabel = new QLabel(tr("Weight"), central);
eigenWeightLabel->setAlignment(Qt::AlignRight | Qt::AlignCenter);
eigenWeight = new QLineEdit(terminationGroup);
connect(eigenWeight, SIGNAL(returnPressed()), this, SLOT(eigenWeightProcessText()));
terminationLayout->addWidget(eigenWeightLabel, 1, 2);
terminationLayout->addWidget(eigenWeight, 1, 3);
// eigenWeightLabel = new QLabel(tr("Weight"), central);
// eigenWeightLabel->setAlignment(Qt::AlignRight | Qt::AlignCenter);
eigenWeightEdit = new QLineEdit(terminationGroup);
connect(eigenWeightEdit, SIGNAL(returnPressed()), this, SLOT(eigenWeightEditProcessText()));
eigenWeightSlider = new QSlider(Qt::Horizontal, central);
eigenWeightSlider->setRange(-100,+100);
eigenWeightSlider->setSingleStep(10);
eigenWeightSlider->setValue(0);
connect(eigenWeightSlider, SIGNAL(valueChanged(int)),
this, SLOT(eigenWeightSliderChanged(int)));
connect(eigenWeightSlider, SIGNAL(sliderPressed()),
this, SLOT(eigenWeightSliderPressed()));
connect(eigenWeightSlider, SIGNAL(sliderReleased()),
this, SLOT(eigenWeightSliderReleased()));
// terminationLayout->addWidget(eigenWeightLabel, 2, 3);
terminationLayout->addWidget(eigenWeightEdit, 1, 2);
terminationLayout->addWidget(eigenWeightSlider, 1, 3);
// Radio button termination type
......@@ -840,6 +858,9 @@ QvisLCSWindow::CreateAdvancedTab(QWidget *pageAdvanced)
void
QvisLCSWindow::UpdateWindow(bool doAll)
{
bool bval;
int ival;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
if(!doAll)
......@@ -964,6 +985,9 @@ QvisLCSWindow::UpdateWindow(bool doAll)
terminationTypeButtonGroup->button(2)->show();
cauchyGreenTensorLabel->show();
cauchyGreenTensor->show();
eigenComponent->removeItem(6);
eigenComponent->removeItem(5);
eigenComponent->removeItem(4);
eigenComponent->removeItem(3);
eigenComponentLabel->show();
eigenComponent->show();
......@@ -975,8 +999,9 @@ QvisLCSWindow::UpdateWindow(bool doAll)
atts->SetTerminateByDistance( atts->GetTerminationType() == LCSAttributes::Distance);
atts->SetTerminateBySize( atts->GetTerminationType() == LCSAttributes::Size);
eigenWeightLabel->hide();
eigenWeight->hide();
// eigenWeightLabel->hide();
eigenWeightEdit->hide();
eigenWeightSlider->hide();
operatorType->hide();
clampLogValues->show();
......@@ -992,18 +1017,48 @@ QvisLCSWindow::UpdateWindow(bool doAll)
{
if( eigenComponent->itemText(3).isNull() ||
eigenComponent->itemText(3).isEmpty() )
eigenComponent->addItem(tr("Combination"));
eigenWeightLabel->show();
eigenWeight->show();
{
eigenComponent->addItem(tr("Shear Pos."));
eigenComponent->addItem(tr("Shear Neg."));
eigenComponent->addItem(tr("Lambda Shear Pos."));
eigenComponent->addItem(tr("Lambda Shear Neg."));
}
bval = (atts->GetEigenComponent() ==
LCSAttributes::PosLambdaShearVector ||
atts->GetEigenComponent() ==
LCSAttributes::NegLambdaShearVector);
if( bval )
{
// eigenWeightLabel->show();
eigenWeightEdit->show();
eigenWeightSlider->show();
}
else
{
// eigenWeightLabel->hide();
eigenWeightEdit->hide();
eigenWeightSlider->hide();
}
// eigenWeightLabel->setEnabled( bval );
eigenWeightEdit->setEnabled( bval );
eigenWeightSlider->setEnabled( bval );
}
else
{
if( !(eigenComponent->itemText(3).isNull()) &&
!(eigenComponent->itemText(3).isEmpty()) )
eigenComponent->removeItem(3);
eigenWeightLabel->hide();
eigenWeight->hide();
{
eigenComponent->removeItem(6);
eigenComponent->removeItem(5);
eigenComponent->removeItem(4);
eigenComponent->removeItem(3);
}
// eigenWeightLabel->hide();
eigenWeightEdit->hide();
eigenWeightSlider->hide();
}
if( atts->GetOperationType() == LCSAttributes::EigenValue ||
......@@ -1045,10 +1100,27 @@ QvisLCSWindow::UpdateWindow(bool doAll)
eigenComponent->setCurrentIndex(int(atts->GetEigenComponent()) );
eigenComponent->blockSignals(false);
eigenWeightLabel->setEnabled( atts->GetEigenComponent() ==
LCSAttributes::Combination );
eigenWeight->setEnabled( atts->GetEigenComponent() ==
LCSAttributes::Combination );
bval = (atts->GetEigenComponent() ==
LCSAttributes::PosLambdaShearVector ||
atts->GetEigenComponent() ==
LCSAttributes::NegLambdaShearVector);
if( bval )
{
// eigenWeightLabel->show();
eigenWeightEdit->show();
eigenWeightSlider->show();
}
else
{
// eigenWeightLabel->hide();
eigenWeightEdit->hide();
eigenWeightSlider->hide();
}
// eigenWeightLabel->setEnabled( bval );
eigenWeightEdit->setEnabled( bval );
eigenWeightSlider->setEnabled( bval );
break;
case LCSAttributes::ID_operatorType:
......@@ -1064,7 +1136,14 @@ QvisLCSWindow::UpdateWindow(bool doAll)
break;
case LCSAttributes::ID_eigenWeight:
eigenWeight->setText(DoubleToQString(atts->GetEigenWeight()));
eigenWeightEdit->setText(DoubleToQString(atts->GetEigenWeight()));
ival =
int(qMin(qMax(-100.0,1000.0*(atts->GetEigenWeight()-1.0)),100.0));
eigenWeightSlider->blockSignals(true);
eigenWeightSlider->setValue(ival);
eigenWeightSlider->blockSignals(false);
break;
case LCSAttributes::ID_clampLogValues:
......@@ -1599,7 +1678,7 @@ QvisLCSWindow::GetCurrentValues(int which_widget)