Commit 94ab746c authored by bonnell's avatar bonnell

merge from 2.7R

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22312 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2a8d7d2a
......@@ -83,6 +83,9 @@ public:
poloidal = p;
};
bool operator < (const WindingPair &i) const {return toroidal < i.toroidal;}
bool operator > (const WindingPair &i) const {return toroidal > i.toroidal;}
unsigned int toroidal;
unsigned int poloidal;
};
......
......@@ -1490,6 +1490,9 @@ GetListOfUniqueCellTypes(vtkUnstructuredGrid *ug, vtkUnsignedCharArray *uca)
// I modified the reading of pvti, pvtr and pvts files to handle the case
// where the piece extent was a subset of the whole extent.
//
// Kathleen Biagas, Fri Nov 1 13:27:44 PDT 2013
// Changed pieceOrigin from int to double to prevent truncating.
//
// ****************************************************************************
vtkDataSet *
......@@ -1504,7 +1507,7 @@ avtVTKFileReader::ConvertStructuredPointsToRGrid(vtkStructuredPoints *inSP,
inSP->GetOrigin(wholeOrigin);
int pieceDims[3];
int pieceOrigin[3];
double pieceOrigin[3];
if (extents == NULL)
{
pieceDims[0] = wholeDims[0];
......
......@@ -2669,18 +2669,13 @@ GetPeriodWindingPairs( std::vector< WindingPairStat > &baseWindingPairStats,
}
inline bool operator<(const WindingPair& lhs, const WindingPair& rhs)
{
return( lhs.toroidal < rhs.toroidal );
}
int
compareSecondWindingPair( const std::pair< WindingPair, unsigned int > s0,
const std::pair< WindingPair, unsigned int > s1 )
{
// return ( s0.second < s1.second );
return ( s0.first.toroidal < s1.first.toroidal );
}
// int
// compareSecondWindingPair( const std::pair< WindingPair, unsigned int > s0,
// const std::pair< WindingPair, unsigned int > s1 )
// {
// // return ( s0.second < s1.second );
// return ( s0.first.toroidal < s1.first.toroidal );
// }
void
......@@ -3348,11 +3343,11 @@ FieldlineLib::fieldlineProperties( std::vector< Point > &ptList,
}
// Sort the winding pairs to look for a bimodal set.
std::vector< std::pair< WindingPair, unsigned int > >
topWindingPairList( topWindingPairs.begin(), topWindingPairs.end() );
// std::vector< std::pair< WindingPair, unsigned int > >
// topWindingPairList( topWindingPairs.begin(), topWindingPairs.end() );
std::sort( topWindingPairList.begin(), topWindingPairList.end(),
compareSecondWindingPair );
// std::sort( topWindingPairList.begin(), topWindingPairList.end(),
// compareSecondWindingPair );
// for( unsigned int j=0; j<topWindingPairList.size(); ++j )
// std::cerr << "LINE " << __LINE__ << " "
......
......@@ -48,13 +48,13 @@
#endif
#include <avtVector.h>
#include <avtPoincareIC.h>
#include <DebugStream.h>
#include <vector>
typedef avtVector Point ;
typedef avtVector Vector;
#include <vector>
struct WindingPairStat {
unsigned int toroidal;
unsigned int poloidal;
......@@ -62,244 +62,10 @@ struct WindingPairStat {
int ranking;
bool operator < (const WindingPairStat &i) const {return stat < i.stat;}
bool operator > (const WindingPairStat &i) const {return stat < i.stat;}
bool operator > (const WindingPairStat &i) const {return stat > i.stat;}
};
class FieldlineProperties;
#include <avtPoincareIC.h>
#ifndef POINCARE_FIELDLINE_PROPERTIES_H
#define POINCARE_FIELDLINE_PROPERTIES_H
class WindingPair {
public:
WindingPair( unsigned int t, unsigned int p )
{
toroidal = t;
poloidal = p;
};
unsigned int toroidal;
unsigned int poloidal;
};
class FieldlineProperties {
public:
FieldlineProperties()
{
type = FieldlineProperties::UNKNOWN_TYPE;
analysisMethod = FieldlineProperties::DEFAULT_METHOD;
searchState = FieldlineProperties::NO_SEARCH;
analysisState = FieldlineProperties::UNKNOWN_ANALYSIS;
source = FieldlineProperties::UNKNOWN_TYPE;
iteration = 0;
safetyFactor = 0;
toroidalWinding = 0;
poloidalWinding = 0;
toroidalWindingP = 0;
poloidalWindingP = 0;
toroidalResonance = 0;
poloidalResonance = 0;
windingGroupOffset = 0;
islands = 0;
islandGroups = 0;
nnodes = 0;
rationalSurfaceTolerance = 0;
maxPunctures = 0;
numPunctures = 0;
nPuncturesNeeded = 0;
parentOPointIC = 0;
childOPointIC = 0;
};
enum FieldlineType { UNKNOWN_TYPE = 0,
PERIODIC = 0x0010,
RATIONAL = 0x0010,
O_POINT = 0x0011,
X_POINT = 0x0012,
QUASI_PERIODIC = 0x0060,
IRRATIONAL = 0x0060,
FLUX_SURFACE = 0x0020,
ISLAND_CHAIN = 0x0040,
ISLAND_PRIMARY_CHAIN = 0x0040,
ISLAND_SECONDARY_CHAIN = 0x0042,
ISLAND_PRIMARY_SECONDARY_AXIS = 0x0041,
ISLAND_SECONDARY_SECONDARY_AXIS = 0x0043,
CHAOTIC = 30 };
enum AnalysisMethod { UNKNOWN_METHOD = 0,
DEFAULT_METHOD = 1,
RATIONAL_SEARCH = 10,
RATIONAL_MINIMIZE = 11,
RATIONAL_BRACKET = 12 }; //Remove a curve from continueExecute logic
enum AnalysisState { UNKNOWN_ANALYSIS = 0,
COMPLETED = 2,
TERMINATED = 3,
OVERRIDE = 5,
DELETE = 7,
ADDING_POINTS = 10,
ADD_O_POINTS = 15,
ADD_X_POINTS = 16,
ADD_BOUNDARY_POINT = 17 };
enum SearchState { UNKNOWN_SEARCH = 0,
NO_SEARCH = 1,
////// Code for island width search
ISLAND_O_POINT,
ISLAND_BOUNDARY_SEARCH,
////// Code for island width search
////// Code for rational surface search
ORIGINAL_RATIONAL = 100,
SEARCHING_SEED,
WAITING_SEED,
FINISHED_SEED,
MINIMIZING_A = 105, // Used to bracket the minimum
MINIMIZING_B,
MINIMIZING_C,
MINIMIZING_X0 = 110, // Used for Golden search routine
MINIMIZING_X1,
MINIMIZING_X2,
MINIMIZING_X3,
BRACKETING_A = 120, //Used to bracket the minimum
BRACKETING_B,
BRACKETING_C
////// Code for rational surface search
};
public:
FieldlineType type;
FieldlineType source;
////// Code for rational surface search
AnalysisMethod analysisMethod;
AnalysisState analysisState;
////// Code for rational surface search
SearchState searchState;
unsigned int iteration;
double safetyFactor;
// Base number of transits
unsigned int toroidalWinding;
unsigned int poloidalWinding;
// Secondary axis number of transits
unsigned int toroidalWindingP;
unsigned int poloidalWindingP;
// Number of transists when an island to get back to the initial puncture.
unsigned int toroidalPeriod;
unsigned int poloidalPeriod;
// Resonance periods
// When a surface resonances equal 1
// When a primary island the resonances equal the base number of
// windings and the toroidal resonance and the base toroidal winding both
// equal the number of islands.
// When secondary islands the toroial resonance is the total number
// of islands and the toroidal resonance divided by the base
// toroidal winding equals the number of island on each group.
unsigned int toroidalResonance;
unsigned int poloidalResonance;
std::vector< WindingPair > windingPairs;
std::map< WindingPair, unsigned int > topWindingPairs;
unsigned int windingGroupOffset;
unsigned int islands;
unsigned int islandGroups;
// If a surface it's overlap is found geometrically
// If an island (primary or secondary) toroidalPeriod / toroidalResonance
float nnodes;
unsigned int maxPunctures;
unsigned int numPunctures;
unsigned int nPuncturesNeeded;
// Rational Surface periodicity measures
double rationalSurfaceTolerance;
// Seeds for islands
avtVector lastSeedPoint;
std::vector< avtVector > seedPoints;
////// Code for island width search
bool pastFirstSearchFailure;
double islandWidth;
double searchBaseDelta;
double searchDelta;
double searchIncrement;
double searchMagnitude;
avtVector searchNormal;
avtPoincareIC* parentOPointIC;
avtPoincareIC* childOPointIC;
unsigned int baseToroidalWinding;
unsigned int basePoloidalWinding;
////// Code for island width search
////// Code for rational surface search
// The rational points bounding the location of the minimization action
avtVector rationalPt1;
avtVector rationalPt2;
std::vector< avtPoincareIC *> *children;
////// Code for rational surface search
};
#endif
class FieldlineLib
{
public:
......
......@@ -1034,10 +1034,10 @@ void FieldlineLib::safetyFactorStats( std::vector< TYPE > &poloidalWindingCounts
// Smallest value is first.
int compareWindingPairStats( const WindingPairStat s0,
const WindingPairStat s1 )
bool compareWindingPairStats( const WindingPairStat s0,
const WindingPairStat s1 )
{
return (s0.stat > s1.stat);
return (s0 > s1);
}
......@@ -2669,18 +2669,13 @@ GetPeriodWindingPairs( std::vector< WindingPairStat > &baseWindingPairStats,
}
inline bool operator<(const WindingPair& lhs, const WindingPair& rhs)
{
return( lhs.toroidal < rhs.toroidal );
}
int
compareSecondWindingPair( const std::pair< WindingPair, unsigned int > s0,
const std::pair< WindingPair, unsigned int > s1 )
{
// return ( s0.second < s1.second );
return ( s0.first.toroidal < s1.first.toroidal );
}
// int
// compareSecondWindingPair( const std::pair< WindingPair, unsigned int > s0,
// const std::pair< WindingPair, unsigned int > s1 )
// {
// // return ( s0.second < s1.second );
// return ( s0.first.toroidal < s1.first.toroidal );
// }
void
......@@ -3348,11 +3343,11 @@ FieldlineLib::fieldlineProperties( std::vector< Point > &ptList,
}
// Sort the winding pairs to look for a bimodal set.
std::vector< std::pair< WindingPair, unsigned int > >
topWindingPairList( topWindingPairs.begin(), topWindingPairs.end() );
// std::vector< std::pair< WindingPair, unsigned int > >
// topWindingPairList( topWindingPairs.begin(), topWindingPairs.end() );
std::sort( topWindingPairList.begin(), topWindingPairList.end(),
compareSecondWindingPair );
// std::sort( topWindingPairList.begin(), topWindingPairList.end(),
// compareSecondWindingPair );
// for( unsigned int j=0; j<topWindingPairList.size(); ++j )
// std::cerr << "LINE " << __LINE__ << " "
......
......@@ -48,253 +48,22 @@
#endif
#include <avtVector.h>
#include <avtPoincareIC.h>
#include <DebugStream.h>
#include <vector>
typedef avtVector Point ;
typedef avtVector Vector;
#include <vector>
struct WindingPairStat {
unsigned int toroidal;
unsigned int poloidal;
double stat;
int ranking;
};
class FieldlineProperties;
#include <avtPoincareIC.h>
#ifndef POINCARE_FIELDLINE_PROPERTIES_H
#define POINCARE_FIELDLINE_PROPERTIES_H
class WindingPair {
public:
WindingPair( unsigned int t, unsigned int p )
{
toroidal = t;
poloidal = p;
};
unsigned int toroidal;
unsigned int poloidal;
};
class FieldlineProperties {
public:
FieldlineProperties()
{
type = FieldlineProperties::UNKNOWN_TYPE;
analysisMethod = FieldlineProperties::DEFAULT_METHOD;
searchState = FieldlineProperties::NO_SEARCH;
analysisState = FieldlineProperties::UNKNOWN_ANALYSIS;
source = FieldlineProperties::UNKNOWN_TYPE;
iteration = 0;
safetyFactor = 0;
toroidalWinding = 0;
poloidalWinding = 0;
toroidalWindingP = 0;
poloidalWindingP = 0;
toroidalResonance = 0;
poloidalResonance = 0;
windingGroupOffset = 0;
islands = 0;
islandGroups = 0;
nnodes = 0;
rationalSurfaceTolerance = 0;
maxPunctures = 0;
numPunctures = 0;
nPuncturesNeeded = 0;
parentOPointIC = 0;
childOPointIC = 0;
};
enum FieldlineType { UNKNOWN_TYPE = 0,
PERIODIC = 0x0010,
RATIONAL = 0x0010,
O_POINT = 0x0011,
X_POINT = 0x0012,
QUASI_PERIODIC = 0x0060,
IRRATIONAL = 0x0060,
FLUX_SURFACE = 0x0020,
ISLAND_CHAIN = 0x0040,
ISLAND_PRIMARY_CHAIN = 0x0040,
ISLAND_SECONDARY_CHAIN = 0x0042,
ISLAND_PRIMARY_SECONDARY_AXIS = 0x0041,
ISLAND_SECONDARY_SECONDARY_AXIS = 0x0043,
CHAOTIC = 30 };
enum AnalysisMethod { UNKNOWN_METHOD = 0,
DEFAULT_METHOD = 1,
RATIONAL_SEARCH = 10,
RATIONAL_MINIMIZE = 11,
RATIONAL_BRACKET = 12 }; //Remove a curve from continueExecute logic
enum AnalysisState { UNKNOWN_ANALYSIS = 0,
COMPLETED = 2,
TERMINATED = 3,
OVERRIDE = 5,
DELETE = 7,
ADDING_POINTS = 10,
ADD_O_POINTS = 15,
ADD_X_POINTS = 16,
ADD_BOUNDARY_POINT = 17 };
enum SearchState { UNKNOWN_SEARCH = 0,
NO_SEARCH = 1,
////// Code for island width search
ISLAND_O_POINT,
ISLAND_BOUNDARY_SEARCH,
////// Code for island width search
////// Code for rational surface search
ORIGINAL_RATIONAL = 100,
SEARCHING_SEED,
WAITING_SEED,
FINISHED_SEED,
MINIMIZING_A = 105, // Used to bracket the minimum
MINIMIZING_B,
MINIMIZING_C,
MINIMIZING_X0 = 110, // Used for Golden search routine
MINIMIZING_X1,
MINIMIZING_X2,
MINIMIZING_X3,
BRACKETING_A = 120, //Used to bracket the minimum
BRACKETING_B,
BRACKETING_C
////// Code for rational surface search
};
public:
FieldlineType type;
FieldlineType source;
////// Code for rational surface search
AnalysisMethod analysisMethod;
AnalysisState analysisState;
////// Code for rational surface search
SearchState searchState;
unsigned int iteration;
double safetyFactor;
// Base number of transits
unsigned int toroidalWinding;
unsigned int poloidalWinding;
// Secondary axis number of transits
unsigned int toroidalWindingP;
unsigned int poloidalWindingP;
// Number of transists when an island to get back to the initial puncture.
unsigned int toroidalPeriod;
unsigned int poloidalPeriod;
// Resonance periods
// When a surface resonances equal 1
// When a primary island the resonances equal the base number of
// windings and the toroidal resonance and the base toroidal winding both
// equal the number of islands.
// When secondary islands the toroial resonance is the total number
// of islands and the toroidal resonance divided by the base
// toroidal winding equals the number of island on each group.
unsigned int toroidalResonance;
unsigned int poloidalResonance;
std::vector< WindingPair > windingPairs;
std::map< WindingPair, unsigned int > topWindingPairs;
unsigned int windingGroupOffset;
unsigned int islands;
unsigned int islandGroups;
// If a surface it's overlap is found geometrically
// If an island (primary or secondary) toroidalPeriod / toroidalResonance
float nnodes;
unsigned int maxPunctures;
unsigned int numPunctures;
unsigned int nPuncturesNeeded;
// Rational Surface periodicity measures
double rationalSurfaceTolerance;
// Seeds for islands
avtVector lastSeedPoint;
std::vector< avtVector > seedPoints;
////// Code for island width search
bool pastFirstSearchFailure;
double islandWidth;
double searchBaseDelta;
double searchDelta;
double searchIncrement;