Commit 9a39ae23 authored by pugmire's avatar pugmire

This provides an option to improve performance for datasets with a lot of...

This provides an option to improve performance for datasets with a lot of domains, located in Options/Rendering/Advanced  "Compact domains on engine".
It has three settings, Never, Always and Auto, with threshold.
The base problem is a performance issue in how vtkRenderer handles the list of vtkActors. 
For the particular case I was looking at, with 25000 domains, when not in SR mode, there was around a 25 second delay in the viewer while vtkActors were allocated and de-allocated.  This option allows control over how domains on the engine are appended together to reduce the number of actors created. The downside, of course, is that the memory footprint increases because the engine output geometry is appended together into unstructured meshes.
 The default is to never do any appending.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12282 18c085ea-50e0-402c-830e-de6fd14e8384
parent 752436fa
......@@ -850,6 +850,9 @@ avtDatasetFileWriter::CreateFilename(const char *base, bool family,
// no longer call 'GetInputs' on vtkAppendFillter, must get individual port
// info, then the dataset from the info.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domain options.
//
// ****************************************************************************
vtkDataSet *
......@@ -861,10 +864,12 @@ avtDatasetFileWriter::GetSingleDataset(void)
{
vtkAppendFilter *af;
vtkAppendPolyData *pf;
bool compactAllGrids;
} pmap;
pmap.af = vtkAppendFilter::New(); // Just in case...
pmap.pf = vtkAppendPolyData::New();
pmap.compactAllGrids = false;
if (*dt != NULL)
{
......
......@@ -80,6 +80,9 @@
// Hank Childs, Thu Sep 22 17:02:47 PDT 2005
// Initialize tolerance.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domain options.
//
// ****************************************************************************
avtCompactTreeFilter::avtCompactTreeFilter()
......@@ -88,6 +91,8 @@ avtCompactTreeFilter::avtCompactTreeFilter()
createCleanPolyData = false;
tolerance = 0;
parallelMerge = false;
compactDomainMode = Never;
compactDomainThreshold = 0;
}
// ****************************************************************************
......@@ -151,6 +156,9 @@ avtCompactTreeFilter::avtCompactTreeFilter()
// are streaming, not about whether we are doing dynamic load balancing.
// And the two are no longer synonymous.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domain options.
//
// ****************************************************************************
void
......@@ -242,6 +250,7 @@ avtCompactTreeFilter::Execute(void)
{
vtkAppendFilter *filter;
vtkAppendPolyData *polyFilter;
bool compactAllGrids;
} *pmap;
pmap = new struct map;
......@@ -260,6 +269,13 @@ avtCompactTreeFilter::Execute(void)
}
pmap->filter = vtkAppendFilter::New();
pmap->polyFilter = vtkAppendPolyData::New();
pmap->compactAllGrids = false;
#if PARALLEL
if (compactDomainMode == Always || (compactDomainMode == Auto && nleaves >= compactDomainThreshold))
pmap->compactAllGrids = true;
#endif
inTree->Traverse(CAddInputToAppendFilter, pmap, dummy);
vtkDataSet *ds;
int nPolyInput = pmap->polyFilter->GetTotalNumberOfInputConnections();
......@@ -363,6 +379,13 @@ avtCompactTreeFilter::Execute(void)
polyFilters[i] = vtkAppendPolyData::New();
pmap->filter = filters[i];
pmap->polyFilter = polyFilters[i];
pmap->compactAllGrids = false;
#if PARALLEL
if (compactDomainMode == Always || (compactDomainMode == Auto && child->GetNChildren() >= compactDomainThreshold))
pmap->compactAllGrids = true;
#endif
child->Traverse(CAddInputToAppendFilter, pmap, dummy);
if (filters[i]->GetTotalNumberOfInputConnections() > 1)
{
......
......@@ -82,11 +82,21 @@
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domain options.
//
// ****************************************************************************
class PIPELINE_API avtCompactTreeFilter : public avtDatasetToDatasetFilter
{
public:
enum CompactDomainsMode
{
Never = 0,
Always = 1,
Auto = 2
};
avtCompactTreeFilter();
virtual ~avtCompactTreeFilter(){};
......@@ -105,12 +115,17 @@ class PIPELINE_API avtCompactTreeFilter : public avtDatasetToDatasetFilter
{ tolerance = d; };
void SetParallelMerge(bool p) { parallelMerge = p; };
void SetCompactDomainsMode(CompactDomainsMode mode, int threshold=-1)
{ compactDomainMode = mode; compactDomainThreshold = threshold; }
protected:
virtual void Execute(void);
bool executionDependsOnDLB;
bool parallelMerge;
bool createCleanPolyData;
double tolerance;
CompactDomainsMode compactDomainMode;
int compactDomainThreshold;
virtual bool FilterUnderstandsTransformedRectMesh();
};
......
......@@ -636,6 +636,9 @@ CUpdateData(avtDataRepresentation &data, void *, bool &modified)
// Remove call to SetSource(NULL) as it now removes information necessary
// to the dataset.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add option to include appending all meshes.
//
// ****************************************************************************
void
......@@ -660,6 +663,7 @@ CAddInputToAppendFilter(avtDataRepresentation & data, void *arg, bool &)
{
vtkAppendFilter *af;
vtkAppendPolyData *pf;
bool compactAllGrids;
} *pmap;
pmap = (struct map *) arg;
......@@ -671,11 +675,12 @@ CAddInputToAppendFilter(avtDataRepresentation & data, void *arg, bool &)
// We only want to use the append filters on poly data or
// unstructured grid data.
//
if (ds->GetDataObjectType() == VTK_POLY_DATA)
{
pmap->pf->AddInput((vtkPolyData*)ds);
}
else if (ds->GetDataObjectType() == VTK_UNSTRUCTURED_GRID)
else if (pmap->compactAllGrids || ds->GetDataObjectType() == VTK_UNSTRUCTURED_GRID)
{
pmap->af->AddInput(ds);
}
......
......@@ -60,6 +60,7 @@
#include <avtOriginatingSource.h>
#include <avtVertexNormalsFilter.h>
#include <avtSmoothPolyDataFilter.h>
#include <RenderingAttributes.h>
#include <vtkPolyData.h>
#include <vtkDataSet.h>
......@@ -130,6 +131,9 @@
// Added logMeshFilter, xScaleMode, yScaleMode, havePerformedLogX,
// havePerformedLogY.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domains options.
//
// ****************************************************************************
avtPlot::avtPlot()
......@@ -485,6 +489,9 @@ avtPlot::Execute(avtDataObject_p input, avtContract_p contract,
// Calculate the current extents, even for plots that don't
// "UtilizeRenderingFilters".
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domains options.
//
// ****************************************************************************
avtDataObjectWriter_p
......@@ -513,8 +520,9 @@ avtPlot::Execute(avtDataObject_p input, avtContract_p contract,
if (UtilizeRenderingFilters() &&
strcmp(dob->GetType(), "avtDataset") == 0)
{
RenderingAttributes renderAtts = atts->GetRenderAtts();
dob = ReduceGeometry(dob);
dob = CompactTree(dob);
dob = CompactTree(dob, renderAtts);
}
dob = SetCurrentExtents(dob);
......@@ -1038,11 +1046,22 @@ avtPlot::ReduceGeometry(avtDataObject_p curDS)
// Kathleen Bonnell, Fri Oct 12 11:38:41 PDT 2001
// Set flag specifiying that execution depends on DLB.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domains options.
//
// ****************************************************************************
avtDataObject_p
avtPlot::CompactTree(avtDataObject_p curDS)
avtPlot::CompactTree(avtDataObject_p curDS, const RenderingAttributes &renderAtts)
{
if (renderAtts.GetCompactDomainsActivationMode() == RenderingAttributes::Auto)
compactTreeFilter->SetCompactDomainsMode(avtCompactTreeFilter::Auto,
renderAtts.GetCompactDomainsAutoThreshold());
else if (renderAtts.GetCompactDomainsActivationMode() == RenderingAttributes::Never)
compactTreeFilter->SetCompactDomainsMode(avtCompactTreeFilter::Never);
else if (renderAtts.GetCompactDomainsActivationMode() == RenderingAttributes::Always)
compactTreeFilter->SetCompactDomainsMode(avtCompactTreeFilter::Always);
avtDataObject_p rv = curDS;
compactTreeFilter->SetInput(rv);
((avtCompactTreeFilter*)compactTreeFilter)->DLBDependentExecutionON();
......
......@@ -63,6 +63,7 @@
class avtCondenseDatasetFilter;
class avtDatasetToDatasetFilter;
class avtCompactTreeFilter;
class avtSmoothPolyDataFilter;
class avtVertexNormalsFilter;
class avtMeshLogFilter;
......@@ -70,6 +71,7 @@ class AttributeGroup;
class AttributeSubject;
class PlotInfoAttributes;
class WindowAttributes;
class RenderingAttributes;
// ****************************************************************************
// Class: avtPlot
......@@ -345,7 +347,7 @@ class PLOTTER_API avtPlot
avtDrawer *drawer;
avtCondenseDatasetFilter *condenseDatasetFilter;
avtDatasetToDatasetFilter *ghostZoneAndFacelistFilter;
avtDatasetToDatasetFilter *compactTreeFilter;
avtCompactTreeFilter *compactTreeFilter;
avtDatasetToDatasetFilter *currentExtentFilter;
avtMeshLogFilter *logMeshFilter;
avtVertexNormalsFilter *vertexNormalsFilter;
......@@ -372,7 +374,7 @@ class PLOTTER_API avtPlot
virtual int TargetTopologicalDimension(void) = 0;
virtual avtDataObject_p ReduceGeometry(avtDataObject_p);
virtual avtDataObject_p CompactTree(avtDataObject_p);
virtual avtDataObject_p CompactTree(avtDataObject_p, const RenderingAttributes &);
virtual avtDataObject_p SetCurrentExtents(avtDataObject_p);
avtDataObject_p SetScaleMode(avtDataObject_p,
ScaleMode, ScaleMode,
......
......@@ -136,6 +136,9 @@ bool VisWinRendering::stereoEnabled = false;
// Brad Whitlock, Mon Sep 18 11:07:54 PDT 2006
// Added colorTexturingFlag.
//
// Dave Pugmire, Tue Aug 24 11:28:02 EDT 2010
// Added compact domains mode.
//
// ****************************************************************************
VisWinRendering::VisWinRendering(VisWindowColleagueProxy &p)
......@@ -167,6 +170,9 @@ VisWinRendering::VisWinRendering(VisWindowColleagueProxy &p)
scalableRendering = false;
scalableAutoThreshold = RenderingAttributes::DEFAULT_SCALABLE_AUTO_THRESHOLD;
scalableActivationMode = RenderingAttributes::DEFAULT_SCALABLE_ACTIVATION_MODE;
compactDomainsAutoThreshold = RenderingAttributes:: DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD;
compactDomainsActivationMode = RenderingAttributes::DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE;
canvas = vtkRenderer::New();
canvas->SetInteractive(1);
......@@ -2064,3 +2070,41 @@ VisWinRendering::SetScalableActivationMode(int mode)
scalableActivationMode = mode;
return oldVal;
}
// ****************************************************************************
// Method: VisWinRendering::SetCompactDomainsActivationMode
//
// Purpose: Set compact domains activation.
//
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
int
VisWinRendering::SetCompactDomainsActivationMode(int mode)
{
int oldMode = compactDomainsActivationMode;
compactDomainsActivationMode = mode;
return oldMode;
}
// ****************************************************************************
// Method: VisWinRendering::SetCompactDomainsAutoThreshold
//
// Purpose: Set compact domains threshold.
//
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
int
VisWinRendering::SetCompactDomainsAutoThreshold(int val)
{
int oldVal = compactDomainsAutoThreshold;
compactDomainsAutoThreshold = val;
return oldVal;
}
......@@ -201,6 +201,9 @@ class VisWindowColleagueProxy;
// Eric Brugger, Tue Dec 9 14:28:15 PST 2008
// Added the AxisParallel window mode.
//
// Dave Pugmire, Tue Aug 24 11:29:43 EDT 2010
// Add compact domains options.
//
// ****************************************************************************
class VISWINDOW_API VisWinRendering : public VisWinColleague
......@@ -323,6 +326,12 @@ class VISWINDOW_API VisWinRendering : public VisWinColleague
int SetScalableAutoThreshold(int threshold);
int GetScalableAutoThreshold() const
{ return scalableAutoThreshold; };
int GetCompactDomainsActivationMode() const
{ return compactDomainsActivationMode; }
int SetCompactDomainsActivationMode(int mode);
int GetCompactDomainsAutoThreshold() const
{ return compactDomainsAutoThreshold; }
int SetCompactDomainsAutoThreshold(int val);
virtual void *CreateToolbar(const char *) { return 0; };
virtual void SetLargeIcons(bool) { };
......@@ -364,6 +373,10 @@ class VISWINDOW_API VisWinRendering : public VisWinColleague
int scalableActivationMode;
int scalableAutoThreshold;
// Compact domains options.
int compactDomainsActivationMode;
int compactDomainsAutoThreshold;
void InitializeRenderWindow(vtkRenderWindow *);
void ResetCounters();
......
......@@ -5994,6 +5994,72 @@ VisWindow::GetScalableAutoThreshold() const
return rendering->GetScalableAutoThreshold();
}
// ****************************************************************************
// Method: VisWindow::SetCompactDomainsActivationMode
//
// Purpose: Get/Set compact domains options.
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
void
VisWindow::SetCompactDomainsActivationMode(int mode)
{
rendering->SetCompactDomainsActivationMode(mode);
}
// ****************************************************************************
// Method: VisWindow::GetCompactDomainsActivationMode
//
// Purpose: Get/Set compact domains options.
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
int
VisWindow::GetCompactDomainsActivationMode() const
{
return rendering->GetCompactDomainsActivationMode();
}
// ****************************************************************************
// Method: VisWindow::SetCompactDomainsAutoThreshold
//
// Purpose: Get/Set compact domains options.
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
void
VisWindow::SetCompactDomainsAutoThreshold(int val)
{
rendering->SetCompactDomainsAutoThreshold(val);
}
// ****************************************************************************
// Method: VisWindow::GetCompactDomainsAutoThreshold
//
// Purpose: Get/Set compact domains options.
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
int
VisWindow::GetCompactDomainsAutoThreshold() const
{
return rendering->GetCompactDomainsAutoThreshold();
}
// ****************************************************************************
// Method: VisWindow::CreateToolbar
//
......
......@@ -419,6 +419,9 @@ class VisitInteractor;
// Jeremy Meredith, Wed May 19 14:15:58 EDT 2010
// Support 3D axis scaling (3D equivalent of full-frame mode).
//
// Dave Pugmire, Tue Aug 24 11:29:43 EDT 2010
// Add compact domains options.
//
// ****************************************************************************
class VISWINDOW_API VisWindow
......@@ -625,6 +628,11 @@ public:
bool GetScalableRendering() const;
void SetScalableRendering(bool mode);
int GetScalableThreshold() const;
void SetCompactDomainsActivationMode(int mode);
int GetCompactDomainsActivationMode() const;
void SetCompactDomainsAutoThreshold(int val);
int GetCompactDomainsAutoThreshold() const;
void SetSpecularProperties(bool,double,double,
const ColorAttribute&);
bool GetSpecularFlag();
......
This diff is collapsed.
......@@ -6,7 +6,7 @@ Definition: const int RenderingAttributes::DEFAULT_SCALABLE_AUTO_THRESHOLD = 200
Target: xml2java
Constant: DEFAULT_SCALABLE_AUTO_THRESHOLD
Declaration: DEFAULT_SCALABLE_AUTO_THRESHOLD
Definition: public final static int DEFAULT_SCALABLE_AUTO_THRESHOLD = 2000000;
Definition: public final static int DEFAULT_SCALABLE_AUTO_THRESHOLD = 2000000;
Target: xml2atts
......@@ -18,7 +18,32 @@ Definition: const int RenderingAttributes::DEFAULT_SCALABLE_ACTIVATION_MODE = Au
Target: xml2java
Constant: DEFAULT_SCALABLE_ACTIVATION_MODE
Declaration: DEFAULT_SCALABLE_ACTIVATION_MODE
Definition: public final static int DEFAULT_SCALABLE_ACTIVATION_MODE = TRISTATEMODE_AUTO;
Definition: public final static int DEFAULT_SCALABLE_ACTIVATION_MODE = TRISTATEMODE_AUTO;
Target: xml2atts
Constant: DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE
Declaration: static const int DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE;
Definition: const int RenderingAttributes::DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE = Auto;
Target: xml2java
Constant: DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE
Declaration: static const int DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE;
Definition: public final static int DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE = TRISTATEMODE_AUTO;
Target: xml2atts
Constant: DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD
Declaration: static const int DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD;
Definition: const int RenderingAttributes::DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD = 256;
Target: xml2java
Constant: DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD
Declaration: static const int DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD;
Definition: public final static int DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD = 256;
Target: xml2atts
Function: GetEffectiveScalableThreshold
......@@ -36,3 +61,18 @@ int RenderingAttributes::GetEffectiveScalableThreshold(TriStateMode mode, int au
return -1;
}
Function: GetEffectiveCompactDomainsThreshold
Declaration: static int GetEffectiveCompactDomainsThreshold(TriStateMode mode, int autoThreshold);
Definition:
int RenderingAttributes::GetEffectiveCompactDomainsThreshold(TriStateMode mode, int autoThreshold)
{
if (mode == Never)
return INT_MAX;
else if (mode == Always)
return 0;
else if (mode == Auto)
return autoThreshold;
else
return -1;
}
......@@ -84,6 +84,8 @@ public:
};
static const int DEFAULT_SCALABLE_AUTO_THRESHOLD;
static const int DEFAULT_SCALABLE_ACTIVATION_MODE;
static const int DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE;
static const int DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD;
// These constructors are for objects of this class
RenderingAttributes();
......@@ -135,6 +137,8 @@ public:
void SetEndCuePoint(const double *endCuePoint_);
void SetCompressionActivationMode(TriStateMode compressionActivationMode_);
void SetColorTexturingFlag(bool colorTexturingFlag_);
void SetCompactDomainsActivationMode(TriStateMode compactDomainsActivationMode_);
void SetCompactDomainsAutoThreshold(int compactDomainsAutoThreshold_);
// Property getting methods
bool GetAntialiasing() const;
......@@ -160,6 +164,8 @@ public:
double *GetEndCuePoint();
TriStateMode GetCompressionActivationMode() const;
bool GetColorTexturingFlag() const;
TriStateMode GetCompactDomainsActivationMode() const;
int GetCompactDomainsAutoThreshold() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -190,6 +196,7 @@ public:
// User-defined methods
static int GetEffectiveScalableThreshold(TriStateMode mode, int autoThreshold);
static int GetEffectiveCompactDomainsThreshold(TriStateMode mode, int autoThreshold);
// IDs that can be used to identify fields in case statements
enum {
......@@ -213,6 +220,8 @@ public:
ID_endCuePoint,
ID_compressionActivationMode,
ID_colorTexturingFlag,
ID_compactDomainsActivationMode,
ID_compactDomainsAutoThreshold,
ID__LAST
};
......@@ -237,11 +246,13 @@ private:
double endCuePoint[3];
int compressionActivationMode;
bool colorTexturingFlag;
int compactDomainsActivationMode;
int compactDomainsAutoThreshold;
// Static class format string for type map.
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define RENDERINGATTRIBUTES_TMFS "biibibiibffabdbbDDib"
#define RENDERINGATTRIBUTES_TMFS "biibibiibffabdbbDDibii"
#endif
......@@ -83,14 +83,26 @@
<Field name="colorTexturingFlag" label="colorTexturingFlag" type="bool">
true
</Field>
<Field name="compactDomainsActivationMode" label="compactDomainsActivationMode" type="enum" subtype="TriStateMode">
Never
</Field>
<Field name="compactDomainsAutoThreshold" label="compactDomainsAutoThreshold" type="int">
256
</Field>
<Function name="GetEffectiveScalableThreshold" user="true" member="true">
</Function>
<Function name="GetEffectiveCompactDomainsThreshold" user="true" member="true">
</Function>
<Constant name="DEFAULT_SCALABLE_AUTO_THRESHOLD" member="true">
</Constant>
<Constant name="DEFAULT_SCALABLE_ACTIVATION_MODE" member="true">
</Constant>
<Constant name="DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE" member="true">
</Constant>
<Constant name="DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD" member="true">
</Constant>
<Include file="source" quoted="false">
climits
climits
</Include>
<Include file="header" quoted="false">
float.h
......
......@@ -38,8 +38,8 @@ VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.6.4/${VISITARCH})
##
VISIT_OPTION_DEFAULT(VISIT_C_COMPILER gcc)
VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER g++)
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS " -m64 -fPIC -fvisibility=hidden")
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS " -m64 -fPIC -fvisibility=hidden")
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS " -g -m64 -fPIC -fvisibility=hidden")
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS " -g -m64 -fPIC -fvisibility=hidden")
## Parallel Build Setup.
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON)
......@@ -138,4 +138,4 @@ VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP
##
## Adios
##
#VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR /apps/adios)
\ No newline at end of file
VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR ${VISITHOME}/adios/1.2/${VISITARCH})
\ No newline at end of file
......@@ -1651,6 +1651,48 @@ NetworkManager::GetScalableThreshold(int windowID) const
int t = RenderingAttributes::GetEffectiveScalableThreshold(
scalableActivationMode,
scalableAutoThreshold);
return t;
}
// ****************************************************************************
// Method: NetworkManager::GetCompactDomainsThreshold
//
// Purpose: Get/Set compact domains options.
//
//
// Programmer: Dave Pugmire
// Creation: August 24, 2010
//
// ****************************************************************************
int
NetworkManager::GetCompactDomainsThreshold(int windowId) const
{
int compactDomainsAutoThreshold = RenderingAttributes::DEFAULT_COMPACT_DOMAINS_AUTO_THRESHOLD;
RenderingAttributes::TriStateMode compactDomainsActivationMode =
(RenderingAttributes::TriStateMode)RenderingAttributes::DEFAULT_COMPACT_DOMAINS_ACTIVATION_MODE;
// since we're in a const method, we can't use the [] operator to index
// into the map directly becuase that operator will modify the map if the
// key is new
std::map<int, EngineVisWinInfo>::const_iterator it;
it = viswinMap.find(windowId);
if(it != viswinMap.end())
{
const EngineVisWinInfo &viswinInfo = it->second;
const WindowAttributes &windowAttributes = viswinInfo.windowAttributes;
compactDomainsAutoThreshold =
windowAttributes.GetRenderAtts().GetCompactDomainsAutoThreshold();
compactDomainsActivationMode =
windowAttributes.GetRenderAtts().GetCompactDomainsActivationMode();
}
int t = RenderingAttributes::GetEffectiveCompactDomainsThreshold(compactDomainsActivationMode,
compactDomainsAutoThreshold);
return t;
}
......
......@@ -409,6 +409,9 @@ typedef void (*ProgressCallback)(void *, const char *, const char *,int,int);
// Hank Childs, Sat Aug 21 14:35:47 PDT 2010
// Rename DDF to DataBinning.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domain options.
//
// ****************************************************************************
class ENGINE_MAIN_API NetworkManager
......@@ -471,6 +474,7 @@ class ENGINE_MAIN_API NetworkManager
int GetTotalGlobalCellCounts(int winID) const;
void SetGlobalCellCount(int netId, int cellCount);
int GetScalableThreshold(int winId) const;
int GetCompactDomainsThreshold(int winId) const;
bool GetShouldUseCompression(int winId) const;
void DoneWithNetwork(int);
......
......@@ -87,6 +87,9 @@
// Jeremy Meredith, Fri Apr 30 15:04:34 EDT 2010
// Added an automatic start/end setting capability for depth cueing.
//
// Dave Pugmire, Tue Aug 24 11:32:12 EDT 2010
// Add compact domain options.
//
// ****************************************************************************
QvisRenderingWindow::QvisRenderingWindow(const QString &caption,
......@@ -101,6 +104,7 @@ QvisRenderingWindow::QvisRenderingWindow(const QString &caption,
stereoType = 0;
scalrenActivationMode = 0;
scalrenCompressMode = 0;
compactDomainsActivationMode = 0;
}
// ****************************************************************************
......@@ -344,6 +348,38 @@ QvisRenderingWindow::CreateAdvancedPage()
advLayout->addWidget(cmp_never, row, 3);
row++;
// Create the compact domains widgets.
QLabel *compactDomainsLabel = new QLabel(tr("Compact domains on engine"), advancedOptions);
advLayout->addWidget(compactDomainsLabel, row, 0, 1, 3);
compactDomainsActivationMode = new QButtonGroup(advancedOptions);
connect(compactDomainsActivationMode, SIGNAL(buttonClicked(int)),
this, SLOT(compactDomainsActivationModeChanged(int)));
row++;
compactDomainsAuto = new QRadioButton(tr("Auto"), advancedOptions);
compactDomainsActivationMode->addButton(compactDomainsAuto, 0);
advLayout->addWidget(compactDomainsAuto, row, 1);
compactDomainsAlways = new QRadioButton(tr("Always"), advancedOptions);
compactDomainsActivationMode->addButton(compactDomainsAlways, 1);
advLayout->addWidget(compactDomainsAlways, row, 2);
compactDomainsNever = new QRadioButton(tr("Never"), advancedOptions);
compactDomainsActivationMode->addButton(compactDomainsNever, 2);
advLayout->addWidget(compactDomainsNever, row, 3);
row++;
// Create the polygon count spin box for scalable rendering threshold
compactDomainsGeometryLabel = new QLabel(tr("When domains per process exceeds"), advancedOptions);
advLayout->addWidget(compactDomainsGeometryLabel, row, 1, 1, 2);
compactDomainsAutoThreshold = new QSpinBox(advancedOptions);
compactDomainsAutoThreshold->setMinimum(0);