Commit 2222bd99 authored by hrchilds's avatar hrchilds

Update from July 1, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@25 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6ee7b811
......@@ -220,6 +220,9 @@ $0 = shift @ARGV;
# parallel launcher only when the number of processors was actually
# set. I added support for "bsub" as a launcher.
#
# Akira Haddox, Tue Jul 1 12:56:14 PDT 2003
# Added the makemili tool.
#
###############################################################################
......@@ -255,6 +258,7 @@ USAGE: visit [arguments]
Program arguments:
-gui Run with the Graphical User Interface (default)
-cli Run with the Command Line Interface
-makemili Runs the .mili file generator
-text2polys Runs a utility which generators polygons from text
-time_annotation Creates graphical annotation for position in time.
-silex Run the Silo Explorer
......@@ -397,6 +401,7 @@ while (scalar(@ARGV) > 0) {
elsif ($arg eq "-xml2java") { $exe_name = "xml2java"; }
elsif ($arg eq "-xmltest") { $exe_name = "xmltest"; }
elsif ($arg eq "-xmledit") { $exe_name = "xmledit"; }
elsif ($arg eq "-makemili" ) { $exe_name = "makemili"; }
elsif ($arg eq "-silex" ) { $exe_name = "silex"; }
elsif ($arg eq "-text2polys" ) { $exe_name = "text2polys"; }
elsif ($arg eq "-time_annotation" ) { $exe_name = "time_annotation"; }
......@@ -520,9 +525,21 @@ if ((($parallel) or ($launchengine)) and
$time_set=0;
$nodes_set=0;
# If we didn't specify a location for the engine, assume localhost.
push @visitargs, "-launchengine", "localhost" if (!$launchengine);
push @visitargs, "-launchengine", $launchengine if ($launchengine);
#
# The makemili tool needs these parallel arguments, but to not
# confuse the script, we turn off the parallel flag. So we
# translate the executable name here.
#
if ($exe_name eq "makemili")
{
$exe_name .= "_par";
}
else
{
# If we didn't specify a location for the engine, assume localhost.
push @visitargs, "-launchengine", "localhost" if (!$launchengine);
push @visitargs, "-launchengine", $launchengine if ($launchengine);
}
}
# -----------------------------------------------------------------------------
......@@ -610,6 +627,12 @@ if (!$part_set && (substr($launch,0,4) eq "psub"))
# Determine versions
# -----------------------------------------------------------------------------
# If we still think the exe_name is makemili, we're not running in parallel.
if ($exe_name eq "makemili")
{
$exe_name .= "_ser" if (!$parallel);
}
# Determine the version number of the executable.
if ($exe_name eq "engine")
{
......
/* XPM */
static const char * nodepickmode_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
"+ c #FFFFFF",
" ",
" ",
" .. ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ................. ",
" ................. ",
" ++++++..+++++++++ ",
" ++++++..+++++++++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ++ .. .. ",
" ... .. ",
" .... .. ",
" .... .. ",
" .. .. .. ",
" .. .. .. ",
" .. .... ",
" .. ... ",
" .. ... ",
" .. .. ",
" ",
" ",
" "};
/* XPM */
static const char * zonepickmode_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
"+ c #FFFFFF",
" ",
" ",
" .. ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ................. ",
" ................. ",
" ++++++..+++++++++ ",
" ++++++..+++++++++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ..++ ",
" ++ ........ ",
" ........ ",
" ... ",
" ... ",
" ... ",
" .. ",
" .. ",
" .. ",
" ........ ",
" ........ ",
" ",
" ",
" "};
......@@ -198,6 +198,9 @@
# Akira Haddox, Thu Jun 12 15:45:26 PDT 2003
# Added PointAttributes.
#
# Hank Childs, Tue Jul 1 09:17:55 PDT 2003
# Added SimilarityTransformAttributes.
#
##############################################################################
##
......@@ -266,6 +269,7 @@ SRC= AnimationAttributes.C \
SILAttributes.C \
SILMatrixAttributes.C \
SILRestrictionAttributes.C \
SimilarityTransformAttributes.C \
SimpleObserver.C \
SphereAttributes.C \
StatusAttributes.C \
......@@ -330,6 +334,7 @@ HDR= AnimationAttributes.h \
SILAttributes.h \
SILMatrixAttributes.h \
SILRestrictionAttributes.h \
SimilarityTransformAttributes.h \
SimpleObserver.h \
SphereAttributes.h \
StatusAttributes.h \
......
This diff is collapsed.
Function: Reset
Declaration: void Reset();
Definition:
void
PickAttributes::Reset()
{
clearWindow = false;
fulfilled = false;
validPick = false;
needTransformMessage = false;
pickLetter = " ";
zoneNumber = -1;
timeStep = -1;
domain = -1;
dimension = -1;
pickPoint[0] = 0;
pickPoint[1] = 0;
pickPoint[2] = 0;
cellPoint[0] = 0;
cellPoint[1] = 0;
cellPoint[2] = 0;
rayPoint1[0] = rayPoint1[1] = rayPoint1[2] = 0;
rayPoint2[0] = rayPoint2[1] = rayPoint2[2] = 0;
activeVariable = " ";
databaseName = " ";
if (!nodes.empty())
nodes.clear();
if (!userSelectedVars.empty())
{
userSelectedVars.clear();
userSelectedVars.push_back("default");
}
if (!nodeCoords.empty())
nodeCoords.clear();
useNodeCoords = false;
logicalCoords = false;
ClearPickVarInfos();
SelectAll();
}
Function: PrintSelf
Declaration: void PrintSelf(ostream &os);
Definition:
// ****************************************************************************
// Method: PickAttributes::PrintSelf
//
// Purpose:
// Prints the contents of this class to the passed stream.
//
// Modifications:
// Kathleen Bonnell, Thu Jun 26 09:31:56 PDT 2003
// Reflect new member names (zoneNumber is now elementNumber, nodes is
// now incidentElements). Differentiate between zone pick and node pick.
//
// ****************************************************************************
void
PickAttributes::PrintSelf(ostream &os)
{
......@@ -64,8 +29,8 @@ PickAttributes::PrintSelf(ostream &os)
os << "domain " << domain << "\n";
os << "active variable: " << activeVariable.c_str() << "\n";
os << "selected variables: ";
for (i = 0; i < userSelectedVars.size(); i++)
os << userSelectedVars[i].c_str() << " ";
for (i = 0; i < variables.size(); i++)
os << variables[i].c_str() << " ";
os << "\n";
if (!needTransformMessage)
{
......@@ -80,12 +45,31 @@ PickAttributes::PrintSelf(ostream &os)
<< cellPoint[1] << ", "
<< cellPoint[2] << ">\n";
}
os << "Zone " << zoneNumber << " ";
os << "Nodes " ;
for (i = 0; i < nodes.size(); i++)
bool printCoords = useNodeCoords && !nodeCoords.empty();
if (pickType == Zone)
{
os << "Zone " << elementNumber << " ";
}
else if (pickType == Node)
{
os << "Node " << elementNumber << " ";
if (printCoords)
{
os << nodeCoords[0].c_str() << "\n";
}
}
if (pickType == Zone)
{
os << "Nodes " ;
}
else if (pickType == Node)
{
os << "Incident Zones " ;
}
for (i = 0; i < incidentElements.size(); i++)
{
os << nodes[i] << " ";
if (useNodeCoords && !nodeCoords.empty())
os << incidentElements[i] << " ";
if (printCoords && pickType == Zone)
{
os << nodeCoords[i].c_str() << "\n";
}
......@@ -104,9 +88,25 @@ PickAttributes::PrintSelf(ostream &os)
Function: CreateOutputString
Declaration: void CreateOutputString(std::string &os);
Definition:
// ****************************************************************************
// Method: PickAttributes::CreateOutputString
//
// Purpose:
// Creates a single output string containing all the information gathered
// from a pick.
//
// Modifications:
// Kathleen Bonnell, Thu Jun 26 09:31:56 PDT 2003
// Reflect new member names (zoneNumber is now elementNumber, nodes is
// now incidentElements). Differentiate between zone pick and node pick.
//
// ****************************************************************************
void
PickAttributes::CreateOutputString(std::string &os)
{
if (!fulfilled)
return;
int i;
char buff[256];
......@@ -157,19 +157,42 @@ PickAttributes::CreateOutputString(std::string &os)
}
os += buff;
sprintf(buff, "Zone: %d\n", zoneNumber);
os += buff;
os += "Nodes: " ;
bool printCoords = useNodeCoords && !nodeCoords.empty();
if (printCoords)
if (pickType == Zone)
{
os += "\n ";
sprintf(buff, "Zone: %d\n", elementNumber);
}
for (i = 0; i < nodes.size(); i++)
else if (pickType == Node)
{
sprintf(buff, "%d ", nodes[i]);
os += buff;
if (!printCoords)
{
sprintf(buff, "Node: %d\n", elementNumber);
}
else
{
sprintf(buff, "Node: %d %s\n", elementNumber,
nodeCoords[0].c_str());
}
}
os += buff;
if (pickType == Zone)
{
os += "Nodes: " ;
if (printCoords)
{
os += "\n ";
}
}
else if (pickType == Node)
{
os += "Incident zones: " ;
}
for (i = 0; i < incidentElements.size(); i++)
{
sprintf(buff, "%d ", incidentElements[i]);
os += buff;
if (printCoords && pickType == Zone)
{
sprintf(buff, "%s\n ", nodeCoords[i].c_str());
os += buff;
......@@ -189,3 +212,41 @@ PickAttributes::CreateOutputString(std::string &os)
}
}
Function: PrepareForNewPick
Declaration: void PrepareForNewPick();
Definition:
// ****************************************************************************
// Method: PickAttributes::PrepareForNewPick
//
// Purpose:
// Clear certain fields in preparation for new pick. These are fields that
// will get filled in during the pick process.
//
// Programmer: Kathleen Bonnell
// Creation: June 26, 2003
//
// Modifications:
//
// ****************************************************************************
void
PickAttributes::PrepareForNewPick()
{
clearWindow = false;
fulfilled = false;
elementNumber = -1;
domain = -1;
dimension = -1;
pickPoint[0] = pickPoint[1] = pickPoint[2] = 0;
cellPoint[0] = cellPoint[1] = cellPoint[2] = 0;
needTransformMessage = false;
if (!incidentElements.empty())
incidentElements.clear();
if (!nodeCoords.empty())
nodeCoords.clear();
ClearPickVarInfos();
}
......@@ -15,7 +15,7 @@ class PickVarInfo;
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:39:59 PST 2003
// Creation: Mon Jun 30 10:39:44 PDT 2003
//
// Modifications:
//
......@@ -24,6 +24,12 @@ class PickVarInfo;
class STATE_API PickAttributes : public AttributeSubject
{
public:
enum PickType
{
Zone,
Node
};
PickAttributes();
PickAttributes(const PickAttributes &obj);
virtual ~PickAttributes();
......@@ -43,8 +49,8 @@ public:
void SelectActiveVariable();
void SelectPickPoint();
void SelectCellPoint();
void SelectNodes();
void SelectUserSelectedVars();
void SelectIncidentElements();
void SelectVariables();
void SelectVarInfo();
void SelectNodeCoords();
void SelectRayPoint1();
......@@ -53,9 +59,8 @@ public:
// Property setting methods
void SetClearWindow(bool clearWindow_);
void SetFulfilled(bool fulfilled_);
void SetValidPick(bool validPick_);
void SetPickLetter(const std::string &pickLetter_);
void SetZoneNumber(int zoneNumber_);
void SetElementNumber(int elementNumber_);
void SetTimeStep(int timeStep_);
void SetDomain(int domain_);
void SetDimension(int dimension_);
......@@ -63,8 +68,8 @@ public:
void SetActiveVariable(const std::string &activeVariable_);
void SetPickPoint(const float *pickPoint_);
void SetCellPoint(const float *cellPoint_);
void SetNodes(const intVector &nodes_);
void SetUserSelectedVars(const stringVector &userSelectedVars_);
void SetIncidentElements(const intVector &incidentElements_);
void SetVariables(const stringVector &variables_);
void SetVarInfo(const AttributeGroupVector &varInfo_);
void SetUseNodeCoords(bool useNodeCoords_);
void SetLogicalCoords(bool logicalCoords_);
......@@ -72,14 +77,14 @@ public:
void SetRayPoint1(const float *rayPoint1_);
void SetRayPoint2(const float *rayPoint2_);
void SetNeedTransformMessage(bool needTransformMessage_);
void SetPickType(PickType pickType_);
// Property getting methods
bool GetClearWindow() const;
bool GetFulfilled() const;
bool GetValidPick() const;
const std::string &GetPickLetter() const;
std::string &GetPickLetter();
int GetZoneNumber() const;
int GetElementNumber() const;
int GetTimeStep() const;
int GetDomain() const;
int GetDimension() const;
......@@ -91,10 +96,10 @@ public:
float *GetPickPoint();
const float *GetCellPoint() const;
float *GetCellPoint();
const intVector &GetNodes() const;
intVector &GetNodes();
const stringVector &GetUserSelectedVars() const;
stringVector &GetUserSelectedVars();
const intVector &GetIncidentElements() const;
intVector &GetIncidentElements();
const stringVector &GetVariables() const;
stringVector &GetVariables();
const AttributeGroupVector &GetVarInfo() const;
AttributeGroupVector &GetVarInfo();
bool GetUseNodeCoords() const;
......@@ -106,6 +111,7 @@ public:
const float *GetRayPoint2() const;
float *GetRayPoint2();
bool GetNeedTransformMessage() const;
PickType GetPickType() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool forceAdd);
......@@ -123,6 +129,12 @@ public:
PickVarInfo &operator [] (int i);
const PickVarInfo &operator [] (int i) const;
// Enum conversion functions
static std::string PickType_ToString(PickType);
static bool PickType_FromString(const std::string &, PickType &);
protected:
static std::string PickType_ToString(int);
public:
// Keyframing methods
virtual std::string GetFieldName(int index) const;
......@@ -131,17 +143,16 @@ public:
virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const;
// User-defined methods
void Reset();
void PrintSelf(ostream &os);
void CreateOutputString(std::string &os);
void PrepareForNewPick();
protected:
AttributeGroup *CreateSubAttributeGroup(int index);
private:
bool clearWindow;
bool fulfilled;
bool validPick;
std::string pickLetter;
int zoneNumber;
int elementNumber;
int timeStep;
int domain;
int dimension;
......@@ -149,8 +160,8 @@ private:
std::string activeVariable;
float pickPoint[3];
float cellPoint[3];
intVector nodes;
stringVector userSelectedVars;
intVector incidentElements;
stringVector variables;
AttributeGroupVector varInfo;
bool useNodeCoords;
bool logicalCoords;
......@@ -158,6 +169,7 @@ private:
float rayPoint1[3];
float rayPoint2[3];
bool needTransformMessage;
int pickType;
};
#endif
<?xml version="1.0"?>
<Attribute name="PickAttributes" codefile="PickAttributes.code" persistent="true" purpose="This class contains attributes used for pick." exportAPI="STATE_API" exportInclude="state_exports.h">
<Field name = "clearWindow" type = "bool"> false </Field>
<Field name = "fulfilled" type = "bool"> false </Field>
<Field name = "validPick" type = "bool"> false </Field>
<Field name = "pickLetter" type = "string"> " " </Field>
<Field name = "zoneNumber" type = "int"> -1 </Field>
<Field name = "timeStep" type = "int"> -1 </Field>
<Field name = "domain" type = "int"> -1 </Field>
<Field name = "dimension" type = "int"> -1 </Field>
<Field name = "databaseName" type = "string"> " " </Field>
<Field name = "activeVariable" type = "string"> " " </Field>
<Field name = "pickPoint" type = "floatArray" length="3"> 0. 0. 0. </Field>
<Field name = "cellPoint" type = "floatArray" length="3"> 0. 0. 0. </Field>
<Field name = "nodes" type = "intVector" > </Field>
<Field name = "userSelectedVars" type = "stringVector" > "default" </Field>
<Field name = "varInfo" type = "attVector" subtype = "PickVarInfo" > </Field>
<Field name = "useNodeCoords" type = "bool"> false </Field>
<Field name = "logicalCoords" type = "bool"> false </Field>
<Field name = "nodeCoords" type = "stringVector"> </Field>
<Field name = "rayPoint1" type = "floatArray" length="3"> 0. 0. 0. </Field>
<Field name = "rayPoint2" type = "floatArray" length="3"> 0. 0. 0. </Field>
<Field name = "needTransformMessage" type = "bool">false </Field>
<Include file="source">stdio.h</Include>
<Include file="header">iostream.h</Include>
<Function name = "Reset" member = "true" user = "true">
<Attribute name="PickAttributes" purpose="This class contains attributes used for pick." persistent="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="PickAttributes.code">
<Enum name="PickType">
Zone
Node
</Enum>
<Field name="clearWindow" label="clearWindow" type="bool" internal="true">
false
</Field>
<Field name="fulfilled" label="fulfilled" type="bool" internal="true">
false
</Field>
<Field name="pickLetter" label="pickLetter" type="string" internal="true">
</Field>
<Field name="elementNumber" label="elementNumber" type="int" internal="true">
-1
</Field>
<Field name="timeStep" label="timeStep" type="int" internal="true">
-1
</Field>
<Field name="domain" label="domain" type="int" internal="true">
-1
</Field>
<Field name="dimension" label="dimension" type="int" internal="true">
-1
</Field>
<Field name="databaseName" label="databaseName" type="string" internal="true">
</Field>
<Field name="activeVariable" label="activeVariable" type="string" internal="true">
</Field>
<Field name="pickPoint" label="pickPoint" type="floatArray" length="3" internal="true">
0.000000
0.000000
0.000000