Commit 2f4c2b77 authored by hrchilds's avatar hrchilds
Browse files

Update from September 3, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@315 18c085ea-50e0-402c-830e-de6fd14e8384
parent 11bec9f2
......@@ -18,4 +18,17 @@ NonQueryableInputException::NonQueryableInputException()
msg = "The input is not queryable.";
}
// ****************************************************************************
// Method: NonQueryableInputException constructor
//
// Programmer: Kathleen Bonnell
// Creation: September 3, 2004
//
// ****************************************************************************
NonQueryableInputException::NonQueryableInputException(const std::string &reason)
{
msg = "The input is not queryable. " + reason;
}
......@@ -19,13 +19,18 @@
//
// Programmer: Kathleen Bonnell
// Creation: October 22, 2002
//
//
// Modifications:
// Kathleen Bonnell, Fri Sep 3 10:10:28 PDT 2004
// Added constructor with string argument.
//
// ****************************************************************************
class AVTEXCEPTION_API NonQueryableInputException : public PipelineException
{
public:
NonQueryableInputException();
NonQueryableInputException(const std::string &);
virtual ~NonQueryableInputException() VISIT_THROW_NOTHING {;};
};
......
......@@ -391,6 +391,10 @@ avtPlot::Execute(avtDataObject_p input, avtPipelineSpecification_p spec,
// Mark C. Miller, Mon Aug 23 20:24:31 PDT 2004
// Added call to set cell count multiplier for SR threshold
//
// Kathleen Bonnell, Fri Sep 3 10:07:11 PDT 2004
// Added test for ValidActiveVariable for attempting to retrieve Units,
// to avoid unncessary exception catches.
//
// ****************************************************************************
avtDataObjectWriter_p
......@@ -440,11 +444,14 @@ avtPlot::Execute(avtDataObject_p input, avtPipelineSpecification_p spec,
//
TRY
{
std::string dobunits = dob->GetInfo().GetAttributes().GetVariableUnits();
if(dobunits == "")
SetVarUnits(NULL);
else
SetVarUnits(dobunits.c_str());
if (dob->GetInfo().GetAttributes().ValidActiveVariable())
{
std::string dobunits = dob->GetInfo().GetAttributes().GetVariableUnits();
if(dobunits == "")
SetVarUnits(NULL);
else
SetVarUnits(dobunits.c_str());
}
}
CATCH(ImproperUseException)
{
......
......@@ -228,16 +228,17 @@ avtDataObjectQuery::ChangedInput()
// Programmer: Kathleen Bonnell
// Creation: October 22, 2002
//
// Modifications:
// Kathleen Bonnell, Fri Sep 3 08:33:47 PDT 2004
// As the base class for all queries, made this the least restrictive.
// Any derived type can override this method to make it more restrictive.
//
// ****************************************************************************
void
avtDataObjectQuery::VerifyInput()
{
//
// A few general tests for all query types.
//
if ((!GetInput()->GetInfo().GetValidity().GetQueryable()) ||
(GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() == 0))
if (!GetInput()->GetInfo().GetValidity().GetQueryable())
{
EXCEPTION0(NonQueryableInputException);
}
......
......@@ -10,6 +10,7 @@
#include <vtkRectilinearGrid.h>
#include <vtkVisItCellLocator.h>
#include <vtkVisItUtility.h>
#include <NonQueryableInputException.h>
#include <avtParallel.h>
......@@ -50,6 +51,29 @@ avtLocateQuery::~avtLocateQuery()
;
}
// ****************************************************************************
// Method: avtLocateQuery::VerifyInput
//
// Purpose:
// Rejects non-queryable input && input that has topological dimension == 0
//
// Programmer: Kathleen Bonnell
// Creation: September 3, 2004
//
// Modifications:
//
// ****************************************************************************
void
avtLocateQuery::VerifyInput()
{
avtDataObjectQuery::VerifyInput();
if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
{
EXCEPTION1(NonQueryableInputException,
"Requires plot with topological dimension > 0.");
}
}
// ****************************************************************************
// Method: avtLocateQuery::PreExecute
......
......@@ -23,6 +23,8 @@ class vtkRectilinearGrid;
// Creation: May 18, 2004
//
// Modifications:
// Kathleen Bonnell, Fri Sep 3 10:10:28 PDT 2004
// Added VerifyInput.
//
// ****************************************************************************
......@@ -43,6 +45,7 @@ class QUERY_API avtLocateQuery : public avtDatasetQuery
virtual void PreExecute(void);
virtual void PostExecute(void);
virtual void VerifyInput(void);
bool RGridIsect(vtkRectilinearGrid *,
float &dist,
float isect[3],
......
......@@ -490,23 +490,6 @@ avtPickQuery::SetRealIds(vtkDataSet *ds)
}
// ****************************************************************************
// Method: avtPickQuery::VerifyInput
//
// Purpose:
// Verify a new input. Overrides parent class.
//
// Programmer: Kathleen Bonnell
// Creation: March 31, 2004
//
// ****************************************************************************
void
avtPickQuery::VerifyInput()
{
avtDataObjectQuery::VerifyInput();
}
// ****************************************************************************
// Method: avtPickQuery::GetNodeCoords
//
......
......@@ -66,6 +66,9 @@ class avtExpressionEvaluatorFilter;
// Kathleen Bonnell, Mon Aug 30 17:56:29 PDT 2004
// Added skippedLocate flag, and Set method.
//
// Kathleen Bonnell, Fri Sep 3 08:36:58 PDT 2004
// Removed VerifyInput.
//
// ****************************************************************************
class QUERY_API avtPickQuery : public avtDatasetQuery
......@@ -101,7 +104,6 @@ class QUERY_API avtPickQuery : public avtDatasetQuery
bool skippedLocate;
// Query-specific code that needs to be defined.
virtual void VerifyInput(void);
virtual void PreExecute(void);
virtual void PostExecute(void);
virtual avtDataObject_p ApplyFilters(avtDataObject_p);
......
......@@ -24,7 +24,7 @@
#include <DebugStream.h>
#include <InvalidVariableException.h>
#include <InvalidDimensionsException.h>
#include <VisItException.h>
#include <NonQueryableInputException.h>
#include <snprintf.h>
#include <float.h>
......@@ -88,6 +88,31 @@ avtCompactnessQuery::~avtCompactnessQuery()
}
// ****************************************************************************
// Method: avtCompactnessQuery::VerifyInput
//
// Purpose:
// Rejects non-queryable input && input that has topological dimension == 0
//
// Programmer: Kathleen Bonnell
// Creation: September 3, 2004
//
// Modifications:
//
// ****************************************************************************
void
avtCompactnessQuery::VerifyInput()
{
avtDataObjectQuery::VerifyInput();
if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
{
EXCEPTION1(NonQueryableInputException,
"Requires plot with topological dimension > 0.");
}
}
// ****************************************************************************
// Method: avtCompactnessQuery::PreExecute
//
......
......@@ -37,6 +37,9 @@ class vtkCell;
// Moved inlined destructor definition to .C file because certain compilers
// have problems with them.
//
// Kathleen Bonnell, Fri Sep 3 10:10:28 PDT 2004
// Added VerifyInput.
//
// ****************************************************************************
class QUERY_API avtCompactnessQuery : public avtTwoPassDatasetQuery
......@@ -78,6 +81,7 @@ class QUERY_API avtCompactnessQuery : public avtTwoPassDatasetQuery
virtual void PreExecute(void);
virtual void MidExecute();
virtual void PostExecute(void);
virtual void VerifyInput(void);
static void Get2DCellCentroid(vtkCell*,float&,float&);
static float Get2DCellArea(vtkCell*);
......
......@@ -19,6 +19,7 @@
#include <DebugStream.h>
#include <ImproperUseException.h>
#include <NonQueryableInputException.h>
#ifdef PARALLEL
#include <mpi.h>
......@@ -73,6 +74,34 @@ avtEulerianQuery::~avtEulerianQuery()
}
// ****************************************************************************
// Method: avtEulerianQuery::VerifyInput
//
// Purpose:
// Rejects non-queryable input && input that has topological dimension == 0
//
// Programmer: Kathleen Bonnell
// Creation: September 3, 2004
//
// Modifications:
//
// ****************************************************************************
void
avtEulerianQuery::VerifyInput()
{
avtDataObjectQuery::VerifyInput();
if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
{
EXCEPTION1(NonQueryableInputException,
"Requires plot with topological dimension > 0.");
}
}
// ****************************************************************************
// Method: avtEulerianQuery::Execute
//
......
......@@ -33,6 +33,9 @@ class vtkGeometryFilter;
// Brad Whitlock, Fri Nov 22 11:00:01 PDT 2002
// Introduced a typedef to make the Windows compiler happier. Added API.
//
// Kathleen Bonnell, Fri Sep 3 10:10:28 PDT 2004
// Added VerifyInput.
//
// ****************************************************************************
class QUERY_API avtEulerianQuery : public avtDatasetQuery
......@@ -84,6 +87,7 @@ class QUERY_API avtEulerianQuery : public avtDatasetQuery
DomainToEulerMap domToEulerMap;
virtual void Execute(vtkDataSet *, const int);
virtual void VerifyInput(void);
virtual void PreExecute(void);
virtual void PostExecute(void);
};
......
......@@ -6,6 +6,7 @@
#include <avtRevolvedSurfaceArea.h>
#include <avtSourceFromAVTDataset.h>
#include <NonQueryableInputException.h>
using std::string;
......@@ -100,6 +101,9 @@ avtTotalRevolvedSurfaceAreaQuery::ApplyFilters(avtDataObject_p inData)
// Creation: July 27, 2004
//
// Modifications:
// Kathleen Bonnell, Fri Sep 3 09:03:24 PDT 2004
// Added test for topological dimension, as that is no longer performed by
// base class.
//
// ****************************************************************************
......@@ -110,7 +114,13 @@ avtTotalRevolvedSurfaceAreaQuery::VerifyInput(void)
// We want to do this in addition to what the base class does, so call the
// base class' version of this method as well.
//
avtSummationQuery::VerifyInput();
avtDataObjectQuery::VerifyInput();
if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
{
EXCEPTION1(NonQueryableInputException,
"Requires plot with topological dimension > 0.");
}
SetUnits(GetInput()->GetInfo().GetAttributes().GetXUnits());
}
......@@ -6,6 +6,7 @@
#include <avtRevolvedVolume.h>
#include <avtSourceFromAVTDataset.h>
#include <NonQueryableInputException.h>
using std::string;
......@@ -113,6 +114,9 @@ avtTotalRevolvedVolumeQuery::ApplyFilters(avtDataObject_p inData)
// Creation: July 27, 2004
//
// Modifications:
// Kathleen Bonnell, Fri Sep 3 09:03:24 PDT 2004
// Added test for topological dimension, as that is no longer performed by
// base class.
//
// ****************************************************************************
......@@ -123,7 +127,13 @@ avtTotalRevolvedVolumeQuery::VerifyInput(void)
// We want to do this in addition to what the base class does, so call the
// base class' version of this method as well.
//
avtSummationQuery::VerifyInput();
avtDataObjectQuery::VerifyInput();
if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
{
EXCEPTION1(NonQueryableInputException,
"Requires plot with topological dimension > 0.");
}
SetUnits(GetInput()->GetInfo().GetAttributes().GetXUnits());
}
......@@ -901,6 +901,9 @@ ViewerQueryManager::GetQueryClientAtts()
// added calls to DoSpatialExtentsQuery, VerifySingleInputQuery,
// and VerifyMultipleInputQuery.
//
// Kathleen Bonnell, Fri Sep 3 09:59:25 PDT 2004
// Modified handling of 'NonQueryableInputException'.
//
// ****************************************************************************
void
......@@ -1057,7 +1060,8 @@ ViewerQueryManager::DatabaseQuery(ViewerWindow *oWin, const string &qName,
retry = true;
numAttempts++;
}
else if (e.GetExceptionType() == "InvalidDimensionsException")
else if ((e.GetExceptionType() == "InvalidDimensionsException") ||
(e.GetExceptionType() == "NonQueryableInputException"))
{
//
// Create message for the gui that includes the query name
......@@ -1066,15 +1070,6 @@ ViewerQueryManager::DatabaseQuery(ViewerWindow *oWin, const string &qName,
SNPRINTF(message, sizeof(message), "%s: %s", qName.c_str(),
e.GetMessage().c_str());
}
else if (e.GetExceptionType() == "NonQueryableInputException")
{
//
// Create message.
//
SNPRINTF(message, sizeof(message), "%s%s",
"The currently active plot is non-queryable.\n",
"Please select a different plot and try again.");
}
else
{
//
......
......@@ -984,14 +984,44 @@ ViewerWindow::RecenterView()
// Modified the routine to reset the view for all the view modes,
// instead of just the current mode.
//
// Eric Brugger, Fri Sep 3 15:15:06 PDT 2004
// Modified the routine to reset the view for all the view modes and
// then actually reset the view for current view mode.
//
// ****************************************************************************
void
ViewerWindow::ResetView()
{
ResetViewCurve();
ResetView2d();
ResetView3d();
//
// Reset all the view modes.
//
boundingBoxValidCurve = false;
viewSetInCurve = false;
boundingBoxValid2d = false;
viewSetIn2d = false;
boundingBoxValid3d = false;
viewSetIn3d = false;
viewPartialSetIn3d = false;
//
// Reset the view for the current mode. This will actually reset
// the view for any existing plots.
//
switch (visWindow->GetWindowMode())
{
case WINMODE_CURVE:
ResetViewCurve();
break;
case WINMODE_2D:
ResetView2d();
break;
case WINMODE_3D:
ResetView3d();
break;
default:
break;
}
}
// ****************************************************************************
......
......@@ -84,6 +84,12 @@
# Kathleen Bonnell, Mon Aug 16 11:41:34 PDT 2004
# I added PyInteractorAttributes.
#
# Eric Brugger, Fri Sep 3 16:56:35 PDT 2004
# I removed -L/usr/local/lib from the LDFLAGS. The cli doesn't need
# anything from that directory, but it can cause problems sometimes.
# In particular, on gps the wrong libstdc++ gets loaded and the cli
# crashes on startup.
#
##############################################################################
##
......@@ -148,7 +154,7 @@ CLI=$(tmpbin)/cli
##
## Override the certain variables with values from configure.
##
LDFLAGS=-L../lib -L/usr/local/lib @PY_LDFLAGS@ @LDFLAGS@
LDFLAGS=-L../lib @PY_LDFLAGS@ @LDFLAGS@
LIBS=@LIBS@ -lviewerproxy -lviewerrpc -lcomm -lmisc -lstate -lutility \
-lplugin -ldbatts -lavtexceptions -lparser @PY_LIB@
CXXFLAGS=@CXXFLAGS@ @PY_CXXFLAGS@ -I. -I../include/visit
......
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