Commit c8066f9f authored by hrchilds's avatar hrchilds

Update from April 27, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@230 18c085ea-50e0-402c-830e-de6fd14e8384
parent 3ed89f7f
......@@ -70,6 +70,9 @@
# Mark C. Miller, Tue Apr 13 08:16:51 PDT 2004
# Removed sil.py and samrai.py from parallel skip list
#
# Mark C. Miller, Thu Apr 22 22:35:17 PDT 2004
# Made clearmake parallel since we're already running tests in parallel
#
# ----------------------------------------------------------------------------
# list of users who want email every night with the log file
......@@ -153,7 +156,7 @@ LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
env CXXFLAGS="-g" ./configure --enable-parallel 1>> buildlog 2>&1
rm -f plugins/*/*.so
clearmake 1>> buildlog 2>&1
clearmake -J 2 1>> buildlog 2>&1
error=$?
# email if the build failed
......
......@@ -62,6 +62,9 @@
# Hank Childs, Thu Feb 5 18:11:46 PST 2004
# Added avtSingleInputExpressionFilter and avtComparisonFilter.
#
# Kathleen Bonnell, Tue Apr 27 13:29:46 PDT 2004
# Added ExprPipelineState.
#
##############################################################################
@SET_MAKE@
......@@ -111,7 +114,8 @@ General_src= \
Management_src= \
Management/avtExpressionEvaluatorFilter.C \
Management/avtConstantCreatorFilter.C
Management/avtConstantCreatorFilter.C \
Management/ExprPipelineState.C
Math_src= \
Math/avtAbsValFilter.C \
......
// ************************************************************************* //
// ExprPipelineState.C //
// ************************************************************************* //
#include <ExprPipelineState.h>
#include <vector>
#include <avtExpressionFilter.h>
using std::vector;
using std::string;
// ****************************************************************************
// Method: ExprPipelineState constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Sean Ahern
// Creation: Thu Nov 21 15:15:07 PST 2002
//
// Modifications:
//
// ****************************************************************************
ExprPipelineState::ExprPipelineState()
{
dataObject=NULL;
}
// ****************************************************************************
// Method: ExprPipelineState destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Sean Ahearn
// Creation: Thu Nov 21 15:15:07 PST 2002
//
// Modifications:
// Kathleen Bonnell, Thu Apr 22 14:55:09 PDT 2004
// Delete the filters.
//
// ****************************************************************************
ExprPipelineState::~ExprPipelineState()
{
for (int i = 0; i < filters.size(); ++i)
{
delete filters[i];
}
}
// ****************************************************************************
// Method: ExprPipelineState::PopName
//
// Purpose:
// Removes a name from the back of the name stack and returns it.
//
// Programmer: Sean Ahern
// Creation: Thu Nov 21 15:15:07 PST 2002
//
// Modifications:
//
// ****************************************************************************
string
ExprPipelineState::PopName()
{
string ret = name_stack.back();
name_stack.pop_back();
return ret;
}
// ****************************************************************************
// Method: ExprPipelineState::ReleaseData
//
// Purpose:
// Releases the data associated the expression filters.
//
// Programmer: Kathleen Bonnell
// Creation: April 22, 2004
//
// Modifications:
//
// ****************************************************************************
void
ExprPipelineState::ReleaseData()
{
for (int i = 0; i < filters.size(); ++i)
filters[i]->ReleaseData();
}
// ************************************************************************* //
// ExprPipelineState //
// ************************************************************************* //
#ifndef EXPR_PIPELINE_STATE_H
#define EXPR_PIPELINE_STATE_H
......@@ -5,21 +9,37 @@
class avtExpressionFilter;
// ****************************************************************************
// Class: ExprPipelineState
//
// Purpose:
// Holds information about the pipeline state for expressions.
//
// Programmer: Sean Ahern
// Creation: Thu Nov 21 15:15:07 PST 2002
//
// Modifications:
// Kathleen Bonnell, Thu Apr 22 14:42:38 PDT 2004
// Moved code to new Source file. Added ReleaseData method.
//
// ****************************************************************************
class ExprPipelineState
{
public:
ExprPipelineState() {dataObject=NULL;}
~ExprPipelineState() {}
void PushName(std::string s) {name_stack.push_back(s);}
std::string PopName()
{std::string ret = name_stack.back();
name_stack.pop_back();
return ret;}
ExprPipelineState();
~ExprPipelineState();
void PushName(std::string s) {name_stack.push_back(s);}
std::string PopName();
void SetDataObject(avtDataObject_p d) {dataObject = d;}
avtDataObject_p GetDataObject() {return dataObject;}
void AddFilter(avtExpressionFilter *f) {filters.push_back(f);}
std::vector<avtExpressionFilter*>& GetFilters() {return filters;}
void ReleaseData(void);
protected:
std::vector<std::string> name_stack;
avtDataObject_p dataObject;
......
......@@ -174,6 +174,11 @@ avtExpressionEvaluatorFilter::AdditionalPipelineFilters(void)
// Hank Childs, Sat Dec 13 15:55:31 PST 2003
// Don't be so quick to declare something a recursive function.
//
// Kathleen Bonnell, Tue Apr 27 11:34:23 PDT 2004
// Added test to determine if new filters need to be created. If not,
// don't set the pipelineSpec's DataObject to NULL, and don't create new
// filters. (QueryOverTime will re-use these filters for each time step).
//
// ****************************************************************************
avtPipelineSpecification_p
......@@ -183,8 +188,16 @@ avtExpressionEvaluatorFilter::PerformRestriction(
int i;
avtPipelineSpecification_p rv = spec;
lastUsedSpec = spec;
avtDataSpecification_p ds = spec->GetDataSpecification();
bool createFilters = true;
if (*lastUsedSpec != NULL)
{
avtDataSpecification_p ds1 = lastUsedSpec->GetDataSpecification();
createFilters = pipelineState.GetFilters().size() == 0 ||
!ds1->VariablesAreTheSame(ds);
}
lastUsedSpec = spec;
avtDataSpecification_p newds;
// We need to test if any of the primary or secondary variables are
......@@ -217,7 +230,10 @@ avtExpressionEvaluatorFilter::PerformRestriction(
// parsed expression into a list of filters. These filters are hooked
// together, then put on a list in pipelineState for use in Execute().
debug5 << "EEF::PerformRestriction: Checking candidates" << endl;
pipelineState.SetDataObject(NULL);
if (createFilters)
pipelineState.SetDataObject(NULL);
int num_recursive_checks = 0;
while (!candidates.empty())
{
......@@ -278,12 +294,12 @@ avtExpressionEvaluatorFilter::PerformRestriction(
}
// Take the list of expressions and make the filters for them.
while (!expr_list.empty())
while (createFilters && !expr_list.empty())
{
std::vector<string>::iterator back = expr_list.end() - 1;
string var = *back;
expr_list.erase(back);
// Get the expression tree again. (We could save trees between the
// first and second sections of the code. It wouldn't save much
// time, but would be cleaner.)
......@@ -371,17 +387,17 @@ avtExpressionEvaluatorFilter::PerformRestriction(
// Programmer: Hank Childs
// Creation: November 17, 2003
//
// Modifications:
// Kathleen Bonnell, Thu Apr 22 14:42:38 PDT 2004
// Moved code to new pipelineState method.
//
// ****************************************************************************
void
avtExpressionEvaluatorFilter::ReleaseData(void)
{
avtDatasetToDatasetFilter::ReleaseData();
vector<avtExpressionFilter *> &filters = pipelineState.GetFilters();
for (int i = 0 ; i < filters.size() ; i++)
{
filters[i]->ReleaseData();
}
pipelineState.ReleaseData();
}
// ****************************************************************************
......@@ -630,3 +646,4 @@ avtExpressionEvaluatorFilter::GetDomainName(const std::string &var, const int ts
{
GetInput()->GetQueryableSource()->GetDomainName(var, ts, dom, domName);
}
......@@ -791,6 +791,48 @@ avtDataSpecification::NoGhostZones(void)
}
// ****************************************************************************
// Method: avtDataSpecification::VariablesAreTheSame
//
// Purpose:
// This compares variables with the passed object.
//
// Programmer: Kathleen Bonnell
// Creation: April 22, 2004
//
// ****************************************************************************
bool
avtDataSpecification::VariablesAreTheSame(const avtDataSpecification &ds)
{
//
// Assumption here that we don't have NULL pointers.
//
if (strcmp(variable, ds.variable) != 0)
{
return false;
}
if (strcmp(db_variable, ds.db_variable) != 0)
{
return false;
}
if (secondaryVariables.size() != ds.secondaryVariables.size())
{
return false;
}
for (int i = 0 ; i < secondaryVariables.size() ; i++)
{
const char *my_str = *(secondaryVariables[i]);
const char *his_str = *(ds.secondaryVariables[i]);
if (strcmp(my_str, his_str) != 0)
{
return false;
}
}
return true;
}
// ****************************************************************************
// Method: avtSILSpecification::GetDomainList
//
......
......@@ -92,6 +92,9 @@ typedef ref_ptr<avtDataSpecification> avtDataSpecification_p;
// Hank Childs, Thu Sep 25 08:28:28 PDT 2003
// Allow the setting of a "db" variable.
//
// Kathleen Bonnell, Thu Apr 22 15:15:57 PDT 2004
// Added method 'VariablesAreTheSame'.
//
// ****************************************************************************
class PIPELINE_API avtDataSpecification
......@@ -207,6 +210,9 @@ class PIPELINE_API avtDataSpecification
void SetUseNewMIRAlgorithm(bool unma)
{ useNewMIRAlgorithm = unma; }
bool VariablesAreTheSame(const avtDataSpecification &);
protected:
int timestep;
char *variable;
......
......@@ -253,96 +253,3 @@ avtQueryFactory::CreateQuery(const QueryAttributes *qa)
}
// ****************************************************************************
// Method: avtQueryFactory::CreateTimeQuery
//
// Purpose:
// Return a pointer to a query instance, based on passed QueryAtts.
//
// Arguments:
// qa The QueryAttributes which specify the type of query to create.
//
// Returns: A pointer to an avtDataObjectQuery which can be performed
// over time.
//
// Programmer: Kathleen Bonnell
// Creation: March 30, 2004
//
// Modifications:
//
// Hank Childs, Wed Apr 14 07:48:12 PDT 2004
// Allow for surface area to have multiple aliases.
//
// ****************************************************************************
avtDataObjectQuery *
avtQueryFactory::CreateTimeQuery(const QueryAttributes *qa)
{
string qname = qa->GetName();
bool actualData = qa->GetDataType() == QueryAttributes::ActualData;
avtDataObjectQuery *query = NULL;
if (qname == "Surface area" || qname == "2D area" ||
qname == "3D surface area")
{
query = new avtTotalSurfaceAreaQuery();
}
else if (qname == "Volume")
{
query = new avtTotalVolumeQuery();
}
else if (qname == "Revolved volume")
{
query = new avtTotalRevolvedVolumeQuery();
}
else if (qname == "Revolved surface area")
{
query = new avtTotalRevolvedSurfaceAreaQuery();
}
else if (qname == "Variable Sum")
{
query = new avtVariableSummationQuery();
}
else if (qname == "Weighted Variable Sum")
{
query = new avtWeightedVariableSummationQuery();
}
else if (qname == "Min")
{
if (actualData)
{
query = new avtActualDataMinMaxQuery(true, false);
}
else
{
query = new avtOriginalDataMinMaxQuery(true, false);
}
}
else if (qname == "Max")
{
if (actualData)
{
query = new avtActualDataMinMaxQuery(false, true);
}
else
{
query = new avtOriginalDataMinMaxQuery(false, true);
}
}
else if (qname == "Variable by Zone")
{
query = new avtVariableQuery();
}
else if (qname == "Variable by Node")
{
query = new avtVariableQuery();
}
//
// There are a lot of queries that would not get instantiaed
// here -- (non-time-queries) -- so don't check
// for NULL, allow caller to do that.
//
return query;
}
......@@ -30,7 +30,6 @@ class QUERY_API avtQueryFactory
static avtQueryFactory *Instance();
avtDataObjectQuery *CreateQuery(const QueryAttributes *);
avtDataObjectQuery *CreateTimeQuery(const QueryAttributes *);
private:
avtQueryFactory();
......
......@@ -121,7 +121,7 @@ avtQueryOverTimeFilter::Execute(void)
{
QueryAttributes qatts = atts.GetQueryAtts();
avtDataObjectQuery *query = avtQueryFactory::Instance()->
CreateTimeQuery(&qatts);
CreateQuery(&qatts);
query->SetTimeVarying(true);
query->SetInput(GetInput());
......
......@@ -2432,6 +2432,10 @@ VisWindow::Render(void)
// Added call to Render after call to FullFrameOn in 2d, to ensure that
// the changes shows up immediately on the screen.
//
// Kathleen Bonnell, Tue Apr 27 13:29:46 PDT 2004
// Added call to Render after call to FullFrameOn in Curve mode, to ensure
// that the changes show up immediately on the screen.
//
// ****************************************************************************
void
......@@ -2488,6 +2492,7 @@ VisWindow::UpdateView()
FullFrameOff();
FullFrameOn(viewCurve.GetScaleFactor(size), 1);
Render();
}
}
......
......@@ -1014,6 +1014,9 @@ PP_ZFileReader::AddRayMetaData(avtDatabaseMetaData *md)
// Creation: Wed Jul 16 16:11:08 PST 2003
//
// Modifications:
// Kathleen Bonnell, Tue Apr 27 13:29:46 PDT 2004
// For avtRealDims array, size should not be larger (but can be smaller)
// than the Dimensions of the vtkRectilinearGrid or vtkStructuredGrid.
//
// ****************************************************************************
......@@ -1051,9 +1054,9 @@ PP_ZFileReader::CreateGhostZones(const int *ireg, vtkDataSet *ds)
realDims->SetName("avtRealDims");
realDims->Allocate(6);
realDims->SetValue(0, 0);
realDims->SetValue(1, kmax);
realDims->SetValue(1, kmax-1);
realDims->SetValue(2, 0);
realDims->SetValue(3, lmax);
realDims->SetValue(3, lmax-1);
realDims->SetValue(4, 0);
realDims->SetValue(5, 0);
ds->GetFieldData()->AddArray(realDims);
......
......@@ -2175,10 +2175,13 @@ NetworkManager::CloneNetwork(const int id)
// Added arge 'clonedFromId' so that 'Actual Data' queries get the correct
// input.
//
// Kathleen Bonnell, Tue Apr 27 13:41:32 PDT 2004
// Pass the cloned network's pipeline index to query atts.
//
// ****************************************************************************
void
NetworkManager::AddQueryOverTimeFilter(const QueryOverTimeAttributes *qA,
NetworkManager::AddQueryOverTimeFilter(QueryOverTimeAttributes *qA,
const int clonedFromId)
{
if (workingNet == NULL)
......@@ -2199,6 +2202,8 @@ NetworkManager::AddQueryOverTimeFilter(const QueryOverTimeAttributes *qA,
{
input = networkCache[clonedFromId]->GetPlot()->GetIntermediateDataObject();
}
qA->GetQueryAtts().SetPipeIndex(networkCache[clonedFromId]->
GetPipelineSpec()->GetPipelineIndex());
//
// Pass down the current SILRestriction (via UseSet) in case the query
......
......@@ -207,7 +207,7 @@ class NetworkManager
void DumpRenders(void) { dumpRenders = true; };
void CloneNetwork(const int id);
void AddQueryOverTimeFilter(const QueryOverTimeAttributes *,
void AddQueryOverTimeFilter(QueryOverTimeAttributes *,
const int clonedFromId);
private:
......
......@@ -104,6 +104,9 @@ QvisQueryWindow::~QvisQueryWindow()
// Kathleen Bonnell, Thu Apr 1 18:46:55 PST 2004
// Added TimeQuery push button.
//
// Kathleen Bonnell, Thu Apr 22 15:31:24 PDT 2004
// Made the default for dataOpts be 'actual data'.
//
// ****************************************************************************
void
......@@ -157,7 +160,7 @@ QvisQueryWindow::CreateWindowContents()
sLayout->addWidget(origData, 5, 0);
QRadioButton *actualData = new QRadioButton("Actual Data", argPanel, "actualData");
dataOpts->insert(actualData);
dataOpts->setButton(0);
dataOpts->setButton(1);
sLayout->addWidget(actualData, 6, 0);
// Add the time button to the argument panel.
......@@ -451,6 +454,9 @@ QvisQueryWindow::UpdateResults(bool)
// Kathleen Bonnell, Thu Apr 1 18:46:55 PST 2004
// Added code to handle new time query capabilities.
//
// Kathleen Bonnell, Thu Apr 22 15:31:24 PDT 2004
// Made the default for dataOpts be 'actual data'.
//
// ****************************************************************************
void
......@@ -461,7 +467,7 @@ QvisQueryWindow::UpdateArgumentPanel(int index)
const intVector &timeQuery = queries->GetTimeQuery();
// reset a few defaults
dataOpts->setButton(0);
dataOpts->setButton(1);
if(index < winType.size())
{
......@@ -690,6 +696,9 @@ QvisQueryWindow::ConnectPlotList(PlotList *pl)
// Kathleen Bonnell, Thu Apr 1 18:46:55 PST 2004
// Added doTime arge to viewer query calls.
//
// Kathleen Bonnell, Thu Apr 22 15:31:24 PDT 2004
// Added useActualData to basic DatabaseQuery call.
//
// ****************************************************************************
void
......@@ -698,11 +707,11 @@ QvisQueryWindow::Apply(bool ignore, bool doTime)
if(AutoUpdate() || ignore)
{
int index = queryList->currentItem();
int useActualData = dataOpts->id(dataOpts->selected());
const stringVector &names = queries->GetNames();
const intVector &types = queries->GetTypes();
const intVector &rep = queries->GetCoordRep();
const intVector &winType = queries->GetWinType();
const intVector &timeQuery = queries->GetTimeQuery();
if(index >= 0 && index < types.size())
{
QueryList::QueryType t = (QueryList::QueryType)types[index];
......@@ -722,7 +731,7 @@ QvisQueryWindow::Apply(bool ignore, bool doTime)
{
if (t == QueryList::DatabaseQuery)
{
viewer->DatabaseQuery(names[index], vars, doTime);
viewer->DatabaseQuery(names[index], vars, doTime, useActualData);
}
else
{
......@@ -828,7 +837,6 @@ QvisQueryWindow::Apply(bool ignore, bool doTime)
{
if(!GetVars(0, vars))
noErrors = false;
int useActualData = dataOpts->id(dataOpts->selected());
if (noErrors)
{
if (t == QueryList::DatabaseQuery)
......
This diff is collapsed.
......@@ -9,6 +9,7 @@ class QCheckBox;
class QLabel;
class QRadioButton;
class QSlider;
class QSpinBox;
class RenderingAttributes;
class WindowInformation;
class QvisOpacitySlider;
......@@ -35,6 +36,9 @@ class QvisOpacitySlider;
// Jeremy Meredith, Fri Nov 14 16:03:31 PST 2003
// Added specular lighting.
//
// Mark C. Miller, Tue Apr 27 14:41:35 PDT 2004
// Added stuff to deal with adjusting scalable threshold with a spinbox
//
// ****************************************************************************
class GUI_API QvisRenderingWindow : public QvisPostableWindowSimpleObserver
......@@ -64,7 +68,8 @@ private slots:
void stereoToggled(bool);
void stereoTypeChanged(int);
void renderNotifyToggled(bool);
void scalableThresholdChanged(int);
void scalrenActivationModeChanged(int);
void scalrenAutoThresholdChanged(int val);
void specularToggled(bool);
void specularStrengthChanged(int, const void*);
void specularPowerChanged(int, const void*);
......@@ -82,10 +87,12 @@ private:
QRadioButton *interlace;
QRadioButton *crystalEyes;
QCheckBox *renderNotifyToggle;
QButtonGroup *scalableThreshold;
QButtonGroup *scalrenActivationMode;
QRadioButton *scalrenAuto;
QRadioButton *scalrenAlways;
QRadioButton *scalrenNever;
QLabel *scalrenGeometryLabel;
QSpinBox *scalrenAutoThreshold;
QCheckBox *specularToggle;
QLabel *specularStrengthLabel;
QvisOpacitySlider *specularStrengthSlider;
......
......@@ -1456,6 +1456,9 @@ ViewerEngineManager::ExternalRender(vector<const char*> pluginIDsList,
// Mark C. Miller, Wed Apr 14 16:41:32 PDT 2004
// Added code to pass extents type string to SetWinAnnotAtts
//
// Mark C. Miller, Tue Apr 27 14:41:35 PDT 2004
// Added code to pass ViewerSubject callbacks in Execute calls
//
// ****************************************************************************
avtDataObjectReader_p
......@@ -1565,7 +1568,9 @@ ViewerEngineManager::GetDataObjectReader(ViewerPlot *const plot)
// ask for the engine's output as null data 'cause the
// avtDataObject in the current reader is just the message that
//it exceeded threshold
retval = engine->Execute(true, 0, 0);
retval = engine->Execute(true,
ViewerSubject::ProcessEventsCB,
(void *)viewerSubject);
// now, tell viewer to go into SR mode
w->SendScalableRenderingModeChangeMessage(true);
......
......@@ -5314,6 +5314,10 @@ PthreadAttrInit(pthread_attr_t *attr)
// Mark C. Miller, Tue Apr 20 07:44:34 PDT 2004
// Added code to issue warning message if a created actor has no data
//
// Mark C. Miller, Tue Apr 27 14:41:35 PDT 2004
// Added additional check for IsChangingScalableRenderingMode when
// issuing no data warning
//
// ****************************************************************************
void *
......@@ -5336,7 +5340,8 @@ CreatePlot(void *info)
turningOffScalableRendering,
actorHasNoData);
if (actorHasNoData && !plotInfo->window->GetScalableRendering())
if (actorHasNoData && !plotInfo->window->GetScalableRendering() &&
!plotInfo->window->IsChangingScalableRenderingMode(true))
{
char message[256];
SNPRINTF(message, sizeof(message),
......
......@@ -176,6 +176,9 @@ static void RotateAroundY(const avtView3D&, double, avtView3D&);
// Eric Brugger, Mon Mar 29 15:34:50 PST 2004
// I added maintainData.
//
// Mark C. Miller, Tue Apr 27 14:41:35 PDT 2004
// Removed preparingToChangeScalableRenderingMode
//
// ****************************************************************************
ViewerWindow::ViewerWindow(int windowIndex)
......@@ -218,7 +221,6 @@ ViewerWindow::ViewerWindow(int windowIndex)
toolsLocked = false;
windowId = windowIndex;
isVisible = false;
preparingToChangeScalableRenderingMode = false;
isChangingScalableRenderingMode = false;
targetScalableRenderingMode = false;
......@@ -5770,6 +5772,10 @@ ViewerWindow::GetNotifyForEachRender() const
// viewer classes so the frame does not have to be passed around all over
// the place.
//
// Mark C. Miller