Commit 8e7620f8 authored by hrchilds's avatar hrchilds
Browse files

Update from August 7, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@705 18c085ea-50e0-402c-830e-de6fd14e8384
parent 29cdd708
......@@ -188,6 +188,9 @@ ParsingExprList::Update(Subject *)
// Hank Childs, Tue Jul 19 13:39:12 PDT 2005
// Added array expression.
//
// Kathleen Bonnell, Wed Aug 2 17:20:11 PDT 2006
// Added curve expression.
//
// ****************************************************************************
avtVarType
ParsingExprList::GetAVTType(const Expression::ExprType type)
......@@ -212,6 +215,9 @@ ParsingExprList::GetAVTType(const Expression::ExprType type)
case Expression::ArrayMeshVar:
retval = AVT_ARRAY_VAR;
break;
case Expression::CurveMeshVar:
retval = AVT_CURVE;
break;
case Expression::Mesh:
retval = AVT_MESH;
break;
......
......@@ -45,21 +45,21 @@
static const char *ExprType_strings[] = {
"Unknown", "ScalarMeshVar", "VectorMeshVar",
"TensorMeshVar", "SymmetricTensorMeshVar", "ArrayMeshVar",
"Mesh", "Material", "Species"
};
"CurveMeshVar", "Mesh", "Material",
"Species"};
std::string
Expression::ExprType_ToString(Expression::ExprType t)
{
int index = int(t);
if(index < 0 || index >= 9) index = 0;
if(index < 0 || index >= 10) index = 0;
return ExprType_strings[index];
}
std::string
Expression::ExprType_ToString(int t)
{
int index = (t < 0 || t >= 9) ? 0 : t;
int index = (t < 0 || t >= 10) ? 0 : t;
return ExprType_strings[index];
}
......@@ -67,7 +67,7 @@ bool
Expression::ExprType_FromString(const std::string &s, Expression::ExprType &val)
{
val = Expression::Unknown;
for(int i = 0; i < 9; ++i)
for(int i = 0; i < 10; ++i)
{
if(s == ExprType_strings[i])
{
......@@ -87,7 +87,7 @@ Expression::ExprType_FromString(const std::string &s, Expression::ExprType &val)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -113,7 +113,7 @@ Expression::Expression() : AttributeSubject("ssbibsb")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -141,7 +141,7 @@ Expression::Expression(const Expression &obj) : AttributeSubject("ssbibsb")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -161,7 +161,7 @@ Expression::~Expression()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -192,7 +192,7 @@ Expression::operator = (const Expression &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -220,7 +220,7 @@ Expression::operator == (const Expression &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -241,7 +241,7 @@ Expression::operator != (const Expression &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -262,7 +262,7 @@ Expression::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -290,7 +290,7 @@ Expression::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -316,7 +316,7 @@ Expression::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -343,7 +343,7 @@ Expression::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -374,7 +374,7 @@ Expression::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -452,7 +452,7 @@ Expression::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -482,7 +482,7 @@ Expression::SetFromNode(DataNode *parentNode)
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 9)
if(ival >= 0 && ival < 10)
SetType(ExprType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
......@@ -652,7 +652,7 @@ Expression::SelectDbName()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -683,7 +683,7 @@ Expression::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -714,7 +714,7 @@ Expression::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -745,7 +745,7 @@ Expression::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -815,13 +815,29 @@ Expression::FieldsEqual(int index_, const AttributeGroup *rhs) const
//
// Hank Childs, Tue Jul 19 13:25:53 PDT 2005
// Changed it to 9 for Array expressions.
//
// Kathlen Bonnell, Tue Aug 1 08:26:14 PDT 2006
// Changed it to 10 for Curve expressions.
//
// ****************************************************************************
const int
Expression::GetNumTypes()
{
return 9;
return 10;
}
// ****************************************************************************
// Method: Expression::GetTypeString
//
// Programmer: ?
// Creation: ?
//
// Modifications:
// Kathlen Bonnell, Tue Aug 1 08:26:14 PDT 2006
// Added CurveMeshVar.
//
// ****************************************************************************
const char *
Expression::GetTypeString(const Expression::ExprType t)
{
......@@ -837,6 +853,8 @@ Expression::GetTypeString(const Expression::ExprType t)
return "Symmetric Tensor Mesh Variable";
case ArrayMeshVar:
return "Array Mesh Variable";
case CurveMeshVar:
return "Curve Mesh Variable";
case Mesh:
return "Mesh";
case Material:
......@@ -848,6 +866,18 @@ Expression::GetTypeString(const Expression::ExprType t)
}
}
// ****************************************************************************
// Method: Expression::GetTypeId
//
// Programmer: ?
// Creation: ?
//
// Modifications:
// Kathlen Bonnell, Tue Aug 1 08:26:14 PDT 2006
// Added CurveMeshVar.
//
// ****************************************************************************
const Expression::ExprType
Expression::GetTypeId(const std::string s)
{
......@@ -861,6 +891,8 @@ Expression::GetTypeId(const std::string s)
return SymmetricTensorMeshVar;
else if (s == "Array Mesh Variable")
return ArrayMeshVar;
else if (s == "Curve Mesh Variable")
return CurveMeshVar;
else if (s == "Mesh")
return Mesh;
else if (s == "Material")
......
......@@ -13,16 +13,32 @@ Definition:
//
// Hank Childs, Tue Jul 19 13:25:53 PDT 2005
// Changed it to 9 for Array expressions.
//
// Kathlen Bonnell, Tue Aug 1 08:26:14 PDT 2006
// Changed it to 10 for Curve expressions.
//
// ****************************************************************************
const int
Expression::GetNumTypes()
{
return 9;
return 10;
}
Function: GetTypeString
Declaration: static const char * GetTypeString(const Expression::ExprType t);
Definition:
// ****************************************************************************
// Method: Expression::GetTypeString
//
// Programmer: ?
// Creation: ?
//
// Modifications:
// Kathlen Bonnell, Tue Aug 1 08:26:14 PDT 2006
// Added CurveMeshVar.
//
// ****************************************************************************
const char *
Expression::GetTypeString(const Expression::ExprType t)
{
......@@ -38,6 +54,8 @@ Expression::GetTypeString(const Expression::ExprType t)
return "Symmetric Tensor Mesh Variable";
case ArrayMeshVar:
return "Array Mesh Variable";
case CurveMeshVar:
return "Curve Mesh Variable";
case Mesh:
return "Mesh";
case Material:
......@@ -52,6 +70,18 @@ Expression::GetTypeString(const Expression::ExprType t)
Function: GetTypeId
Declaration: static const Expression::ExprType GetTypeId(const std::string s);
Definition:
// ****************************************************************************
// Method: Expression::GetTypeId
//
// Programmer: ?
// Creation: ?
//
// Modifications:
// Kathlen Bonnell, Tue Aug 1 08:26:14 PDT 2006
// Added CurveMeshVar.
//
// ****************************************************************************
const Expression::ExprType
Expression::GetTypeId(const std::string s)
{
......@@ -65,6 +95,8 @@ Expression::GetTypeId(const std::string s)
return SymmetricTensorMeshVar;
else if (s == "Array Mesh Variable")
return ArrayMeshVar;
else if (s == "Curve Mesh Variable")
return CurveMeshVar;
else if (s == "Mesh")
return Mesh;
else if (s == "Material")
......
......@@ -50,7 +50,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jul 19 13:43:39 PST 2005
// Creation: Wed Aug 2 17:42:31 PST 2006
//
// Modifications:
//
......@@ -67,6 +67,7 @@ public:
TensorMeshVar,
SymmetricTensorMeshVar,
ArrayMeshVar,
CurveMeshVar,
Mesh,
Material,
Species
......
......@@ -7,6 +7,7 @@
TensorMeshVar
SymmetricTensorMeshVar
ArrayMeshVar
CurveMeshVar
Mesh
Material
Species
......
......@@ -3165,14 +3165,19 @@ avtSpeciesMetaData::Print(ostream &out, int indent) const
// Hank Childs, Mon Feb 14 14:16:49 PST 2005
// Added original name.
//
// Kathleen Bonnell, Thu Aug 3 08:42:33 PDT 2006
// Added centering and DataExtents.
//
// ****************************************************************************
avtCurveMetaData::avtCurveMetaData()
: AttributeSubject("sssssbs")
: AttributeSubject("ssssssibbdd")
{
xLabel = "X-Axis";
yLabel = "Y-Axis";
validVariable = true;
centering = AVT_NODECENT;
hasDataExtents = false;
}
......@@ -3192,16 +3197,51 @@ avtCurveMetaData::avtCurveMetaData()
// Hank Childs, Mon Feb 14 14:16:49 PST 2005
// Added original name.
//
// Kathleen Bonnell, Thu Aug 3 08:42:33 PDT 2006
// Added centering and DataExtents.
//
// ****************************************************************************
avtCurveMetaData::avtCurveMetaData(std::string n)
: AttributeSubject("sssssbs")
: AttributeSubject("ssssssibbdd")
{
name = n;
originalName = name;
xLabel = "X-Axis";
yLabel = "Y-Axis";
validVariable = true;
centering = AVT_NODECENT;
hasDataExtents = false;
}
// ****************************************************************************
// Method: avtCurveMetaData constructor
//
// Arguments:
// n The name of the curve
// minE The minimum data extents
// maxE The maximum data extents
//
// Programmer: Kathleen Bonnell
// Creation: August 1, 2006
//
// Modifications:
//
// ****************************************************************************
avtCurveMetaData::avtCurveMetaData(std::string n, double minE, double maxE)
: AttributeSubject("ssssssibbdd")
{
name = n;
originalName = name;
xLabel = "X-Axis";
yLabel = "Y-Axis";
validVariable = true;
centering = AVT_NODECENT;
hasDataExtents = true;
minDataExtents = minE;
maxDataExtents = maxE;
}
......@@ -3221,18 +3261,25 @@ avtCurveMetaData::avtCurveMetaData(std::string n)
// Hank Childs, Mon Feb 14 14:16:49 PST 2005
// Added original name.
//
// Kathleen Bonnell, Thu Aug 3 08:42:33 PDT 2006
// Added centering and DataExtents.
//
// ****************************************************************************
avtCurveMetaData::avtCurveMetaData(const avtCurveMetaData &rhs)
: AttributeSubject("sssssbs")
: AttributeSubject("ssssssibbdd")
{
name = rhs.name;
originalName = rhs.originalName;
xUnits = rhs.xUnits;
xLabel = rhs.xLabel;
yUnits = rhs.yUnits;
yLabel = rhs.yLabel;
validVariable = rhs.validVariable;
name = rhs.name;
originalName = rhs.originalName;
xUnits = rhs.xUnits;
xLabel = rhs.xLabel;
yUnits = rhs.yUnits;
yLabel = rhs.yLabel;
validVariable = rhs.validVariable;
centering = rhs.centering;
hasDataExtents = rhs.hasDataExtents;
minDataExtents = rhs.minDataExtents;
maxDataExtents = rhs.maxDataExtents;
}
......@@ -3265,18 +3312,25 @@ avtCurveMetaData::~avtCurveMetaData()
// Hank Childs, Mon Feb 14 14:16:49 PST 2005
// Added original name.
//
// Kathleen Bonnell, Thu Aug 3 08:42:33 PDT 2006
// Added centering and DataExtents.
//
// ****************************************************************************
const avtCurveMetaData &
avtCurveMetaData::operator=(const avtCurveMetaData &rhs)
{
name = rhs.name;
originalName = rhs.originalName;
xUnits = rhs.xUnits;
xLabel = rhs.xLabel;
yUnits = rhs.yUnits;
yLabel = rhs.yLabel;
validVariable = rhs.validVariable;
name = rhs.name;
originalName = rhs.originalName;
xUnits = rhs.xUnits;
xLabel = rhs.xLabel;
yUnits = rhs.yUnits;
yLabel = rhs.yLabel;
validVariable = rhs.validVariable;
centering = rhs.centering;
hasDataExtents = rhs.hasDataExtents;
minDataExtents = rhs.minDataExtents;
maxDataExtents = rhs.maxDataExtents;
return *this;
}
......@@ -3295,21 +3349,59 @@ avtCurveMetaData::operator=(const avtCurveMetaData &rhs)
// Hank Childs, Mon Feb 14 14:16:49 PST 2005
// Added original name.
//
// Kathleen Bonnell, Thu Aug 3 08:42:33 PDT 2006
// Added centering and DataExtents.
//
// ****************************************************************************
void
avtCurveMetaData::SelectAll()
{
Select(0, (void*)&name);
Select(1, (void*)&xUnits);
Select(2, (void*)&xLabel);
Select(3, (void*)&yUnits);
Select(4, (void*)&yLabel);
Select(5, (void*)&validVariable);
Select(6, (void*)&originalName);
Select( 0, (void*)&name);
Select( 1, (void*)&originalName);
Select( 2, (void*)&xUnits);
Select( 3, (void*)&xLabel);
Select( 4, (void*)&yUnits);
Select( 5, (void*)&yLabel);
Select( 6, (void*)&centering);
Select( 7, (void*)&validVariable);
Select( 8, (void*)&hasDataExtents);
Select( 9, (void*)&minDataExtents);
Select(10, (void*)&maxDataExtents);
}
// ****************************************************************************
// Method: avtCurveMetaData::SetExtents
//
// Purpose:
// Sets the extents of the curve variable.
//
// Arguments:
// extents Extents as <min value, max value>.
//
// Programmer: Kathleen Bonnell
// Creation: August 1, 2006
//
// Modifications:
//
// ****************************************************************************
void
avtCurveMetaData::SetExtents(const double *extents)
{
if (extents == NULL)
{
hasDataExtents = false;
}
else
{
hasDataExtents = true;
minDataExtents = extents[0];
maxDataExtents = extents[1];
}
}
// ****************************************************************************
// Method: avtCurveMetaData::Print
//
......@@ -3330,6 +3422,9 @@ avtCurveMetaData::SelectAll()
// Hank Childs, Mon Feb 14 14:16:49 PST 2005
// Added original name.
//
// Kathleen Bonnell, Thu Aug 3 08:42:33 PDT 2006
// Added centering and DataExtents.
//
// ****************************************************************************
void
......@@ -3348,12 +3443,42 @@ avtCurveMetaData::Print(ostream &out, int indent) const
Indent(out, indent);
out << "Labels = x:" << xLabel.c_str() << ", y:" << yLabel.c_str() << endl;
Indent(out, indent);
out << "Centering = ";
switch (centering)
{
case AVT_NODECENT:
out << "node centered.";
break;
case AVT_ZONECENT:
out << "zone centered.";
break;
case AVT_UNKNOWN_CENT:
default:
out << "unknowing centering.";
break;
}
out << endl;
if (!validVariable)
{
Indent(out, indent);
out << "THIS IS NOT A VALID VARIABLE." << endl;
}
if (hasDataExtents)
{
Indent(out, indent);
out << "Extents are: (" << minDataExtents << ", "
<< maxDataExtents << ")" << endl;
}
else
{
Indent(out, indent);
out << "The extents are not set." << endl;
}