Commit 59fdfd9f authored by hrchilds's avatar hrchilds
Browse files

Update from March 29, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@208 18c085ea-50e0-402c-830e-de6fd14e8384
parent ca884d0b
......@@ -688,6 +688,10 @@ class MakeMovie:
# If there was a problem when trying to set the animation frame,
# try and draw the plots again.
#
# Brad Whitlock, Tue Mar 2 10:55:33 PDT 2004
# I changed the animation methods so they animate using the active
# time slider.
#
###########################################################################
def GenerateFrames(self):
......@@ -716,15 +720,15 @@ class MakeMovie:
self.numFrames = 0
i = 0
drawThePlots = 0
while(i < AnimationGetNFrames()):
if(AnimationSetFrame(i) == 0):
while(i < TimeSliderGetNStates()):
if(SetTimeSliderState(i) == 0):
drawThePlots = 1
print "There was an error when trying to set the "\
"animation frame to %d. VisIt will now try to redraw the plots." % i
"time slider state to %d. VisIt will now try to redraw the plots." % i
if(drawThePlots):
if(DrawPlots() == 0):
print "VisIt could not draw plots for frame %d. "\
"You should investigate the file used for that frame." % i
print "VisIt could not draw plots for time slider "\
"state %d. You should investigate the files used for that state." % i
else:
drawThePlots = 0
self.SaveImage(self.numFrames, ext)
......
......@@ -52,6 +52,10 @@
# Added the new test multi_format2.py to the parallel skip list since
# it forces an engine restart.
#
# Brad Whitlock, Mon Mar 29 12:05:18 PDT 2004
# I added keyframe and simplekeyframe to the skip list until I
# fix keyframing.
#
# ----------------------------------------------------------------------------
# list of users who want email every night with the log file
......@@ -179,14 +183,20 @@ curdate=`date +%Y-%m-%d-%p%I%M`
modes="serial parallel scalable,parallel"
# set list of tests/modes to skip
skipList="parallel:tests/databases/samrai.py \
skipList="serial:tests/hybrid/keyframe.py \
serial:tests/session/simplekeyframe.py \
parallel:tests/databases/samrai.py \
parallel:tests/hybrid/sil.py \
parallel:tests/rendering/volume.py \
parallel,parallel:tests/databases/multi_format2.py \
parallel:tests/hybrid/keyframe.py \
parallel:tests/session/simplekeyframe.py \
scalable,parallel:tests/databases/multi_format2.py \
scalable,parallel:tests/hybrid/gradient.py \
scalable,parallel:tests/hybrid/lineout.py \
scalable,parallel:tests/operators/operators.py \
scalable,parallel:tests/rendering/volume.py"
scalable,parallel:tests/rendering/volume.py \
scalable,parallel:tests/hybrid/keyframe.py \
scalable,parallel:tests/session/simplekeyframe.py"
# run the test(s)
error=0
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,6 +21,7 @@
class AttributeSubject;
class QvisNotepadArea;
class QvisPostableWindowObserver;
class avtDatabaseMetaData;
class avtPlot;
// ****************************************************************************
......@@ -74,6 +75,9 @@ class avtPlot;
// Jeremy Meredith, Wed Nov 5 10:28:29 PST 2003
// Added ability to disable plugins by default.
//
// Brad Whitlock, Fri Mar 26 00:40:29 PDT 2004
// I changed the interface to several methods in the viewer plugin.
//
// ****************************************************************************
class PLUGIN_API GeneralPlotPluginInfo
......@@ -114,15 +118,15 @@ class PLUGIN_API ViewerPlotPluginInfo : public virtual CommonPlotPluginInfo
virtual avtPlot *AllocAvtPlot() = 0;
virtual void InitializePlotAtts(AttributeSubject *atts,
const char *hostName, const char *databaseName,
const avtDatabaseMetaData *,
const char *variableName) = 0;
virtual void ReInitializePlotAtts(AttributeSubject *atts,
const char *hostName, const char *databaseName,
const avtDatabaseMetaData *,
const char *variableName) { ; };
virtual void ResetPlotAtts(AttributeSubject *atts,
const char *hostName, const char *databaseName,
const avtDatabaseMetaData *md,
const char *variableName) { ; } ;
virtual const char **XPMIconData() const { return 0; }
......
......@@ -1004,11 +1004,13 @@ DataNode::AddNode(DataNode *node)
// Creation: Thu Sep 28 12:14:24 PDT 2000
//
// Modifications:
//
// Brad Whitlock, Mon Feb 2 15:38:05 PST 2004
// I added an optional argument to delete the node.
//
// ****************************************************************************
void
DataNode::RemoveNode(const std::string &key)
DataNode::RemoveNode(const std::string &key, bool deleteNode)
{
if(NodeType != INTERNAL_NODE)
return;
......@@ -1020,7 +1022,8 @@ DataNode::RemoveNode(const std::string &key)
DataNode *node = (DataNode *)Data;
if(node->Key == key)
{
delete node;
if(deleteNode)
delete node;
Data = 0;
Length = 0;
}
......@@ -1034,6 +1037,8 @@ DataNode::RemoveNode(const std::string &key)
{
if(!start && nodeArray[i]->Key == key)
{
if(deleteNode)
delete nodeArray[i];
start = true;
}
......
......@@ -16,7 +16,7 @@ typedef enum
DOUBLE_VECTOR_NODE, STRING_VECTOR_NODE, BOOL_VECTOR_NODE
} NodeTypeEnum;
// *******************************************************************
// ****************************************************************************
// Class: DataNode
//
// Purpose:
......@@ -36,7 +36,10 @@ typedef enum
// I added methods to set the DataNode's data so it can be
// transformed to a new type.
//
// *******************************************************************
// Brad Whitlock, Mon Feb 2 15:36:49 PST 2004
// Added an optional argument to RemoveNode.
//
// ****************************************************************************
class STATE_API DataNode
{
......@@ -129,7 +132,7 @@ public:
// Node operations
DataNode *GetNode(const std::string &key, DataNode *parentNode = 0);
void AddNode(DataNode *node);
void RemoveNode(const std::string &key);
void RemoveNode(const std::string &key, bool deleteNode = true);
// Functions to return private members.
const std::string &GetKey() const;
......
This diff is collapsed.
Function: GetCorrelatedTimeStates
Declaration: bool GetCorrelatedTimeStates(int state, intVector &states) const;
Definition:
// ****************************************************************************
// Method: DatabaseCorrelation::GetCorrelatedTimeStates
//
// Purpose:
// Gets the correlated time states for all databases in the correlation at
// the specified time state.
//
// Arguments:
// state : The state for which we want the correlated time states.
// states : The return vector for the correlated time states.
//
// Returns:
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// ****************************************************************************
bool
DatabaseCorrelation::GetCorrelatedTimeStates(int state, intVector &states) const
{
bool retval = false;
if(state >= 0 && state < numStates)
{
states.clear();
int index = state;
for(int i = 0; i < databaseNames.size(); ++i)
{
states.push_back(indices[index]);
index += numStates;
}
retval = true;
}
return retval;
}
Function: SetNumStates
Declaration: void SetNumStates(int nstates);
Definition:
// ****************************************************************************
// Method: DatabaseCorrelation::SetNumStates
//
// Purpose:
// Sets the number of states in the correlation and adjusts the correlation
// indices.
//
// Arguments:
// nStates : The new number of states.
//
// Returns:
//
// Note: NOTE -- This method is not done and probably won't work yet.
//
// Programmer: Brad Whitlock
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// ****************************************************************************
void
DatabaseCorrelation::SetNumStates(int nStates)
{
if(method == IndexForIndexCorrelation)
{
intVector newIndices;
for(int i = 0; i < databaseNames.size(); ++i)
{
for(int j = 0; j < nStates; ++j)
{
int state = (i < databaseNStates[i]) ? i :
(databaseNStates[i]-1);
newIndices.push_back(state);
}
}
indices = newIndices;
numStates = nStates;
}
else if(method == StretchedIndexCorrelation)
{
intVector newIndices;
int maxStates = (numStates > nStates) ? numStates : nStates;
for(int i = 0; i < databaseNames.size(); ++i)
{
for(int j = 0; j < maxStates; ++j)
{
float t = float(j) / float(maxStates - 1);
int state = int(t * databaseNStates[i]);
newIndices.push_back(state);
}
}
indices = newIndices;
numStates = maxStates;
}
else if(method == UserDefinedCorrelation)
{
intVector newIndices;
int currentState = 0;
int lastState = numStates - 1;
for(int i = 0; i < databaseNames.size(); ++i)
{
for(int j = 0; j < nStates; ++j)
{
if(j < numStates)
{
newIndices.push_back(indices[currentState++]);
}
else
newIndices.push_back(indices[lastState]);
}
lastState += numStates;
}
}
//
// Setting the number of time states for a time or cycle correlation database has
// no effect because those correlations are controlled by the times and cycles
// in the database that makes them up.
//
}
Function: AddDatabase
Declaration: void AddDatabase(const std::string &database, int nStates, const doubleVector &times, const intVector &cycles);
Definition:
// ****************************************************************************
// Method: DatabaseCorrelation::AddDatabase
//
// Purpose:
// Adds a new database to the correlation.
//
// Arguments:
// database : The name of the database to add to the correlation.
// nStates : The number of states in the database.
// times : The times for the states in the database.
// cycles : The cycles for the states in the database.
//
// Returns:
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// ****************************************************************************
void
DatabaseCorrelation::AddDatabase(const std::string &database, int nStates,
const doubleVector &times, const intVector &cycles)
{
int i;
// If the database is already in the correlation, maybe we should
// remove it and then add it again in case the length changed like
// when we add time states to a file.
if(UsesDatabase(database))
return;
//
// Add the times and cycles for the new database to the correlation so
// we can access them later and perhaps use them to correlate.
//
for(i = 0; i < nStates; ++i)
{
double t = ((i < times.size()) ? times[i] : 0.);
databaseTimes.push_back(t);
int c = ((i < cycles.size()) ? cycles[i] : 0);
databaseCycles.push_back(c);
}
if(method == IndexForIndexCorrelation)
{
if(numStates >= nStates)
{
//
// The number of states in the correlation is larger than
// the number of states in the database so we can append
// the database's states to the end of the indices and
// repeat the last frames.
//
for(i = 0; i < numStates; ++i)
{
int state = (i < nStates) ? i : (nStates - 1);
indices.push_back(state);
}
}
else
{
//
// The number of states for the current database is larger
// than the number of states in the correlation. The correlation
// must be lengthened.
//
indices.clear();
for(i = 0; i < databaseNames.size(); ++i)
{
for(int j = 0; j < nStates; ++j)
{
int state = (j < databaseNStates[i]) ? j :
(databaseNStates[i]-1);
indices.push_back(state);
}
}
// Add the new database to the correlation.
for(i = 0; i < nStates; ++i)
indices.push_back(i);
numStates = nStates;
}
databaseNames.push_back(database);
databaseNStates.push_back(nStates);
}
else if(method == StretchedIndexCorrelation)
{
databaseNames.push_back(database);
databaseNStates.push_back(nStates);
indices.clear();
int maxStates = (numStates > nStates) ? numStates : nStates;
for(i = 0; i < databaseNames.size(); ++i)
{
for(int j = 0; j < maxStates; ++j)
{
float t = float(j) / float(maxStates - 1);
int state = int(t * (databaseNStates[i] - 1));
indices.push_back(state);
}
}
numStates = maxStates;
}
else if(method == UserDefinedCorrelation)
{
if(numStates > nStates)
{
//
// The database being added has fewer states so we need to
// repeat the last states.
//
// We'll have to pass in the user-defined indices and append them to the indices vector
}
else
{
}
}
else if(method == TimeCorrelation)
{
databaseNames.push_back(database);
databaseNStates.push_back(nStates);
// Align time for all databases on the same time axis so we can count the
// number of times and make that be the new number of states.
std::map<double, intVector> timeAlignmentMap;
int index = 0;
for(i = 0; i < databaseNames.size(); ++i)
for(int j = 0; j < databaseNStates[i]; ++j, ++index)
timeAlignmentMap[databaseTimes[index]].push_back(i);
//
// Set the condensed times vector
//
condensedTimes.clear();
for(std::map<double,intVector>::const_iterator p = timeAlignmentMap.begin();
p != timeAlignmentMap.end(); ++p)
{
condensedTimes.push_back(p->first);
}
// Now there is a map that has for each time in all of the databases
// a list of the databases that contain that time.
indices.clear();
for(i = 0; i < databaseNames.size(); ++i)
{
int state = 0;
std::map<double, intVector>::const_iterator pos = timeAlignmentMap.begin();
for(; pos != timeAlignmentMap.end(); ++pos)
{
// Look to see if the current database is in the list of databases
// for the current time. If so, we need to increment the state after
// we use it.
intVector::const_iterator dbIndex =
std::find(pos->second.begin(), pos->second.end(), i);
indices.push_back(state);
if(dbIndex != pos->second.end() && state < databaseNStates[i] - 1)
++state;
}
}
numStates = timeAlignmentMap.size();
}
else if(method == CycleCorrelation)
{
databaseNames.push_back(database);
databaseNStates.push_back(nStates);
// Align cycle for all databases on the same time axis so we can count the
// number of cycles and make that be the new number of states.
std::map<int, intVector> cycleAlignmentMap;
int index = 0;
for(i = 0; i < databaseNames.size(); ++i)
for(int j = 0; j < databaseNStates[i]; ++j, ++index)
cycleAlignmentMap[databaseCycles[index]].push_back(i);
//
// Set the condensed cycles vector
//
condensedCycles.clear();
for(std::map<int,intVector>::const_iterator p = cycleAlignmentMap.begin();
p != cycleAlignmentMap.end(); ++p)
{
condensedCycles.push_back(p->first);
}
// Now there is a map that has for each time in all of the databases
// a list of the databases that contain that time.
indices.clear();
for(i = 0; i < databaseNames.size(); ++i)
{
int state = 0;
std::map<int, intVector>::const_iterator pos = cycleAlignmentMap.begin();
for(; pos != cycleAlignmentMap.end(); ++pos)
{
// Look to see if the current database is in the list of databases
// for the current time. If so, we need to increment the state after
// we use it.
intVector::const_iterator dbIndex =
std::find(pos->second.begin(), pos->second.end(), i);
indices.push_back(state);
if(dbIndex != pos->second.end() && state < databaseNStates[i] - 1)
++state;
}
}
numStates = cycleAlignmentMap.size();
}
}
Function: UsesDatabase
Declaration: bool UsesDatabase(const std::string &database) const;
Definition:
// ****************************************************************************
// Method: DatabaseCorrelation::UsesDatabase
//
// Purpose:
// Returns whether or not a database is used in the correlation.
//
// Arguments:
// database : The database we're checking for membership in the correlation.
//
// Returns: True if database is used; false otherwise.
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// ****************************************************************************
bool
DatabaseCorrelation::UsesDatabase(const std::string &database) const
{
return std::find(databaseNames.begin(), databaseNames.end(), database) !=
databaseNames.end();
}
Function: GetNumDatabases
Declaration: int GetNumDatabases() const;
Definition:
// ****************************************************************************
// Method: DatabaseCorrelation::GetNumDatabases
//
// Purpose:
// Returns the number of databases used in the correlation.
//
// Programmer: Brad Whitlock
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// ****************************************************************************
int
DatabaseCorrelation::GetNumDatabases() const
{
return databaseNames.size();
}
Function: GetCorrelatedTimeState
Declaration: int GetCorrelatedTimeState(const std::string &db, int state) const;
Definition:
// ****************************************************************************
// Method: DatabaseCorrelation::GetCorrelatedTimeState
//
// Purpose:
// Gets the correlated time state for the specified database at the given state.
//
// Arguments:
// db : The database for which we want the correlated time.
// state : The state for which we want the correlated time.
//
// Returns: The correlated time state or -1 if no correlated time state
// exists.
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// ****************************************************************************
int
DatabaseCorrelation::GetCorrelatedTimeState(const std::string &db, int state) const
{
int retval = -1;
if(state >= 0 && state < numStates)
{
for(int i = 0; i < databaseNames.size(); ++i)
{
if(databaseNames[i] == db)
{
retval = indices[i * numStates + state];
break;
}
}
}
return retval;
}