Commit a20b63e7 authored by camp's avatar camp

Merge VisIt threading branch -

svn+ssh://portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/camp/hp/src
to truck.

This check in adds the changes needed to thread the filters of VisIt.
I still need to port the VTK changes to the new version of VTK 6 to have everything work.
I will send out a message when I have these changes.

By default VisIt is build in serial mode. You need to build VisIt with the threading option
to have a threaded version. This can be done with the --thread option to build visit script.
Or there is a CMake flag VISIT_THREAD.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21206 18c085ea-50e0-402c-830e-de6fd14e8384
parent 84dc26f4
......@@ -618,6 +618,8 @@ ENDIF(APPLE OR WIN32)
OPTION(VISIT_USE_GLEW "Use GLEW to call GL functions." ON)
OPTION(VISIT_USE_BOOST "Use system boost library." ON)
OPTION(VISIT_THREAD "Build VisIt with thread support." OFF)
SET(VISIT_INSTALL_PROFILES_TO_HOSTS "" CACHE STRING "Install specified host profiles (no action if empty)." )
MACRO(VISIT_3RDPARTY_VAR libvar comment)
......@@ -1038,6 +1040,15 @@ ENDIF(VISIT_R_DIR)
# Configure VTK support.
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindVisItVTK.cmake)
# Enable thread build of VisIt
IF(VISIT_THREAD)
ADD_DEFINITIONS(-DVISIT_ATOMIC_USE_GCC_ATOMIC)
ADD_DEFINITIONS(-DVISIT_THREADS)
MESSAGE(STATUS "Threading for VisIt: ON")
ELSE(VISIT_THREAD)
MESSAGE(STATUS "Threading for VisIt: OFF")
ENDIF(VISIT_THREAD)
#-----------------------------------------------------------------------------
# If we are doing a static build or the VTK Python wrappers do not exist:
# Disable python filters.
......
......@@ -45,8 +45,7 @@
#include <BadIndexException.h>
#include <ImproperUseException.h>
using std::vector;
#include <avtExecutionManager.h>
avtFileDescriptorManager *avtFileDescriptorManager::instance = NULL;
......@@ -266,8 +265,12 @@ avtFileDescriptorManager::UsedFile(int index)
EXCEPTION2(BadIndexException, index, fileIsOpen.size());
}
VisitMutexLock("avtFileDescriptorManagerFileTimestamp");
fileTimestamp[index] = timestamp;
timestamp++;
VisitMutexUnlock("avtFileDescriptorManagerFileTimestamp");
}
......
......@@ -903,6 +903,8 @@ avtSourceFromDatabase::ManageExpressions(const char *name)
if (curList->operator[](name) == NULL)
return std::string(name);
// TODO. If we thread safe the cache we can add back. DC
#ifndef VISIT_THREADS
if (lastExprList == NULL)
lastExprList = new ExpressionList(*curList);
......@@ -914,6 +916,7 @@ avtSourceFromDatabase::ManageExpressions(const char *name)
cache->ClearVariablesWithString("__AVT_EXPR__");
*lastExprList = *curList;
}
#endif // VISIT_THREADS
// mangle in a prefix to say this is an expression.
char str[1024];
......
......@@ -51,6 +51,7 @@
#include <ImproperUseException.h>
#include <TimingsManager.h>
#include "avtExecutionManager.h"
using std::string;
using std::vector;
......@@ -252,6 +253,10 @@ avtVariableCache::GetVTKObject(const char *var, const char *type, int timestep,
// Mark C. Miller, Sun Dec 3 12:20:11 PST 2006
// Added RemoveObjectPointerPair to ensure we don't have a pair with obj
// already recorded
//
// David Camp, Mon May 20 07:45:08 PDT 2013
// Added code to lock the push of the cache var. This is only done in
// thread mode.
// ****************************************************************************
void
......@@ -274,7 +279,9 @@ avtVariableCache::CacheVTKObject(const char *name, const char *type,
if (v == NULL)
{
v = new OneVar(name, type);
VisitMutexLock( "avtVariableCache::vtkVars" );
vtkVars.push_back(v);
VisitMutexUnlock( "avtVariableCache::vtkVars" );
}
RemoveObjectPointerPair(obj);
......@@ -665,6 +672,9 @@ avtVariableCache::GetVoidRef(const char *var, const char *type, int timestep,
// Programmer: Hank Childs
// Creation: May 22, 2001
//
// David Camp, Mon May 20 07:45:08 PDT 2013
// Added code to lock the push of the cache var. This is only done in
// thread mode.
// ****************************************************************************
void
......@@ -686,7 +696,9 @@ avtVariableCache::CacheVoidRef(const char *name, const char *type,
if (v == NULL)
{
v = new OneVar(name, type);
VisitMutexLock( "avtVariableCache::voidRefVars" );
voidRefVars.push_back(v);
VisitMutexUnlock( "avtVariableCache::voidRefVars" );
}
avtCachedVoidRef *cvr = new avtCachedVoidRef(vr);
......@@ -1148,6 +1160,9 @@ avtVariableCache::OneMat::~OneMat()
// Programmer: Hank Childs
// Creation: October 5, 2001
//
// David Camp, Mon May 20 07:45:08 PDT 2013
// Added code to lock the push of the cache var. This is only done in
// thread mode.
// ****************************************************************************
void
......@@ -1169,7 +1184,9 @@ avtVariableCache::OneMat::CacheItem(int timestep, int domain,
if (t == NULL)
{
t = new OneTimestep(timestep);
VisitMutexLock( "avtVariableCache::OneMat::timesteps" );
timesteps.push_back(t);
VisitMutexUnlock( "avtVariableCache::OneMat::timesteps" );
}
t->CacheItem(domain, im);
......
......@@ -139,7 +139,7 @@ avtBinaryMathExpression::~avtBinaryMathExpression()
// ****************************************************************************
vtkDataArray *
avtBinaryMathExpression::DeriveVariable(vtkDataSet *in_ds)
avtBinaryMathExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
// Our first operand is in the active variable. We don't know if it's
// point data or cell data, so check which one is non-NULL.
......
......@@ -95,7 +95,7 @@ class EXPRESSION_API avtBinaryMathExpression
virtual int NumVariableArguments() { return 2; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual vtkDataArray *CreateArray(vtkDataArray *, vtkDataArray *);
virtual void DoOperation(vtkDataArray *in1, vtkDataArray *in2,
vtkDataArray *out, int, int) = 0;
......
......@@ -179,6 +179,10 @@ avtExpressionDataTreeIterator::~avtExpressionDataTreeIterator()
// with ncells and npts. (The old way would do the wrong thing
// for single-cell data sets.)
//
// David Camp, Tue May 21 13:56:12 PDT 2013
// Removed the currentDomainsLabel and currentDomainsIndex variables.
// This was done to thread the code.
//
// ****************************************************************************
vtkDataSet *
......@@ -204,11 +208,9 @@ avtExpressionDataTreeIterator::ExecuteData(vtkDataSet *in_ds, int index,
//
// Start off by having the derived type calculate the derived variable.
//
currentDomainsLabel = label;
currentDomainsIndex = index;
if (dat == NULL)
{
dat = DeriveVariable(in_ds);
dat = DeriveVariable(in_ds, index);
if (dat == NULL)
{
EXCEPTION2(ExpressionException, outputVariableName, "an unknown error occurred while "
......
......@@ -65,6 +65,17 @@
// Programmer: Hank Childs
// Creation: December 27, 2004
//
// Modifications:
//
// David Camp, Tue May 21 13:56:12 PDT 2013
// Remove these variables because the worker threads will call
// the ExecuteData function and they all can not share these variables.
// I will change the code to pass the currentDomainsIndex into the
// DeriveVariable function. I have found that no one uses the
// currentDomainsLabel variable, so I am not going to pass it.
// std::string currentDomainsLabel;
// int currentDomainsIndex;
//
// ****************************************************************************
class EXPRESSION_API avtExpressionDataTreeIterator
......@@ -76,14 +87,9 @@ class EXPRESSION_API avtExpressionDataTreeIterator
virtual ~avtExpressionDataTreeIterator();
protected:
std::string currentDomainsLabel;
int currentDomainsIndex;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual vtkDataArray *DeriveVariable(vtkDataSet *) = 0;
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex) = 0;
};
#endif
......@@ -84,7 +84,7 @@ class EXPRESSION_API avtSingleInputExpressionFilter
virtual int NumVariableArguments() { return 1; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *) = 0;
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex) = 0;
};
#endif
......@@ -154,7 +154,7 @@ avtUnaryMathExpression::~avtUnaryMathExpression()
// ****************************************************************************
vtkDataArray *
avtUnaryMathExpression::DeriveVariable(vtkDataSet *in_ds)
avtUnaryMathExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
int i;
......
......@@ -96,7 +96,7 @@ class EXPRESSION_API avtUnaryMathExpression : public avtSingleInputExpressionFil
virtual bool NullInputIsExpected(void) { return false; };
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual void DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples) = 0;
virtual vtkDataArray *CreateArray(vtkDataArray *);
......
......@@ -164,6 +164,7 @@ General/avtNormalizeExpression.C
General/avtPerMaterialValueExpression.C
General/avtPerformColorTableLookupExpression.C
General/avtProcessorIdExpression.C
General/avtThreadIdExpression.C
General/avtRandomExpression.C
General/avtRecenterExpression.C
General/avtRectilinearLaplacianExpression.C
......
......@@ -120,7 +120,7 @@ avtConditionalExpression::~avtConditionalExpression()
// ****************************************************************************
vtkDataArray *
avtConditionalExpression::DeriveVariable(vtkDataSet *in_ds)
avtConditionalExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
// Our first operand is in the active variable. We don't know if it's
// point data or cell data, so check which one is non-NULL.
......
......@@ -82,7 +82,7 @@ class EXPRESSION_API avtConditionalExpression
virtual int NumVariableArguments() { return 3; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual bool FilterUnderstandsTransformedRectMesh();
};
......
......@@ -111,7 +111,7 @@ avtCurvatureExpression::~avtCurvatureExpression()
// ****************************************************************************
vtkDataArray *
avtCurvatureExpression::DeriveVariable(vtkDataSet *in_ds)
avtCurvatureExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
if (in_ds->GetDataObjectType() != VTK_POLY_DATA)
{
......
......@@ -73,7 +73,7 @@ class EXPRESSION_API avtCurvatureExpression
protected:
bool doGauss;
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual bool IsPointVariable(void) { return true; };
virtual int GetVariableDimension(void) { return 1; };
};
......
......@@ -95,7 +95,7 @@ avtDisplacementExpression::~avtDisplacementExpression()
// ****************************************************************************
vtkDataArray *
avtDisplacementExpression::DeriveVariable (vtkDataSet *in_ds)
avtDisplacementExpression::DeriveVariable (vtkDataSet *in_ds, int currentDomainsIndex)
{
char msg[1024];
double vals[3];
......
......@@ -70,7 +70,7 @@ class EXPRESSION_API avtDisplacementExpression
virtual int NumVariableArguments() { return 2; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *in);
virtual vtkDataArray *DeriveVariable(vtkDataSet *in, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_VECTOR_VAR; };
virtual int GetNumberOfComponentsInOutput(int ncompsIn1,
int ncompsIn2)
......
......@@ -111,7 +111,7 @@ avtLocalizedCompactnessExpression::~avtLocalizedCompactnessExpression()
// ****************************************************************************
vtkDataArray *
avtLocalizedCompactnessExpression::DeriveVariable(vtkDataSet *in_ds)
avtLocalizedCompactnessExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
int i, j, k, ii, jj, kk;
......
......@@ -83,7 +83,7 @@ class EXPRESSION_API avtLocalizedCompactnessExpression
{return "Calculating localized compactness"; };
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual bool IsPointVariable(void) { return true; };
virtual int GetVariableDimension(void) { return 1; };
};
......
......@@ -96,7 +96,7 @@ avtStrainAlmansiExpression::~avtStrainAlmansiExpression()
// ****************************************************************************
vtkDataArray *
avtStrainAlmansiExpression::DeriveVariable(vtkDataSet *in_ds)
avtStrainAlmansiExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
char msg[1024];
double vals[3];
......
......@@ -72,7 +72,7 @@ class EXPRESSION_API avtStrainAlmansiExpression
virtual int NumVariableArguments() { return 2; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *in);
virtual vtkDataArray *DeriveVariable(vtkDataSet *in, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_TENSOR_VAR; };
virtual int GetNumberOfComponentsInOutput(int ncompsIn1,
int ncompsIn2)
......
......@@ -96,7 +96,7 @@ avtStrainGreenLagrangeExpression::~avtStrainGreenLagrangeExpression()
// ****************************************************************************
vtkDataArray *
avtStrainGreenLagrangeExpression::DeriveVariable (vtkDataSet *in_ds)
avtStrainGreenLagrangeExpression::DeriveVariable (vtkDataSet *in_ds, int currentDomainsIndex)
{
char msg[1024];
double vals[3];
......
......@@ -72,7 +72,7 @@ class EXPRESSION_API avtStrainGreenLagrangeExpression
virtual int NumVariableArguments() { return 2; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *in);
virtual vtkDataArray *DeriveVariable(vtkDataSet *in, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_TENSOR_VAR; };
virtual int GetNumberOfComponentsInOutput(int ncompsIn1,
int ncompsIn2)
......
......@@ -98,7 +98,7 @@ avtStrainInfinitesimalExpression::~avtStrainInfinitesimalExpression()
// ****************************************************************************
vtkDataArray *
avtStrainInfinitesimalExpression::DeriveVariable(vtkDataSet *in_ds)
avtStrainInfinitesimalExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
char msg[1024];
double vals[3];
......
......@@ -72,7 +72,7 @@ class EXPRESSION_API avtStrainInfinitesimalExpression
virtual int NumVariableArguments() { return 2; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *in);
virtual vtkDataArray *DeriveVariable(vtkDataSet *in, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_TENSOR_VAR; };
virtual int GetNumberOfComponentsInOutput(int ncompsIn1,
int ncompsIn2)
......
......@@ -102,7 +102,7 @@ avtStrainRateExpression::~avtStrainRateExpression()
// ****************************************************************************
vtkDataArray *
avtStrainRateExpression::DeriveVariable(vtkDataSet *in_ds)
avtStrainRateExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
char msg[1024];
double vals[3];
......
......@@ -72,7 +72,7 @@ class EXPRESSION_API avtStrainRateExpression
virtual int NumVariableArguments() { return 2; }
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *in);
virtual vtkDataArray *DeriveVariable(vtkDataSet *in, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_TENSOR_VAR; };
virtual int GetNumberOfComponentsInOutput(int ncompsIn1,
int ncompsIn2)
......
......@@ -240,7 +240,7 @@ avtApplyDataBinningExpression::ModifyContract(avtContract_p spec)
// ****************************************************************************
vtkDataArray *
avtApplyDataBinningExpression::DeriveVariable(vtkDataSet *in_ds)
avtApplyDataBinningExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
if (theDataBinning == NULL)
{
......
......@@ -96,7 +96,7 @@ class EXPRESSION_API avtApplyDataBinningExpression
static GetDataBinningCallback getDataBinningCallback;
static void *getDataBinningCallbackArgs;
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual int GetVariableDimension(void) { return 1; };
};
......
......@@ -116,7 +116,7 @@ avtApplyEnumerationExpression::~avtApplyEnumerationExpression()
// ****************************************************************************
vtkDataArray *
avtApplyEnumerationExpression::DeriveVariable(vtkDataSet *in_ds)
avtApplyEnumerationExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
if (varnames.size() == 0)
EXCEPTION0(ImproperUseException);
......
......@@ -81,7 +81,7 @@ class EXPRESSION_API avtApplyEnumerationExpression
std::vector<double> enumeratedValues;
virtual void UpdateDataObjectInfo(void);
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_SCALAR_VAR; };
};
......
......@@ -122,7 +122,7 @@ avtApplyMapExpression::~avtApplyMapExpression()
// ****************************************************************************
vtkDataArray *
avtApplyMapExpression::DeriveVariable(vtkDataSet *in_ds)
avtApplyMapExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
ostringstream oss;
......
......@@ -82,7 +82,7 @@ class EXPRESSION_API avtApplyMapExpression
virtual int NumVariableArguments(void) { return 1; };
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_SCALAR_VAR;};
virtual void UpdateDataObjectInfo();
private:
......
......@@ -116,7 +116,7 @@ avtArrayComposeExpression::~avtArrayComposeExpression()
// ****************************************************************************
vtkDataArray *
avtArrayComposeExpression::DeriveVariable(vtkDataSet *in_ds)
avtArrayComposeExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
if (varnames.size() == 0)
EXCEPTION0(ImproperUseException);
......
......@@ -82,7 +82,7 @@ class EXPRESSION_API avtArrayComposeExpression
int nargs;
virtual void UpdateDataObjectInfo(void);
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_ARRAY_VAR; };
};
......
......@@ -112,7 +112,7 @@ avtArrayComposeWithBinsExpression::~avtArrayComposeWithBinsExpression()
// ****************************************************************************
vtkDataArray *
avtArrayComposeWithBinsExpression::DeriveVariable(vtkDataSet *in_ds)
avtArrayComposeWithBinsExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
if (varnames.size() == 0)
EXCEPTION0(ImproperUseException);
......
......@@ -82,7 +82,7 @@ class EXPRESSION_API avtArrayComposeWithBinsExpression
std::vector<double> binRanges;
virtual void UpdateDataObjectInfo(void);
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_ARRAY_VAR; };
};
......
......@@ -119,7 +119,7 @@ avtArrayDecomposeExpression::~avtArrayDecomposeExpression()
// ****************************************************************************
vtkDataArray *
avtArrayDecomposeExpression::DeriveVariable(vtkDataSet *in_ds)
avtArrayDecomposeExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
if (activeVariable == NULL)
EXCEPTION2(ExpressionException, outputVariableName,
......
......@@ -82,7 +82,7 @@ class EXPRESSION_API avtArrayDecomposeExpression
bool issuedWarning;
int index;
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual void PreExecute(void);
virtual int GetVariableDimension(void) { return 1; };
virtual avtVarType GetVariableType(void) { return AVT_SCALAR_VAR; };
......
......@@ -117,7 +117,7 @@ avtBinExpression::~avtBinExpression()
// ****************************************************************************
vtkDataArray *
avtBinExpression::DeriveVariable(vtkDataSet *in_ds)
avtBinExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
std::ostringstream oss;
......
......@@ -81,7 +81,7 @@ class EXPRESSION_API avtBinExpression
virtual int NumVariableArguments(void) { return 1; };
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual avtVarType GetVariableType(void) { return AVT_SCALAR_VAR;};
private:
std::vector<double> bins;
......
......@@ -118,7 +118,7 @@ ClampColor(const double c)
}
vtkDataArray *
avtColorComposeExpression::DeriveVariable(vtkDataSet *in_ds)
avtColorComposeExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
size_t numinputs = varnames.size();
......
......@@ -74,7 +74,7 @@ class EXPRESSION_API avtColorComposeExpression
protected:
int ncomp;
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual int GetVariableDimension(void) { return 3; }
};
......
......@@ -113,7 +113,7 @@ avtConstantFunctionExpression::~avtConstantFunctionExpression()
// ****************************************************************************
vtkDataArray *
avtConstantFunctionExpression::DeriveVariable(vtkDataSet *in_ds)
avtConstantFunctionExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
vtkIdType nvals = nodal ? in_ds->GetNumberOfPoints() :
in_ds->GetNumberOfCells();
......
......@@ -80,7 +80,7 @@ class EXPRESSION_API avtConstantFunctionExpression
virtual const char *GetDescription() { return "Assigning constant."; }
virtual void ProcessArguments(ArgsExpr*, ExprPipelineState *);
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual bool IsPointVariable() { return nodal; }
virtual int GetVariableDimension() { return 1; }
virtual int NumVariableArguments(void) { return 2; }
......
......@@ -120,7 +120,7 @@ avtCoordinateExtremaExpression::~avtCoordinateExtremaExpression()
// ****************************************************************************
vtkDataArray *
avtCoordinateExtremaExpression::DeriveVariable(vtkDataSet *in_ds)
avtCoordinateExtremaExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
vtkIdType ncells = in_ds->GetNumberOfCells();
......
......@@ -94,7 +94,7 @@ class EXPRESSION_API avtCoordinateExtremaExpression
bool getMinimum;
CoordinateType coordinateType;
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex);
virtual int GetVariableDimension() { return 1; }
virtual bool IsPointVariable() { return false; }
};
......
......@@ -78,7 +78,7 @@ class EXPRESSION_API avtCurveDomainExpression
protected:
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual vtkDataArray *DeriveVariable(vtkDataSet *) { return NULL;}
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex) { return NULL;}
virtual avtVarType GetVariableType(void) { return AVT_CURVE; };
};
......
......@@ -75,7 +75,7 @@ class EXPRESSION_API avtCurveSwapXYExpression
protected:
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual vtkDataArray *DeriveVariable(vtkDataSet *) { return NULL;}
virtual vtkDataArray *DeriveVariable(vtkDataSet *, int currentDomainsIndex) { return NULL;}
virtual avtVarType GetVariableType(void) { return AVT_CURVE; };
};
......
......@@ -125,7 +125,7 @@ avtDataIdExpression::PreExecute(void)
// ****************************************************************************
vtkDataArray *
avtDataIdExpression::DeriveVariable(vtkDataSet *in_ds)
avtDataIdExpression::DeriveVariable(vtkDataSet *in_ds, int currentDomainsIndex)
{
vtkIdType nvals = 0;
if (doZoneIds)
......