Commit 40d20209 authored by bonnell's avatar bonnell
Browse files

Remove Poincare plot, no longer used, functionality now in operator. Per Allen Sanderson

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27761 18c085ea-50e0-402c-830e-de6fd14e8384
parent efb8a509
# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake
PROJECT(Poincare)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/PluginMacros.cmake)
SET(COMMON_SOURCES
PoincarePluginInfo.C
PoincareCommonPluginInfo.C
PoincareAttributes.C
)
SET(LIBI_SOURCES
PoincarePluginInfo.C
)
SET(LIBG_SOURCES
PoincareGUIPluginInfo.C
QvisPoincarePlotWindow.C
${COMMON_SOURCES}
)
SET(LIBG_MOC_SOURCES
QvisPoincarePlotWindow.h
)
SET(LIBV_SOURCES
PoincareViewerEnginePluginInfo.C
PoincareViewerPluginInfo.C
avtPoincarePlot.C
${COMMON_SOURCES}
)
SET(LIBE_SOURCES
PoincareViewerEnginePluginInfo.C
PoincareEnginePluginInfo.C
avtPoincarePlot.C
avtPoincareFilter.C
FieldlineAnalyzerLib.C
RationalSurfaceLib.C
skelet.C
dir_graph.C
${COMMON_SOURCES}
)
IF(VISIT_PYTHON_SCRIPTING)
SET(PYINCLUDES ${PYTHON_INCLUDE_PATH} ${VISIT_INCLUDE_DIR}/visitpy/visitpy)
ENDIF(VISIT_PYTHON_SCRIPTING)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${VISIT_COMMON_INCLUDES}
${VISIT_INCLUDE_DIR}/avt/DBAtts/MetaData
${VISIT_INCLUDE_DIR}/avt/DBAtts/SIL
${VISIT_INCLUDE_DIR}/avt/Database/Database
${VISIT_INCLUDE_DIR}/avt/FileWriter
${VISIT_INCLUDE_DIR}/avt/Filters
${VISIT_INCLUDE_DIR}/avt/IVP
${VISIT_INCLUDE_DIR}/avt/Math
${VISIT_INCLUDE_DIR}/avt/Pipeline/AbstractFilters
${VISIT_INCLUDE_DIR}/avt/Pipeline/Data
${VISIT_INCLUDE_DIR}/avt/Pipeline/Pipeline
${VISIT_INCLUDE_DIR}/avt/Pipeline/Sinks
${VISIT_INCLUDE_DIR}/avt/Pipeline/Sources
${VISIT_INCLUDE_DIR}/avt/Plotter
${VISIT_INCLUDE_DIR}/avt/QtVisWindow
${VISIT_INCLUDE_DIR}/avt/View
${VISIT_INCLUDE_DIR}/avt/VisWindow/Colleagues
${VISIT_INCLUDE_DIR}/avt/VisWindow/Interactors
${VISIT_INCLUDE_DIR}/avt/VisWindow/Proxies
${VISIT_INCLUDE_DIR}/avt/VisWindow/Tools
${VISIT_INCLUDE_DIR}/avt/VisWindow/VisWindow
${VISIT_INCLUDE_DIR}/gui
${VISIT_INCLUDE_DIR}/viewer/core
${VISIT_INCLUDE_DIR}/viewer/main
${VISIT_INCLUDE_DIR}/viewer/main/ui
${VISIT_INCLUDE_DIR}/viewer/proxy
${VISIT_INCLUDE_DIR}/viewer/rpc
${VISIT_INCLUDE_DIR}/winutil
${VISIT_INCLUDE_DIR}/visit_vtk/full
${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${EAVL_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${PYINCLUDES}
)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${QT_LIBRARY_DIR} ${GLEW_LIBRARY_DIR} ${EAVL_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${NEKTAR++_LIBRARY_DIR} ${NEKTAR++_LIBRARY_DIRS} ${NEKTAR++_TP_LIBRARY_DIRS} ${ACCELERATE_FRAMEWORK_LINK_FLAGS})
ADD_LIBRARY(IPoincarePlot ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(IPoincarePlot visitcommon)
SET(INSTALLTARGETS IPoincarePlot)
IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
QT_WRAP_CPP(GPoincarePlot LIBG_SOURCES ${LIBG_MOC_SOURCES})
ADD_LIBRARY(GPoincarePlot ${LIBG_SOURCES})
TARGET_LINK_LIBRARIES(GPoincarePlot visitcommon gui )
ADD_LIBRARY(VPoincarePlot ${LIBV_SOURCES})
TARGET_LINK_LIBRARIES(VPoincarePlot visitcommon viewer )
SET(INSTALLTARGETS ${INSTALLTARGETS} GPoincarePlot VPoincarePlot)
IF(VISIT_PYTHON_SCRIPTING)
SET(LIBS_SOURCES
PoincareScriptingPluginInfo.C
PyPoincareAttributes.C
${COMMON_SOURCES}
)
ADD_LIBRARY(SPoincarePlot ${LIBS_SOURCES})
TARGET_LINK_LIBRARIES(SPoincarePlot visitcommon visitpy ${PYTHON_LIBRARY})
SET(INSTALLTARGETS ${INSTALLTARGETS} SPoincarePlot)
ENDIF(VISIT_PYTHON_SCRIPTING)
IF(VISIT_JAVA)
FILE(COPY PoincareAttributes.java DESTINATION ${JavaClient_BINARY_DIR}/src/plots)
ADD_CUSTOM_TARGET(JavaPoincare ALL ${Java_JAVAC_EXECUTABLE} ${VISIT_Java_FLAGS} -d ${JavaClient_BINARY_DIR} -classpath ${JavaClient_BINARY_DIR} -sourcepath ${JavaClient_BINARY_DIR} PoincareAttributes.java
DEPENDS JavaClient
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
ENDIF(VISIT_JAVA)
ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(EPoincarePlot_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EPoincarePlot_ser visitcommon avtplotter_ser avtpipeline_ser avtivp_ser )
SET(INSTALLTARGETS ${INSTALLTARGETS} EPoincarePlot_ser)
ADD_TARGET_DEFINITIONS(EPoincarePlot_ser ENGINE)
IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(EPoincarePlot_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EPoincarePlot_par visitcommon avtplotter_par avtpipeline_par avtivp_par )
SET(INSTALLTARGETS ${INSTALLTARGETS} EPoincarePlot_par)
ADD_TARGET_DEFINITIONS(EPoincarePlot_par ENGINE)
ENDIF(VISIT_PARALLEL)
VISIT_INSTALL_PLOT_PLUGINS(${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_RTOD(plots ${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_FOLDER(plots Poincare ${INSTALLTARGETS})
This diff is collapsed.
/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2009 Scientific Computing and Imaging Institute,
University of Utah.
License for the specific language governing rights and limitations under
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
/*
* FieldlineAnalyzer.h:
*
* Written by:
* Allen Sanderson
* SCI Institute
* University of Utah
* September 2006
*
*/
#if !defined(FieldlineAnalyzerLib_h)
#define FieldlineAnalyzerLib_h
#define STRAIGHTLINE_SKELETON 1
#ifdef STRAIGHTLINE_SKELETON
#include "skelet.h"
#endif
#include <avtVector.h>
#include <avtPoincareIC.h>
#include <DebugStream.h>
#include <vector>
typedef avtVector Point ;
typedef avtVector Vector;
struct WindingPairStat {
unsigned int toroidal;
unsigned int poloidal;
double stat;
int ranking;
bool operator < (const WindingPairStat &i) const {return stat < i.stat;}
bool operator > (const WindingPairStat &i) const {return stat > i.stat;}
};
class FieldlineLib
{
public:
Point interpert( Point lastPt, Point currPt, double t );
int ccw( Vector v0, Vector v1 );
int intersect( Point l0_p0, Point l0_p1,
Point l1_p0, Point l1_p1 );
void convexHull( std::vector< std::pair< Point, unsigned int > > &hullPts,
unsigned int &m,
unsigned int npts,
int dir );
bool hullCheck( std::vector< Point > &points,
int &direction);
unsigned int isPrime( unsigned int a );
unsigned int GCD( unsigned int a, unsigned int b );
unsigned int GCD( std::vector< unsigned int > values,
unsigned int &freq,
unsigned int minGCD = 1 );
unsigned int ResonanceCheck( std::vector< std::pair< unsigned int, double > > &stats,
unsigned int baseResonance,
unsigned int max_samples = 3 );
Point circle(Point &pt1, Point &pt2, Point &pt3);
bool IsPerpendicular(Point &pt1, Point &pt2, Point &pt3);
Point CalcCircle(Point &pt1, Point &pt2, Point &pt3);
bool
IntersectCheck( std::vector< Point >& points,
unsigned int nbins,
unsigned int skip );
unsigned int Blankinship( unsigned int toroidalWinding,
unsigned int poloidalWinding,
unsigned int skip = 1 );
void rotationalSumStats( std::vector< double > &rotationalSums,
double &averageRotationalSum,
double &stdDev );
template< class TYPE >
void safetyFactorStats( std::vector< TYPE > &poloidalWindingCounts,
double &averageSafetyFactor,
double &stdDev );
void SortWindingPairStats( std::vector< WindingPairStat > &windingPairStats,
bool reverse = false );
void RankWindingPairStats( std::vector< WindingPairStat > &windingPairStats,
bool LT = true );
void poloidalWindingCheck( std::vector< unsigned int > &poloidalWindingset,
std::vector< WindingPairStat > &windingPairStats );
void
periodicityStats( std::vector< Point >& points,
std::vector< std::pair< unsigned int, double > >& stats,
unsigned int max_period,
unsigned int checkType );
void thresholdStats( std::vector< std::pair< unsigned int, double > >& stats,
bool erase,
unsigned int checkType );
double
calculateSumOfSquares( std::vector< Point >& poloidalWinding_points,
unsigned int poloidalWinding,
unsigned int checkType );
bool
rationalCheck( std::vector< Point >& points,
unsigned int toroidalWinding,
unsigned int &nnodes,
float delta=0.01 );
bool
islandChecks( std::vector< Point >& points,
unsigned int toroidalWinding,
unsigned int &islands,
unsigned int &nnodes,
bool &complete );
void
getPunctures( std::vector< Point > &ptList,
Vector planeN,
std::vector< Point > &puncturePts );
void
getFieldlineBaseValues( std::vector< Point > &ptList,
std::vector< Point > &poloidal_puncture_pts,
std::vector< Point > &ridgeline_points,
std::vector< double > &rotationalSums,
std::vector< unsigned int > &poloidalWindingCounts,
float &delta,
unsigned int OLineToroidalWinding );
Point getAxisPt( Point pt, double phi, double toroidalBase );
void
GetBaseWindingPairs( std::vector< unsigned int > &poloidalWindingCounts,
std::vector< Point > &poloidal_puncture_pts,
std::vector< WindingPairStat > &baseWindingPairStats,
double &windingPairConfidence,
unsigned int &toroidalWindingMax,
unsigned int &poloidalWindingMax,
unsigned int &windingNumberMatchIndex );
void
GetPeriodWindingPairs( std::vector< WindingPairStat > &baseWindingPairStats,
std::vector< WindingPairStat > &periodWindingPairStats,
std::vector< std::pair< unsigned int, double > > &toroidalStats,
std::vector< std::pair< unsigned int, double > > &poloidalStats );
void
fieldlineProperties( std::vector< Point > &ptList,
FieldlineProperties &properties,
unsigned int overrideToroidalWinding,
unsigned int overridePoloidalWinding,
unsigned int maxToroidalWinding,
double windingPairConfidence,
double rationalSurfaceFactor,
bool detectIslandCenters,
unsigned int OLineToroidalWinding,
std::string OLineAxisFilename );
void
fieldlineProperties2( std::vector< Point > &ptList,
double rationalSurfaceFactor,
FieldlineProperties &fi );
void findIslandCenters( std::vector< Point > &puncturePts,
unsigned int islands,
unsigned int offset,
unsigned int nnodes,
unsigned int moduloValue,
std::vector< Point > &centers,
std::vector< Vector > &axis );
Point findSkeletonCenter( Skeleton::Skeleton &s,
unsigned int nHullPts );
unsigned int
islandProperties( std::vector< Point > &points,
Vector &baseCentroid,
unsigned int &startIndex,
unsigned int &middleIndex,
unsigned int &stopIndex,
unsigned int &nodes );
unsigned int
surfaceOverlapCheck( std::vector< std::vector< Point > > &bins,
unsigned int toroidalWinding,
unsigned int skip,
unsigned int &nnodes );
unsigned int
surfaceGroupCheck( std::vector< std::vector< Point > > &bins,
unsigned int i,
unsigned int j,
unsigned int nnodes );
unsigned int
removeOverlap( std::vector< std::vector < Point > > &bins,
unsigned int &nnodes,
unsigned int toroidalWinding,
unsigned int poloidalWinding,
unsigned int skip,
unsigned int island );
unsigned int
smoothCurve( std::vector< std::vector < Point > > &bins,
unsigned int &nnodes,
unsigned int toroidalWinding,
unsigned int poloidalWinding,
unsigned int skip,
unsigned int island );
unsigned int
mergeOverlap( std::vector< std::vector < Point > > &bins,
unsigned int &nnodes,
unsigned int toroidalWinding,
unsigned int poloidalWinding,
unsigned int skip,
unsigned int island );
bool verboseFlag;
protected:
std::vector< Point > OLineAxisPts;
std::vector< double > OLineAxisPhiAngles;
unsigned int OLineAxisIndex;
std::string OLineAxisFileName;
};
class Otsu
{
// Compute the q values in the equation
double Px( unsigned int init, unsigned int end, std::vector< unsigned int > &histo);
// Compute the mean values in the equation (mu)
double Mx( unsigned int init, unsigned int end, std::vector< unsigned int > &histo);
// Find the maximum element in a std::vector
unsigned int findMaxVet( std::vector< double > &vet, double &maxVet);
// Compute the histogram
void getHistogram( std::vector< std::pair< unsigned int, double > >& stats,
std::vector< unsigned int > &histo );
public:
// find otsu threshold
void getOtsuThreshold2(std::vector< std::pair< unsigned int, double > >& stats,
double &threshold, double &maxVet );
// find otsu threshold
void getOtsuThreshold3(std::vector< std::pair< unsigned int, double > >& stats,
double &threshold0, double &threshold1,
double &maxVet );
};
int chainHull_2D( std::vector< std::pair< Point, unsigned int > > &pts,
std::vector< std::pair< Point, unsigned int > > &hullPts,
int direction );
#endif // FieldlineAnalyzerLib_h
Function: CopyAttributes
Declaration: bool CopyAttributes(const AttributeGroup *atts);
Definition:
// ****************************************************************************
// Method: PoincareAttributes::CopyAttributes
//
// Purpose:
// CopyAttributes method for the PoincareAttributes class.
//
// Programmer: Dave Pugmire
// Creation: Tues Oct 21 14:22:17 EDT 2008
//
// Modifications:
// Jeremy Meredith, Wed Apr 8 16:48:05 EDT 2009
// Initial steps to unification with streamline attributes.
// ****************************************************************************
bool
PoincareAttributes::CopyAttributes(const AttributeGroup *atts)
{
bool retval = false;
if(TypeName() == atts->TypeName())
{
// Call assignment operator.
const PoincareAttributes *tmp = (const PoincareAttributes *)atts;
*this = *tmp;
retval = true;
}
else if(atts->TypeName() == "PointAttributes")
{
const PointAttributes *p = (PointAttributes *)atts;
SetPointSource(p->GetPoint());
retval = true;
}
else if(atts->TypeName() == "Line")
{
const Line *line = (const Line *)atts;
SetLineStart(line->GetPoint1());
SetLineEnd(line->GetPoint2());
retval = true;
}
return retval;
}
Function: CreateCompatible
Declaration: AttributeSubject *CreateCompatible(const std::string &tname) const;
Definition:
// ****************************************************************************
// Method: PoincareAttributes::CreateCompatible
//
// Purpose:
// Creates a new state object of the desired type.
//
// Programmer: Dave Pugmire
// Creation: Tues Oct 21 14:22:17 EDT 2008
//
// Modifications:
// Jeremy Meredith, Wed Apr 8 16:48:05 EDT 2009
// Initial steps to unification with streamline attributes.
// ****************************************************************************
AttributeSubject *
PoincareAttributes::CreateCompatible(const std::string &tname) const
{
AttributeSubject *retval = 0;
if (TypeName() == tname)
{
retval = new PoincareAttributes(*this);
}
else if (tname == "PointAttributes")
{
PointAttributes *p = new PointAttributes;
p->SetPoint(GetPointSource());
retval = p;
}
else if (tname == "Line")
{
Line *l = new Line;
l->SetPoint1(GetLineStart());
l->SetPoint2(GetLineEnd());
retval = l;
}
return retval;
}
Function: ChangesRequireRecalculation
Declaration: bool ChangesRequireRecalculation(const PoincareAttributes &obj) const;
Definition:
// ****************************************************************************
// Method: PoincareAttributes::ChangesRequireRecalculation
//
// Purpose:
// Determine if attribute changes require recalculation.
//
// Programmer: Dave Pugmire
// Creation: Tues Oct 21 14:22:17 EDT 2008
//
// Modifications:
//
// ****************************************************************************
bool
PoincareAttributes::ChangesRequireRecalculation(const PoincareAttributes &obj) const
{
return StreamlineAttsRequireRecalculation(obj) ||
PoincareAttsRequireRecalculation(obj);
}
Function: StreamlineAttsRequireRecalculation
Declaration: bool StreamlineAttsRequireRecalculation(const PoincareAttributes &obj) const;
Definition:
// ****************************************************************************
// Method: PoincareAttributes::StreamlineAttsRequireRecalculation
//
// Purpose:
// Determine if streamline attribute changes require recalculation.
//
// Programmer: Dave Pugmire
// Creation: Tues Oct 21 14:22:17 EDT 2008
//
// Modifications:
//
// ****************************************************************************
#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
PoincareAttributes::StreamlineAttsRequireRecalculation(const PoincareAttributes &obj) const
{
// If we're in point source mode and the points differ, sourcePointsDiffer
// evaluates to true.
bool sourcePointsDiffer = ((sourceType == SpecifiedPoint) &&
POINT_DIFFERS(pointSource, obj.pointSource));
// If we're in line source mode and the line differs, sourceLineDiffers
// evaluates to true.
bool sourceLineDiffers = ((sourceType == SpecifiedLine) &&
(POINT_DIFFERS(lineStart, obj.lineStart) ||
POINT_DIFFERS(lineEnd, obj.lineEnd)));
// Other things need to be true before we start paying attention to
// point density.
bool densityMatters = ((sourceType == SpecifiedLine) &&
(pointDensity != obj.pointDensity));
return (sourceType != obj.sourceType ||
sourcePointsDiffer ||
sourceLineDiffers ||
(fieldType == FlashField &&
POINT_DIFFERS(velocitySource, obj.velocitySource)) ||
densityMatters ||
minPunctures != obj.minPunctures ||
maxPunctures != obj.maxPunctures ||
puncturePlane != obj.puncturePlane ||
fieldType != obj.fieldType ||
fieldConstant != obj.fieldConstant ||
integrationType != obj.integrationType ||
maxStepLength != obj.maxStepLength ||
limitMaximumTimestep != obj.limitMaximumTimestep ||
maxTimeStep != obj.maxTimeStep ||
relTol != obj.relTol ||
absTolSizeType != obj.absTolSizeType ||
absTolAbsolute != obj.absTolAbsolute ||
absTolBBox != obj.absTolBBox);
}
Function: PoincareAttsRequireRecalculation