Commit 67eca93a authored by hrchilds's avatar hrchilds
Browse files

Update from April 9, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@217 18c085ea-50e0-402c-830e-de6fd14e8384
parent d0353488
......@@ -2078,6 +2078,10 @@ avtGenericDatabase::AddOriginalNodesArray(vtkDataSet *ds, const int domain)
// Jeremy Meredith, Wed Oct 15 17:25:48 PDT 2003
// Added code to correctly handle clean-zones-only MIR.
//
// Hank Childs, Fri Apr 9 09:15:25 PDT 2004
// Use the material object to determine the material indices, not meta-data
// from timestep 0.
//
// ****************************************************************************
avtDataTree_p
......@@ -2100,7 +2104,7 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
// We need to have the material indices as well.
//
vector<int> mindex;
GetMaterialIndices(var, mnames, mindex);
GetMaterialIndices(mat, mnames, mindex);
//
// Make room for the "mixed" material (i.e. for clean-zones-only)
......@@ -2316,35 +2320,33 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
// Gets a list of material indices based on a list of material names.
//
// Arguments:
// var The variable we want.
// mat The material we should get the indices from.
// mn The material names.
// ml A place to put the material list.
//
// Programmer: Hank Childs
// Creation: October 5, 2001
//
// Modifications:
//
// Hank Childs, Fri Apr 9 09:02:57 PDT 2004
// Use the avtMaterial for the correct timestep to get the indices.
//
// ****************************************************************************
void
avtGenericDatabase::GetMaterialIndices(const char *var, vector<string> &mn,
avtGenericDatabase::GetMaterialIndices(avtMaterial *mat, vector<string> &mn,
vector<int> &ml)
{
// assume material composition is invariant with time, get at time 0
avtDatabaseMetaData *md = GetMetaData(0);
string meshname = md->MeshForVar(var);
string matname = md->MaterialOnMesh(meshname);
const avtMaterialMetaData *mmd = md->GetMaterial(matname);
if (mmd == NULL)
{
EXCEPTION0(ImproperUseException);
}
const vector<string> &matlist = mat->GetCompleteMaterialList();
int nstr = mn.size();
for (int i = 0 ; i < nstr ; i++)
{
bool foundMatch = false;
for (int j = 0 ; j < mmd->numMaterials ; j++)
for (int j = 0 ; j < matlist.size() ; j++)
{
if (mn[i] == mmd->materialNames[j])
if (mn[i] == matlist[j])
{
ml.push_back(j);
foundMatch = true;
......@@ -2353,7 +2355,10 @@ avtGenericDatabase::GetMaterialIndices(const char *var, vector<string> &mn,
}
if (!foundMatch)
{
EXCEPTION0(ImproperUseException);
debug1 << "Was unable to match material " << mn[i] << " against "
<< "any material for this dataset. It is likely that this "
<< "material exists at another timestep, but not at this "
<< "one." << endl;
}
}
}
......
......@@ -175,6 +175,9 @@ class PickVarInfo;
// Mark C. Miller, Tue Mar 16 14:40:19 PST 2004
// Added timestep argument to PopulateIOInformation
//
// Hank Childs, Fri Apr 9 09:02:57 PDT 2004
// Calculate material indices directly from the material for that timestep.
//
// ****************************************************************************
class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
......@@ -266,7 +269,7 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
int, bool, bool&, bool&, bool);
avtMaterial *GetMaterial(int, const char *, int);
avtSpecies *GetSpecies(int, const char *, int);
void GetMaterialIndices(const char *,
void GetMaterialIndices(avtMaterial *,
std::vector<std::string> &,
std::vector<int> &);
......
......@@ -225,6 +225,9 @@ avtDatasetQuery::PostExecute()
// Kathleen Bonnell, Wed Mar 31 15:52:54 PST 2004
// Allow for time-varying case.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -247,12 +250,14 @@ avtDatasetQuery::ApplyFilters(avtDataObject_p dob)
if (!OriginalData())
{
newDS->GetRestriction()->SuspendCorrectnessChecking();
newDS->GetRestriction()->TurnOnAll();
for (int i = 0; i < silUseSet.size(); i++)
{
if (silUseSet[i] == 0)
newDS->GetRestriction()->TurnOffSet(i);
}
}
newDS->GetRestriction()->EnableCorrectnessChecking();
}
avtPipelineSpecification_p pspec =
new avtPipelineSpecification(newDS, queryAtts.GetPipeIndex());
......
......@@ -68,6 +68,9 @@ avtActualDataMinMaxQuery::~avtActualDataMinMaxQuery()
// Kathleen Bonnell, Wed Mar 31 16:07:50 PST 2004
// Added code for time-varying case.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -98,12 +101,14 @@ avtActualDataMinMaxQuery::ApplyFilters(avtDataObject_p inData)
avtDataSpecification(oldSpec->GetVariable(), queryAtts.GetTimeStep(),
oldSpec->GetRestriction());
newDS->GetRestriction()->SuspendCorrectnessChecking();
newDS->GetRestriction()->TurnOnAll();
for (int i = 0; i < silUseSet.size(); i++)
{
if (silUseSet[i] == 0)
newDS->GetRestriction()->TurnOffSet(i);
}
newDS->GetRestriction()->EnableCorrectnessChecking();
avtPipelineSpecification_p pspec =
new avtPipelineSpecification(newDS, queryAtts.GetPipeIndex());
......
......@@ -600,6 +600,9 @@ avtPickQuery::Execute(vtkDataSet *ds, const int dom)
// Reworked to use ExpressionEvaluatorFilter and SILRestriction UseSet as
// passed down by the Engine.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -677,6 +680,7 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
pspec->SetDataSpecification(dspec);
pspec->GetDataSpecification()->GetRestriction()->SuspendCorrectnessChecking();
pspec->GetDataSpecification()->GetRestriction()->TurnOnAll();
int i;
for (i = 0; i < silUseSet.size(); i++)
......@@ -684,6 +688,7 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
if (silUseSet[i] == 0)
pspec->GetDataSpecification()->GetRestriction()->TurnOffSet(i);
}
pspec->GetDataSpecification()->GetRestriction()->EnableCorrectnessChecking();
if (!singleDomain)
{
......
......@@ -124,6 +124,9 @@ avtTotalSurfaceAreaQuery::VerifyInput()
// Kathleen Bonnell, Wed Mar 31 16:13:07 PST 2004
// Added logic for time-varying case.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -160,12 +163,14 @@ avtTotalSurfaceAreaQuery::ApplyFilters(avtDataObject_p inData)
avtPipelineSpecification_p pspec =
new avtPipelineSpecification(newDS, queryAtts.GetPipeIndex());
newDS->GetRestriction()->SuspendCorrectnessChecking();
newDS->GetRestriction()->TurnOnAll();
for (int i = 0; i < silUseSet.size(); i++)
{
if (silUseSet[i] == 0)
newDS->GetRestriction()->TurnOffSet(i);
}
newDS->GetRestriction()->EnableCorrectnessChecking();
avtDataObject_p dob;
CopyTo(dob, inData);
......
......@@ -111,6 +111,9 @@ avtTotalVolumeQuery::VerifyInput()
// Kathleen Bonnell, Wed Mar 31 16:13:07 PST 2004
// Added logic for time-varying case.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -142,12 +145,14 @@ avtTotalVolumeQuery::ApplyFilters(avtDataObject_p inData)
avtDataSpecification(oldSpec->GetVariable(), queryAtts.GetTimeStep(),
oldSpec->GetRestriction());
newDS->GetRestriction()->SuspendCorrectnessChecking();
newDS->GetRestriction()->TurnOnAll();
for (int i = 0; i < silUseSet.size(); i++)
{
if (silUseSet[i] == 0)
newDS->GetRestriction()->TurnOffSet(i);
}
newDS->GetRestriction()->EnableCorrectnessChecking();
avtPipelineSpecification_p pspec =
new avtPipelineSpecification(newDS, queryAtts.GetPipeIndex());
......
......@@ -310,6 +310,9 @@ avtVariableQuery::PreExecute()
// Reworked code so that this query will always return the same results
// as Pick. Also allow for time-varying query.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -341,12 +344,14 @@ avtVariableQuery::ApplyFilters(avtDataObject_p inData)
oldSpec->GetRestriction());
}
dspec->GetRestriction()->SuspendCorrectnessChecking();
dspec->GetRestriction()->TurnOnAll();
for (i = 0; i < silUseSet.size(); i++)
{
if (silUseSet[i] == 0)
dspec->GetRestriction()->TurnOffSet(i);
}
dspec->GetRestriction()->EnableCorrectnessChecking();
intVector dlist;
dlist.push_back(searchDomain);
......
......@@ -74,6 +74,9 @@ avtWeightedVariableSummationQuery::~avtWeightedVariableSummationQuery()
// Allow time varying data to access database, so it can consider more than
// one timestep.
//
// Hank Childs, Fri Apr 9 16:25:40 PDT 2004
// Minimize work done by creating new SIL.
//
// ****************************************************************************
avtDataObject_p
......@@ -137,12 +140,14 @@ avtWeightedVariableSummationQuery::ApplyFilters(avtDataObject_p inData)
avtDataSpecification(oldSpec->GetVariable(),
queryAtts.GetTimeStep(), oldSpec->GetRestriction());
newDS->GetRestriction()->SuspendCorrectnessChecking();
newDS->GetRestriction()->TurnOnAll();
for (int i = 0; i < silUseSet.size(); i++)
{
if (silUseSet[i] == 0)
newDS->GetRestriction()->TurnOffSet(i);
}
newDS->GetRestriction()->EnableCorrectnessChecking();
avtPipelineSpecification_p pspec =
new avtPipelineSpecification(newDS, queryAtts.GetPipeIndex());
......
......@@ -237,6 +237,9 @@
# Jeremy Meredith, Tue Mar 30 10:16:44 PST 2004
# Added EngineKey.
#
# Brad Whitlock, Fri Apr 9 09:09:28 PDT 2004
# Moved moc files into viewer proper.
#
##############################################################################
##
......@@ -332,8 +335,8 @@ HDRMOC = \
SRCMOC=${HDRMOC:.h=_moc.C}
OBJMOC=${SRCMOC:.C=.o}
OBJ=$(SRC:.C=.o) ${OBJMOC}
MAINOBJ=$(MAINSRC:.C=.o)
OBJ=$(SRC:.C=.o)
MAINOBJ=$(MAINSRC:.C=.o) ${OBJMOC}
##
## Standard targets...
......
......@@ -4303,6 +4303,8 @@ ViewerPlot::GetVariableCentering() const
// Creation: March 30, 2004
//
// Modifications:
// Brad Whitlock, Fri Apr 9 09:05:37 PDT 2004
// Made it use cacheIndex.
//
// ****************************************************************************
......@@ -4310,6 +4312,6 @@ void
ViewerPlot::UpdateDataExtents()
{
dataExtents.clear();
plotList[state]->GetDataExtents(dataExtents);
plotList[cacheIndex]->GetDataExtents(dataExtents);
}
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