Commit 7745bec5 authored by allens's avatar allens

did gui to match other IC guis and added FDLE

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21617 18c085ea-50e0-402c-830e-de6fd14e8384
parent 07018072
<?xml version="1.0"?>
<Plugin name="FTLE" type="operator" label="FTLE" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" category="Analysis" createExpression="true" exprInType="vector" exprOutType="scalar">
<Attribute name="FTLEAttributes" purpose="Attributes for FTLE" persistent="true" keyframe="true" exportAPI="" exportInclude="" codefile="FTLEAttributes.code">
<Enum name="Region">
<Enum name="SourceType">
NativeResolutionOfMesh
RegularGrid
</Enum>
<Enum name="Direction">
<Enum name="IntegrationDirection">
Forward
Backward
Both
</Enum>
<Enum name="FlowType">
Unsteady
Steady
<Enum name="FieldType">
Default
FlashField
M3DC12DField
M3DC13DField
Nek5000Field
NIMRODField
</Enum>
<Field name="integrationTime" label="Integration Time" type="double">
1.000000
</Field>
<Field name="regionType" label="Region Type" type="enum" subtype="Region">
RegularGrid
<Enum name="IntegrationType">
Euler
Leapfrog
DormandPrince
AdamsBashforth
RK4
M3DC12DIntegrator
</Enum>
<Enum name="SizeType">
Absolute
FractionOfBBox
</Enum>
<Enum name="StreamlineAlgorithmType">
LoadOnDemand
ParallelStaticDomains
MasterSlave
VisItSelects
</Enum>
<Enum name="TerminationType">
Time
Distance
</Enum>
<Enum name="PathlinesCMFE">
CONN_CMFE
POS_CMFE
</Enum>
<Field name="sourceType" label="Source" type="enum" subtype="SourceType">
NativeResolutionOfMesh
</Field>
<Field name="Resolution" label="Resolution" type="intArray" length="3" enabler="regionType:RegularGrid">
<Field name="Resolution" label="Resolution" type="intArray" length="3" enabler="sourceType:RegularGrid">
10
10
10
</Field>
<Field name="UseDataSetStart" label="Start at DataSet Extent" type="bool" enabler="regionType:RegularGrid">
<Field name="UseDataSetStart" label="Start at DataSet Extent" type="bool" enabler="sourceType:RegularGrid">
true
</Field>
<Field name="StartPosition" label="Subset Start" type="doubleArray" length="3" enabler="UseDataSetStart:false">
......@@ -32,7 +60,7 @@
0.000000
0.000000
</Field>
<Field name="UseDataSetEnd" label="End at DataSet Extent" type="bool" enabler="regionType:RegularGrid">
<Field name="UseDataSetEnd" label="End at DataSet Extent" type="bool" enabler="sourceType:RegularGrid">
true
</Field>
<Field name="EndPosition" label="Subset End" type="doubleArray" length="3" enabler="UseDataSetEnd:false">
......@@ -40,11 +68,122 @@
1.000000
1.000000
</Field>
<Field name="direction" label="Direction" type="enum" subtype="Direction">
<Field name="streamlineDirection" label="streamlineDirection" type="enum" subtype="IntegrationDirection">
Forward
</Field>
<Field name="flowType" label="FlowType" type="enum" subtype="FlowType">
Unsteady
<Field name="maxSteps" label="Maximum number of steps" type="int">
1000
</Field>
<Field name="terminationType" label="Termination" type="enum" subtype="TerminationType">
Time
</Field>
<Field name="terminateByDistance" label="Use the distance criteria for termination" type="bool">
false
</Field>
<Field name="termDistance" label="Distance for Termination" type="double" enabler="terminateByDistance:true">
10.000000
</Field>
<Field name="terminateByTime" label="Use the time criteria for termination" type="bool">
false
</Field>
<Field name="termTime" label="Time Elapsed for Particle Before Termination" type="double" enabler="terminateByTime:true">
10.000000
</Field>
<Field name="maxStepLength" label="maximum step length" type="double">
0.100000
</Field>
<Field name="limitMaximumTimestep" label="Limit Maximum Timestep (DoPri only)?" type="bool">
false
</Field>
<Field name="maxTimeStep" label="maximum time step length" type="double">
0.100000
</Field>
<Field name="relTol" label="rel. tolerance" type="double">
0.000100
</Field>
<Field name="absTolSizeType" label="AbsoluteToleranceSizeType" type="enum" subtype="SizeType">
FractionOfBBox
</Field>
<Field name="absTolAbsolute" label="abs. tolerance" type="double" enabler="absTolSizeType:Absolute">
0.000001
</Field>
<Field name="absTolBBox" label="AbsTolBBox" type="double" enabler="absTolSizeType:FractionOfBBox">
0.000001
</Field>
<Field name="fieldType" label="Field" type="enum" subtype="FieldType">
Default
</Field>
<Field name="fieldConstant" label="Constant" type="double" enabler="fieldType:FlashField">
1.000000
</Field>
<Field name="velocitySource" label="Starting velocity" type="doubleArray" length="3" enabler="fieldType:FlashField">
0.000000
0.000000
0.000000
</Field>
<Field name="integrationType" label="Integrator" type="enum" subtype="IntegrationType">
DormandPrince
</Field>
<Field name="streamlineAlgorithmType" label="Streamline algorithm type" type="enum" subtype="StreamlineAlgorithmType">
VisItSelects
</Field>
<Field name="maxStreamlineProcessCount" label="maxStreamlineProcessCount" type="int">
10
</Field>
<Field name="maxDomainCacheSize" label="Max domain cache" type="int">
3
</Field>
<Field name="workGroupSize" label="Work group size" type="int">
32
</Field>
<Field name="pathlines" label="Do pathlines" type="bool">
false
</Field>
<Field name="pathlinesOverrideStartingTimeFlag" label="Override Starting Time" type="bool" enabler="pathlines:true">
false
</Field>
<Field name="pathlinesOverrideStartingTime" label="Starting Time" type="double" enabler="pathlines:true">
0.000000
</Field>
<Field name="pathlinesCMFE" label="CMFE" type="enum" subtype="PathlinesCMFE">
POS_CMFE
</Field>
<Field name="forceNodeCenteredData" label="forceNodeCenteredData" type="bool">
false
</Field>
<Field name="issueTerminationWarnings" label="Issue Warning When Termination Criteria Is Not Met" type="bool">
true
</Field>
<Field name="issueStiffnessWarnings" label="Issue warnings when stiffness is encountered" type="bool">
true
</Field>
<Field name="issueCriticalPointsWarnings" label="Issue warnings when critical points are reached" type="bool">
true
</Field>
<Field name="criticalPointThreshold" label="criticalPointThreshold" type="double" enabler="issueCriticalPointsWarnings:true">
0.001000
</Field>
<Field name="correlationDistanceAngTol" label="correlationDistanceAngTol" type="double">
5.000000
</Field>
<Field name="correlationDistanceMinDistAbsolute" label="correlationDistanceMinDistAbsolute" type="double">
1.000000
</Field>
<Field name="correlationDistanceMinDistBBox" label="correlationDistanceMinDistBBox" type="double">
0.005000
</Field>
<Field name="correlationDistanceMinDistType" label="correlationDistanceMinDistType" type="enum" subtype="SizeType">
FractionOfBBox
</Field>
<Field name="selection" label="selection" type="string">
</Field>
<Function name="CopyAttributes" user="false" member="true">
</Function>
<Function name="CreateCompatible" user="false" member="true">
</Function>
<Function name="ChangesRequireRecalculation" user="true" member="true">
</Function>
</Attribute>
</Plugin>
This diff is collapsed.
Function: CopyAttributes
Declaration: bool CopyAttributes(const AttributeGroup *atts);
Definition:
// ****************************************************************************
// Method: FTLEAttributes::CopyAttributes
//
// Purpose:
// CopyAttributes method for the FTLEAttributes class.
//
// Programmer: Brad Whitlock
// Creation: Fri Oct 4 15:22:57 PST 2002
//
// Modifications:
// Brad Whitlock, Wed Dec 22 12:57:53 PDT 2004
// I added code to support the point tool.
//
// Hank Childs, Sat Mar 3 09:00:12 PST 2007
// Disable useWholeBox if we are copying box extents.
//
// Dave Pugmire, Thu Jun 10 10:44:02 EDT 2010
// New seed sources.
//
// ****************************************************************************
bool
FTLEAttributes::CopyAttributes(const AttributeGroup *atts)
{
bool retval = false;
if(TypeName() == atts->TypeName())
{
// Call assignment operator.
const FTLEAttributes *tmp = (const FTLEAttributes *)atts;
*this = *tmp;
retval = true;
}
return retval;
}
Function: CreateCompatible
Declaration: AttributeSubject *CreateCompatible(const std::string &tname) const
Definition:
// ****************************************************************************
// Method: FTLEAttributes::CreateCompatible
//
// Purpose:
// Creates a new state object of the desired type.
//
// Programmer: Brad Whitlock
// Creation: Fri Oct 4 15:22:57 PST 2002
//
// Modifications:
// Brad Whitlock, Tue Jan 21 12:33:04 PDT 2003
// I added code to set the "have radius" flag to true so the plane tool
// resizes properly when resizing the plane radius.
//
// Brad Whitlock, Wed Dec 22 12:54:43 PDT 2004
// I added code to support the point tool.
//
// ****************************************************************************
AttributeSubject *
FTLEAttributes::CreateCompatible(const std::string &tname) const
{
AttributeSubject *retval = 0;
if(TypeName() == tname)
{
retval = new FTLEAttributes(*this);
}
return retval;
}
Function: ChangesRequireRecalculation
Declaration: bool ChangesRequireRecalculation(const FTLEAttributes &) const;
Definition:
// ****************************************************************************
// Method: FTLEAttributes::ChangesRequireRecalculation
//
// Purpose:
// Determines whether or not the plot must be recalculated based on the
// new attributes.
//
// Programmer: Brad Whitlock
// Creation: Fri Oct 4 15:22:57 PST 2002
//
// Notes: Most attributes cause the FTLE to change.
//
// Modifications:
// Brad Whitlock, Wed Dec 22 12:52:45 PDT 2004
// I made the coloring method matter when comparing FTLE attributes
// and I added support for ribbons.
//
// Hank Childs, Sat Mar 3 09:00:12 PST 2007
// Add support for useWholeBox.
//
// Hank Childs, Sun May 3 11:49:31 CDT 2009
// Add support for point lists.
//
// Dave Pugmire, Tue Dec 29 14:37:53 EST 2009
// Add custom renderer and lots of appearance options to the FTLEs plots.
//
// Christoph Garth, Wed Jan 13 17:14:21 PST 2010
// Add support for circle source.
//
// Hank Childs, Fri Oct 1 20:43:34 PDT 2010
// Add support for absTol that is fraction of the bounding box.
//
// Hank Childs, Mon Oct 4 14:32:06 PDT 2010
// Add support for having multiple termination criterias.
//
// Dave Pugmire, Fri Jan 28 14:49:50 EST 2011
// Add vary tube radius by variable.
//
// Dave Pugmire, Thu Mar 15 11:23:18 EDT 2012
// Add named selections as a seed source.
//
// ****************************************************************************
#define PDIF(p1,p2,i) ((p1)[i] != (p2)[i])
#define POINT_DIFFERS(p1,p2) (PDIF(p1,p2,0) || PDIF(p1,p2,1) || PDIF(p1,p2,2))
bool
FTLEAttributes::ChangesRequireRecalculation(const FTLEAttributes &obj) const
{
//Check the general stuff first...
if (sourceType != obj.sourceType ||
maxSteps != obj.maxSteps ||
terminateByDistance != obj.terminateByDistance ||
termDistance != obj.termDistance ||
terminateByTime != obj.terminateByTime ||
termTime != obj.termTime ||
streamlineDirection != obj.streamlineDirection ||
fieldType != obj.fieldType ||
fieldConstant != obj.fieldConstant ||
integrationType != obj.integrationType ||
maxStepLength != obj.maxStepLength ||
maxTimeStep != obj.maxTimeStep ||
limitMaximumTimestep != obj.limitMaximumTimestep ||
relTol != obj.relTol ||
absTolAbsolute != obj.absTolAbsolute ||
absTolBBox != obj.absTolBBox ||
absTolSizeType != obj.absTolSizeType ||
forceNodeCenteredData != obj.forceNodeCenteredData ||
pathlines != obj.pathlines ||
pathlinesOverrideStartingTimeFlag != obj.pathlinesOverrideStartingTimeFlag ||
pathlinesOverrideStartingTime != obj.pathlinesOverrideStartingTime ||
pathlinesCMFE != obj.pathlinesCMFE ||
1)
{
return true;
}
// If they say they don't want warnings, then don't re-execute. If
// they do, then re-execute so we can give them that warning.
if (issueTerminationWarnings != obj.issueTerminationWarnings &&
obj.issueTerminationWarnings == true)
return true;
if (fieldType == FlashField &&
POINT_DIFFERS(velocitySource, obj.velocitySource))
{
return true;
}
//Check by source type.
if ((sourceType == RegularGrid) &&
POINT_DIFFERS(Resolution, obj.Resolution))
{
return true;
}
if ((sourceType == RegularGrid) &&
UseDataSetStart == true &&
POINT_DIFFERS(StartPosition, obj.StartPosition))
{
return true;
}
if ((sourceType == RegularGrid) &&
UseDataSetEnd == true &&
POINT_DIFFERS(EndPosition, obj.EndPosition))
{
return true;
}
return false;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -44,7 +44,7 @@
//
// Functions exposed to the VisIt module.
//
#define FTLEATTRIBUTES_NMETH 20
#define FTLEATTRIBUTES_NMETH 86
void PyFTLEAttributes_StartUp(FTLEAttributes *subj, void *data);
void PyFTLEAttributes_CloseDown();
PyMethodDef * PyFTLEAttributes_GetMethodTable(int *nMethods);
......
This diff is collapsed.
......@@ -36,41 +36,41 @@
*
*****************************************************************************/
#ifndef QVISFTLEWINDOW_H
#define QVISFTLEWINDOW_H
#ifndef QVIS_FTLE_WINDOW_H
#define QVIS_FTLE_WINDOW_H
#include <QvisOperatorWindow.h>
#include <AttributeSubject.h>
class FTLEAttributes;
// Forward declarations
class QLabel;
class QGroupBox;
class QListWidget;
class QListWidgetItem;
class QCheckBox;
class QComboBox;
class QLineEdit;
class QSpinBox;
class QVBox;
class QButtonGroup;
class QvisColorTableButton;
class QvisOpacitySlider;
class QvisColorButton;
class QvisLineStyleWidget;
class QvisLineWidthWidget;
class QvisVariableButton;
class QvisOpacitySlider;
class QPushButton;
class QButtonGroup;
class QRadioButton;
class FTLEAttributes;
class SelectionList;
// ****************************************************************************
// Class: QvisFTLEWindow
//
// Purpose:
// Defines QvisFTLEWindow class.
//
// Notes: Autogenerated by xml2window.
// Purpose:
// Defines QvisFTLEWindow class.
//
// Programmer: xml2window
// Creation: omitted
// Programmer: Brad Whitlock
// Creation: Mon Oct 21 14:12:49 PST 2002
//
// Modifications:
//
// Hank Childs, Wed Apr 11 10:24:28 PDT 2012
// Add buttons for steady/unstead and forwards/backwards.
//
// ****************************************************************************
......@@ -86,40 +86,119 @@ class QvisFTLEWindow : public QvisOperatorWindow
virtual ~QvisFTLEWindow();
virtual void CreateWindowContents();
protected:
void CreateAdvancedTab(QWidget *);
void UpdateWindow(bool doAll);
virtual void GetCurrentValues(int which_widget);
void GetCurrentValues(int which_widget);
void UpdateAlgorithmAttributes();
void UpdateFieldAttributes();
void UpdateIntegrationAttributes();
private slots:
void integrationTimeProcessText();
void regionTypeChanged(int val);
void flowTypeChanged(int val);
void directionChanged(int val);
void sourceTypeChanged(int val);
void ResolutionProcessText();
void UseDataSetStartChanged(bool val);
void StartPositionProcessText();
void UseDatasetEndChanged(bool val);
void EndPositionProcessText();
void fieldTypeChanged(int val);
void fieldConstantProccessText();
void integrationTypeChanged(int val);
void streamlineAlgorithmChanged(int val);
void directionTypeChanged(int val);
void maxStepLengthProcessText();
void maxTimeStepProcessText();
void maxStepsProcessText();
void limitButtonGroupChanged(int);
// void limitMaxTimeChanged(bool);
void maxTimeProcessText();
// void limitMaxDistanceChanged(bool);
void maxDistanceProcessText();
void relTolProcessText();
void absTolProcessText();
void absTolSizeTypeChanged(int);
void velocitySourceProcessText();
void maxSLCountChanged(int val);
void maxDomainCacheChanged(int val);
void workGroupSizeChanged(int val);
void icButtonGroupChanged(int val);
void pathlineOverrideStartingTimeFlagChanged(bool val);
void pathlineOverrideStartingTimeProcessText();
void pathlineCMFEButtonGroupChanged(int val);
void forceNodalChanged(bool);
void limitMaxTimeStepChanged(bool);
void issueWarningForMaxStepsChanged(bool);
void issueWarningForStiffnessChanged(bool);
void issueWarningForCriticalPointsChanged(bool);
void criticalPointThresholdProcessText();
private:
QLineEdit *integrationTime;
QWidget *regionType;
QButtonGroup *regionTypeButtonGroup;
QWidget *flowType;
QButtonGroup *flowTypeButtonGroup;
QWidget *direction;
QButtonGroup *directionButtonGroup;
int plotType;
QComboBox *sourceType;
QLabel *ResolutionLabel;
QLineEdit *Resolution;
QCheckBox *UseDataSetStart;
QLabel *StartPositionLabel;
QLineEdit *StartPosition;
QLabel *EndPositionLabel;
QCheckBox *UseDatasetEnd;
QLineEdit *EndPosition;
QLabel *integrationTimeLabel;
QLabel *regionTypeLabel;
QLabel *ResolutionLabel;
QLabel *StartPositionLabel;
QLabel *EndPositionLabel;
QComboBox *directionType;
QCheckBox *limitMaxTimeStep;
QLineEdit *maxStepLength;
QLabel *maxStepLengthLabel;
QLineEdit *maxTimeStep;
QLineEdit *maxSteps;
QButtonGroup *limitButtonGroup;
QRadioButton *limitButtons[2];
// QCheckBox *limitMaxTime;
QLineEdit *maxTime;
// QCheckBox *limitMaxDistance;
QLineEdit *maxDistance;
QLineEdit *relTol;
QLabel *relTolLabel;
QLineEdit *absTol;
QComboBox *absTolSizeType;
QLabel *absTolLabel;
QCheckBox *forceNodal;
QLineEdit *velocitySource;
QLabel *velocitySourceLabel;
FTLEAttributes *atts;
};
QButtonGroup *icButtonGroup;
QCheckBox *pathlineOverrideStartingTimeFlag;
QLineEdit *pathlineOverrideStartingTime;
QButtonGroup *pathlineCMFEButtonGroup;
QComboBox *fieldType;
QLabel *fieldConstantLabel;
QLineEdit *fieldConstant;
QComboBox *integrationType;
QLabel *slAlgoLabel;
QComboBox *slAlgo;
QLabel *maxSLCountLabel;
QSpinBox *maxSLCount;
QLabel *maxDomainCacheLabel;
QSpinBox *maxDomainCache;
QLabel *workGroupSizeLabel;
QSpinBox *workGroupSize;
QComboBox *displayReferenceType;
QLabel *displayLabel;
QCheckBox *displayBeginToggle;
QCheckBox *displayEndToggle;
QLineEdit *displayBeginEdit;
QLineEdit *displayEndEdit;
QCheckBox *issueWarningForMaxSteps;
QCheckBox *issueWarningForStiffness;
QCheckBox *issueWarningForCriticalPoints;
QLineEdit *criticalPointThreshold;
QLabel *criticalPointThresholdLabel;
FTLEAttributes *FTLEAtts;
SelectionList *selectionList;
};
#endif
This diff is collapsed.
......@@ -96,8 +96,8 @@ class avtFTLEFilter : public virtual avtPluginFilter,
/** Construct the initial locations to emanate integral curves */
virtual std::vector<avtVector> GetInitialLocations();
virtual std::vector<avtVector> GetInitialVelocities() { return std::vector<avtVector>(); }
virtual std::vector<avtVector> GetInitialVelocities();
/** type of communication between processors
options include: RestoreSequence,LeaveOnCurrentProcessor, and
ReturnToOriginatingProcessor(NOT IMPLEMENTED) */
......@@ -144,13 +144,43 @@ class avtFTLEFilter : public virtual avtPluginFilter,
void ComputeFtle(vtkDataArray* jacobian[3],
vtkDataArray* result);
void SetTermination(int maxSteps,
bool doDistance, double maxDistance,
bool doTime, double maxTime);
void SetVelocitySource(const double *v);
void IssueWarningForMaxStepsTermination(bool v)
{ issueWarningForMaxStepsTermination = v; };
void IssueWarningForStiffness(bool v)
{ issueWarningForStiffness = v; };
void IssueWarningForCriticalPoints(bool v, double speed)
{ issueWarningForCriticalPoints = v;
criticalPointThreshold = speed; };
protected:
FTLEAttributes atts;
bool needsRecalculation;
std::string outVarName;
double global_bounds[6];
int global_resolution[3];
int timeState;
int maxSteps;
bool doDistance;
double maxDistance;
bool doTime;
double maxTime;
bool issueWarningForMaxStepsTermination;
bool issueWarningForStiffness;
bool issueWarningForCriticalPoints;
double criticalPointThreshold;
avtVector seedVelocity;
//input seed points..
std::vector<avtVector> seedPoints;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment