Commit c4726b7c authored by hrchilds's avatar hrchilds
Browse files

Update from July 8, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@497 18c085ea-50e0-402c-830e-de6fd14e8384
parent ab35a107
......@@ -52,13 +52,13 @@ PickAttributes::PickType_FromString(const std::string &s, PickAttributes::PickTy
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
// ****************************************************************************
PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsbbbbbbssi*bbbbbii*bbi")
PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsbbbbbbssi*bbbbbii*bbii")
{
variables.push_back("default");
displayIncidentElements = true;
......@@ -115,6 +115,7 @@ PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFF
elementIsGlobal = false;
displayPickLetter = true;
ghostType = 0;
hasMixedGhostTypes = -1;
}
// ****************************************************************************
......@@ -126,13 +127,13 @@ PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFF
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
// ****************************************************************************
PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsbbbbbbssi*bbbbbii*bbi")
PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsbbbbbbssi*bbbbbii*bbii")
{
AttributeGroupVector::const_iterator pos;
int i;
......@@ -226,6 +227,7 @@ PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*
elementIsGlobal = obj.elementIsGlobal;
displayPickLetter = obj.displayPickLetter;
ghostType = obj.ghostType;
hasMixedGhostTypes = obj.hasMixedGhostTypes;
SelectAll();
}
......@@ -239,7 +241,7 @@ PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -263,7 +265,7 @@ PickAttributes::~PickAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -365,6 +367,7 @@ PickAttributes::operator = (const PickAttributes &obj)
elementIsGlobal = obj.elementIsGlobal;
displayPickLetter = obj.displayPickLetter;
ghostType = obj.ghostType;
hasMixedGhostTypes = obj.hasMixedGhostTypes;
SelectAll();
return *this;
......@@ -379,7 +382,7 @@ PickAttributes::operator = (const PickAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -487,7 +490,8 @@ PickAttributes::operator == (const PickAttributes &obj) const
(globalIncidentElements == obj.globalIncidentElements) &&
(elementIsGlobal == obj.elementIsGlobal) &&
(displayPickLetter == obj.displayPickLetter) &&
(ghostType == obj.ghostType));
(ghostType == obj.ghostType) &&
(hasMixedGhostTypes == obj.hasMixedGhostTypes));
}
// ****************************************************************************
......@@ -499,7 +503,7 @@ PickAttributes::operator == (const PickAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -520,7 +524,7 @@ PickAttributes::operator != (const PickAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -541,7 +545,7 @@ PickAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -569,7 +573,7 @@ PickAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -595,7 +599,7 @@ PickAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -622,7 +626,7 @@ PickAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -689,6 +693,7 @@ PickAttributes::SelectAll()
Select(55, (void *)&elementIsGlobal);
Select(56, (void *)&displayPickLetter);
Select(57, (void *)&ghostType);
Select(58, (void *)&hasMixedGhostTypes);
}
// ****************************************************************************
......@@ -700,7 +705,7 @@ PickAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -1316,6 +1321,13 @@ PickAttributes::SetGhostType(int ghostType_)
Select(57, (void *)&ghostType);
}
void
PickAttributes::SetHasMixedGhostTypes(int hasMixedGhostTypes_)
{
hasMixedGhostTypes = hasMixedGhostTypes_;
Select(58, (void *)&hasMixedGhostTypes);
}
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -1818,6 +1830,12 @@ PickAttributes::GetGhostType() const
return ghostType;
}
int
PickAttributes::GetHasMixedGhostTypes() const
{
return hasMixedGhostTypes;
}
///////////////////////////////////////////////////////////////////////////////
// Select property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -1985,7 +2003,7 @@ PickAttributes::SelectGlobalIncidentElements()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2010,7 +2028,7 @@ PickAttributes::AddPickVarInfo(const PickVarInfo &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2038,7 +2056,7 @@ PickAttributes::ClearPickVarInfos()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2073,7 +2091,7 @@ PickAttributes::RemovePickVarInfo(int index)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2094,7 +2112,7 @@ PickAttributes::GetNumPickVarInfos() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2115,7 +2133,7 @@ PickAttributes::GetPickVarInfo(int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2136,7 +2154,7 @@ PickAttributes::GetPickVarInfo(int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2157,7 +2175,7 @@ PickAttributes::operator [] (int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2182,7 +2200,7 @@ PickAttributes::operator [] (int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2251,6 +2269,7 @@ PickAttributes::GetFieldName(int index) const
case 55: return "elementIsGlobal";
case 56: return "displayPickLetter";
case 57: return "ghostType";
case 58: return "hasMixedGhostTypes";
default: return "invalid index";
}
}
......@@ -2264,7 +2283,7 @@ PickAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2333,6 +2352,7 @@ PickAttributes::GetFieldType(int index) const
case 55: return FieldType_bool;
case 56: return FieldType_bool;
case 57: return FieldType_int;
case 58: return FieldType_int;
default: return FieldType_unknown;
}
}
......@@ -2346,7 +2366,7 @@ PickAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2415,6 +2435,7 @@ PickAttributes::GetFieldTypeName(int index) const
case 55: return "bool";
case 56: return "bool";
case 57: return "int";
case 58: return "int";
default: return "invalid index";
}
}
......@@ -2428,7 +2449,7 @@ PickAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -2772,6 +2793,11 @@ PickAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (ghostType == obj.ghostType);
}
break;
case 58:
{ // new scope
retval = (hasMixedGhostTypes == obj.hasMixedGhostTypes);
}
break;
default: retval = false;
}
......@@ -3329,6 +3355,9 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
// Kathleen Bonnell, Thu Oct 21 15:17:05 PDT 2004
// Reset requiresPickGlyph.
//
// Kathleen Bonnell, Fri Jul 8 14:27:26 PDT 2005
// Reset hasMixedGhostTypes.
//
// ****************************************************************************
void
......@@ -3344,6 +3373,7 @@ PickAttributes::PrepareForNewPick()
nodePoint[0] = nodePoint[1] = nodePoint[2] = 0;
needTransformMessage = false;
ghostType = 0;
hasMixedGhostTypes = -1;
if (!incidentElements.empty())
incidentElements.clear();
......
......@@ -554,6 +554,9 @@ Definition:
// Kathleen Bonnell, Thu Oct 21 15:17:05 PDT 2004
// Reset requiresPickGlyph.
//
// Kathleen Bonnell, Fri Jul 8 14:27:26 PDT 2005
// Reset hasMixedGhostTypes.
//
// ****************************************************************************
void
......@@ -569,6 +572,7 @@ PickAttributes::PrepareForNewPick()
nodePoint[0] = nodePoint[1] = nodePoint[2] = 0;
needTransformMessage = false;
ghostType = 0;
hasMixedGhostTypes = -1;
if (!incidentElements.empty())
incidentElements.clear();
......
......@@ -15,7 +15,7 @@ class PickVarInfo;
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Jun 28 14:39:58 PST 2005
// Creation: Fri Jul 8 14:27:50 PST 2005
//
// Modifications:
//
......@@ -133,6 +133,7 @@ public:
void SetElementIsGlobal(bool elementIsGlobal_);
void SetDisplayPickLetter(bool displayPickLetter_);
void SetGhostType(int ghostType_);
void SetHasMixedGhostTypes(int hasMixedGhostTypes_);
// Property getting methods
const stringVector &GetVariables() const;
......@@ -218,6 +219,7 @@ public:
bool GetElementIsGlobal() const;
bool GetDisplayPickLetter() const;
int GetGhostType() const;
int GetHasMixedGhostTypes() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -314,6 +316,7 @@ private:
bool elementIsGlobal;
bool displayPickLetter;
int ghostType;
int hasMixedGhostTypes;
};
#endif
......@@ -179,6 +179,9 @@
<Field name="ghostType" label="ghostType" type="int" internal="true">
0
</Field>
<Field name="hasMixedGhostTypes" label="hasMixedGhostTypes" type="int" internal="true">
-1
</Field>
<Function name="PrintSelf" user="true" member="true">
</Function>
<Function name="CreateOutputString" user="true" member="true">
......
......@@ -120,6 +120,12 @@ avtLocateCellQuery::~avtLocateCellQuery()
// Kathleen Bonnell, Wed Oct 20 17:10:21 PDT 2004
// Use vtkVisItUtility method for computing cell center.
//
// Kathleen Bonnell, Fri Jul 8 14:15:21 PDT 2005
// Added another option when zones are preserved -- to determine
// whether the ghost zones are mixed (AMR & other types) or simply AMR --
// will be used by PickQuery in determining the correct zone id to display
// to the user.
//
// ****************************************************************************
void
......@@ -175,11 +181,18 @@ avtLocateCellQuery::Execute(vtkDataSet *ds, const int dom)
<< " cells but the array was not found in the dataset."
<< endl;
}
else if (info.GetValidity().GetZonesPreserved() &&
info.GetAttributes().GetContainsGhostZones()
!= AVT_CREATED_GHOSTS)
else if (info.GetValidity().GetZonesPreserved())
{
foundElement = foundCell;
if (info.GetAttributes().GetContainsGhostZones()
!= AVT_CREATED_GHOSTS)
{
foundElement = foundCell;
}
else
{
pickAtts.SetHasMixedGhostTypes(
vtkVisItUtility::ContainsMixedGhostZoneTypes(ds));
}
}
//
......
......@@ -80,6 +80,10 @@ avtLocateNodeQuery::~avtLocateNodeQuery()
// Hank Childs, Thu Mar 10 10:27:57 PST 2005
// Fix memory leak.
//
// Kathleen Bonnell, Fri Jul 8 14:15:21 PDT 2005
// Set foundElement = foundNode when points not transformed only if
// ghost zones not created.
//
// ****************************************************************************
void
......@@ -143,17 +147,13 @@ avtLocateNodeQuery::Execute(vtkDataSet *ds, const int dom)
int comp = origNodes->GetNumberOfComponents() -1;
foundElement = (int) origNodes->GetComponent(foundNode, comp);
}
else if (info.GetValidity().GetZonesPreserved() &&
else if ((info.GetValidity().GetZonesPreserved() ||
!info.GetValidity().GetPointsWereTransformed()) &&
info.GetAttributes().GetContainsGhostZones()
!= AVT_CREATED_GHOSTS)
{
foundElement = foundNode;
}
else if (!info.GetValidity().GetPointsWereTransformed())
{
// Points were not transformed, so node id found here is valid.
foundElement = foundNode;
}
// else ... Zones not preserved or we created ghosts, or points
// were transformed, so node id found here is not valid, so don't
// set it.
......
......@@ -98,6 +98,11 @@ avtNodePickQuery::~avtNodePickQuery()
// the ghost array is available, we don't have the picked node right
// away and the ds is structured).
//
// Kathleen Bonnell, Fri Jul 8 14:15:21 PDT 2005
// Changed test for determining if the 'real' id needs to be calculated.
// Also, transform the point to be used as 'pick letter' when this
// pick did not use the locate query to determine that point.
//
// ****************************************************************************
void
......@@ -114,14 +119,17 @@ avtNodePickQuery::Execute(vtkDataSet *ds, const int dom)
int pickedNode = pickAtts.GetElementNumber();
int type = ds->GetDataObjectType();
bool hasGhosts = (ds->GetCellData()->GetArray("avtGhostZones") != NULL);
//
// We may need the real id when picking on a Contour plot of
// an AMR dataset.
//
int needRealId = (pickedNode == -1 && hasGhosts &&
ghostType == AVT_CREATED_GHOSTS &&
(type == VTK_STRUCTURED_GRID || type == VTK_RECTILINEAR_GRID));
bool needRealId = false;
if (pickedNode == -1 && ghostType == AVT_CREATED_GHOSTS &&
(type == VTK_STRUCTURED_GRID || type == VTK_RECTILINEAR_GRID))
{
needRealId = vtkVisItUtility::ContainsMixedGhostZoneTypes(ds);
}
if (pickedNode == -1)
{
......@@ -254,7 +262,17 @@ avtNodePickQuery::Execute(vtkDataSet *ds, const int dom)
//
if (transform != NULL)
{
pickAtts.SetPickPoint(pickAtts.GetNodePoint());
if (!skippedLocate)
{
pickAtts.SetPickPoint(pickAtts.GetNodePoint());
}
else
{
avtVector v1(pickAtts.GetCellPoint());
v1 = (*transform) *v1;
float pp[3] = {v1.x, v1.y, v1.z};
pickAtts.SetPickPoint(pp);
}
}
else if (pickAtts.GetNeedTransformMessage())
{
......
......@@ -102,6 +102,9 @@ avtZonePickQuery::SetInvTransform(const avtMatrix *m)
// were Created, we have the Ghosts array and the data is structured.
// E.g. when we are picking on the Contour plot of AMR data.
//
// Kathleen Bonnell, Fri Jul 8 14:15:21 PDT 2005
// Modified test for determining if 'real' id needs to be calculated.
//
// ****************************************************************************
void
......@@ -118,14 +121,24 @@ avtZonePickQuery::Execute(vtkDataSet *ds, const int dom)
int pickedZone = pickAtts.GetElementNumber();
int type = ds->GetDataObjectType();
bool hasGhosts = (ds->GetCellData()->GetArray("avtGhostZones") != NULL);
//
// We may need the real Id when we are picking on a Contour of an
// AMR mesh.
//
int needRealId = (pickedZone == -1 && hasGhosts &&
ghostType == AVT_CREATED_GHOSTS &&
(type == VTK_STRUCTURED_GRID || type == VTK_RECTILINEAR_GRID));
bool needRealId = false;
if (pickedZone == -1 && ghostType == AVT_CREATED_GHOSTS &&
(type == VTK_STRUCTURED_GRID || type == VTK_RECTILINEAR_GRID))
{
if (pickAtts.GetHasMixedGhostTypes() == -1)
{
needRealId = vtkVisItUtility::ContainsMixedGhostZoneTypes(ds);
}
else
{
needRealId = (pickAtts.GetHasMixedGhostTypes() == 1);
}
}
if (pickedZone == -1)
{
......
<?xml version="1.0"?>
<Plugin name="ANSYS" type="database" label="ANSYS" version="1.0" enabled="true" mdspecificcode="true" onlyengine="false" noengine="false" dbtype="STSD" haswriter="false" hasoptions="false">
<Extensions>
inp
</Extensions>
<Attribute name="" purpose="" persistent="false">
</Attribute>
</Plugin>
#include <ANSYSPluginInfo.h>
#include <avtANSYSFileFormat.h>
#include <avtSTSDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: ANSYSCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a ANSYS database.
//
// Programmer: whitlocb -- generated by xml2info
// Creation: Wed Jul 6 22:10:40 PST 2005
//
// ****************************************************************************
DatabaseType
ANSYSCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_STSD;
}
// ****************************************************************************
// Method: ANSYSCommonPluginInfo::GetDefaultExtensions
//
// Purpose:
// Returns the default extensions for a ANSYS database.
//
// Programmer: whitlocb -- generated by xml2info
// Creation: Wed Jul 6 22:10:40 PST 2005
//
// ****************************************************************************
std::vector<std::string>
ANSYSCommonPluginInfo::GetDefaultExtensions()
{
std::vector<std::string> defaultExtensions;
defaultExtensions.push_back("inp");
return defaultExtensions;
}
// ****************************************************************************
// Method: ANSYSCommonPluginInfo::SetupANSYSDatabase
//
// Purpose:
// Sets up a ANSYS database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A ANSYS database from list.
//
// Programmer: whitlocb -- generated by xml2info
// Creation: Wed Jul 6 22:10:40 PST 2005
//
// ****************************************************************************
avtDatabase *
ANSYSCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
avtSTSDFileFormat ***ffl = new avtSTSDFileFormat**[nList];
int nTimestep = nList / nBlock;
for (int i = 0 ; i < nTimestep ; i++)
{
ffl