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;
}
......@@ -60,20 +60,56 @@
class FTLEAttributes : public AttributeSubject
{
public:
enum Region
enum SourceType
{
NativeResolutionOfMesh,
RegularGrid
};
enum Direction
enum IntegrationDirection
{
Forward,
Backward
Backward,
Both
};
enum FlowType
enum FieldType
{
Unsteady,
Steady
Default,
FlashField,
M3DC12DField,
M3DC13DField,
Nek5000Field,
NIMRODField
};
enum IntegrationType
{
Euler,
Leapfrog,
DormandPrince,
AdamsBashforth,
RK4,
M3DC12DIntegrator
};
enum SizeType
{
Absolute,
FractionOfBBox
};
enum StreamlineAlgorithmType
{
LoadOnDemand,
ParallelStaticDomains,
MasterSlave,
VisItSelects
};
enum TerminationType
{
Time,
Distance
};
enum PathlinesCMFE
{
CONN_CMFE,
POS_CMFE
};
// These constructors are for objects of this class
......@@ -104,51 +140,146 @@ public:
void SelectResolution();
void SelectStartPosition();
void SelectEndPosition();
void SelectVelocitySource();
void SelectSelection();
// Property setting methods
void SetIntegrationTime(double integrationTime_);
void SetRegionType(Region regionType_);
void SetSourceType(SourceType sourceType_);
void SetResolution(const int *Resolution_);
void SetUseDataSetStart(bool UseDataSetStart_);
void SetStartPosition(const double *StartPosition_);
void SetUseDataSetEnd(bool UseDataSetEnd_);
void SetEndPosition(const double *EndPosition_);
void SetDirection(Direction direction_);
void SetFlowType(FlowType flowType_);
void SetStreamlineDirection(IntegrationDirection streamlineDirection_);
void SetMaxSteps(int maxSteps_);
void SetTerminationType(TerminationType terminationType_);
void SetTerminateByDistance(bool terminateByDistance_);
void SetTermDistance(double termDistance_);
void SetTerminateByTime(bool terminateByTime_);
void SetTermTime(double termTime_);
void SetMaxStepLength(double maxStepLength_);
void SetLimitMaximumTimestep(bool limitMaximumTimestep_);
void SetMaxTimeStep(double maxTimeStep_);
void SetRelTol(double relTol_);
void SetAbsTolSizeType(SizeType absTolSizeType_);
void SetAbsTolAbsolute(double absTolAbsolute_);
void SetAbsTolBBox(double absTolBBox_);
void SetFieldType(FieldType fieldType_);
void SetFieldConstant(double fieldConstant_);
void SetVelocitySource(const double *velocitySource_);
void SetIntegrationType(IntegrationType integrationType_);
void SetStreamlineAlgorithmType(StreamlineAlgorithmType streamlineAlgorithmType_);
void SetMaxStreamlineProcessCount(int maxStreamlineProcessCount_);
void SetMaxDomainCacheSize(int maxDomainCacheSize_);
void SetWorkGroupSize(int workGroupSize_);
void SetPathlines(bool pathlines_);
void SetPathlinesOverrideStartingTimeFlag(bool pathlinesOverrideStartingTimeFlag_);
void SetPathlinesOverrideStartingTime(double pathlinesOverrideStartingTime_);
void SetPathlinesCMFE(PathlinesCMFE pathlinesCMFE_);
void SetForceNodeCenteredData(bool forceNodeCenteredData_);
void SetIssueTerminationWarnings(bool issueTerminationWarnings_);
void SetIssueStiffnessWarnings(bool issueStiffnessWarnings_);
void SetIssueCriticalPointsWarnings(bool issueCriticalPointsWarnings_);
void SetCriticalPointThreshold(double criticalPointThreshold_);
void SetCorrelationDistanceAngTol(double correlationDistanceAngTol_);
void SetCorrelationDistanceMinDistAbsolute(double correlationDistanceMinDistAbsolute_);
void SetCorrelationDistanceMinDistBBox(double correlationDistanceMinDistBBox_);
void SetCorrelationDistanceMinDistType(SizeType correlationDistanceMinDistType_);
void SetSelection(const std::string &selection_);
// Property getting methods
double GetIntegrationTime() const;
Region GetRegionType() const;
const int *GetResolution() const;
int *GetResolution();
bool GetUseDataSetStart() const;
const double *GetStartPosition() const;
double *GetStartPosition();
bool GetUseDataSetEnd() const;
const double *GetEndPosition() const;
double *GetEndPosition();
Direction GetDirection() const;
FlowType GetFlowType() const;
SourceType GetSourceType() const;
const int *GetResolution() const;
int *GetResolution();
bool GetUseDataSetStart() const;
const double *GetStartPosition() const;
double *GetStartPosition();
bool GetUseDataSetEnd() const;
const double *GetEndPosition() const;
double *GetEndPosition();
IntegrationDirection GetStreamlineDirection() const;
int GetMaxSteps() const;
TerminationType GetTerminationType() const;
bool GetTerminateByDistance() const;
double GetTermDistance() const;
bool GetTerminateByTime() const;
double GetTermTime() const;
double GetMaxStepLength() const;
bool GetLimitMaximumTimestep() const;
double GetMaxTimeStep() const;
double GetRelTol() const;
SizeType GetAbsTolSizeType() const;
double GetAbsTolAbsolute() const;
double GetAbsTolBBox() const;
FieldType GetFieldType() const;
double GetFieldConstant() const;
const double *GetVelocitySource() const;
double *GetVelocitySource();
IntegrationType GetIntegrationType() const;
StreamlineAlgorithmType GetStreamlineAlgorithmType() const;
int GetMaxStreamlineProcessCount() const;
int GetMaxDomainCacheSize() const;
int GetWorkGroupSize() const;
bool GetPathlines() const;
bool GetPathlinesOverrideStartingTimeFlag() const;
double GetPathlinesOverrideStartingTime() const;
PathlinesCMFE GetPathlinesCMFE() const;
bool GetForceNodeCenteredData() const;
bool GetIssueTerminationWarnings() const;
bool GetIssueStiffnessWarnings() const;
bool GetIssueCriticalPointsWarnings() const;
double GetCriticalPointThreshold() const;
double GetCorrelationDistanceAngTol() const;
double GetCorrelationDistanceMinDistAbsolute() const;
double GetCorrelationDistanceMinDistBBox() const;
SizeType GetCorrelationDistanceMinDistType() const;
const std::string &GetSelection() const;
std::string &GetSelection();
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
virtual void SetFromNode(DataNode *node);
// Enum conversion functions
static std::string Region_ToString(Region);
static bool Region_FromString(const std::string &, Region &);
static std::string SourceType_ToString(SourceType);
static bool SourceType_FromString(const std::string &, SourceType &);
protected:
static std::string SourceType_ToString(int);
public:
static std::string IntegrationDirection_ToString(IntegrationDirection);
static bool IntegrationDirection_FromString(const std::string &, IntegrationDirection &);
protected:
static std::string IntegrationDirection_ToString(int);
public:
static std::string FieldType_ToString(FieldType);
static bool FieldType_FromString(const std::string &, FieldType &);
protected:
static std::string FieldType_ToString(int);
public:
static std::string IntegrationType_ToString(IntegrationType);
static bool IntegrationType_FromString(const std::string &, IntegrationType &);
protected:
static std::string IntegrationType_ToString(int);
public:
static std::string SizeType_ToString(SizeType);
static bool SizeType_FromString(const std::string &, SizeType &);
protected:
static std::string SizeType_ToString(int);
public:
static std::string StreamlineAlgorithmType_ToString(StreamlineAlgorithmType);
static bool StreamlineAlgorithmType_FromString(const std::string &, StreamlineAlgorithmType &);
protected:
static std::string Region_ToString(int);
static std::string StreamlineAlgorithmType_ToString(int);
public:
static std::string Direction_ToString(Direction);
static bool Direction_FromString(const std::string &, Direction &);
static std::string TerminationType_ToString(TerminationType);
static bool TerminationType_FromString(const std::string &, TerminationType &);
protected:
static std::string Direction_ToString(int);
static std::string TerminationType_ToString(int);
public:
static std::string FlowType_ToString(FlowType);
static bool FlowType_FromString(const std::string &, FlowType &);
static std::string PathlinesCMFE_ToString