Commit 7e889ce6 authored by bonnell's avatar bonnell

Add more support for mesh group names, fix a couple of issues with xml2info

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21713 18c085ea-50e0-402c-830e-de6fd14e8384
parent eb788ba7
......@@ -5003,6 +5003,9 @@ avtGenericDatabase::ActivateTimestep(int stateIndex)
// Hank Childs, Tue Dec 15 14:55:50 PST 2009
// Add support for group IDs based on ranges.
//
// Kathleen Biagas, Tue Aug 27 16:58:30 PDT 2013
// Add support for groupNames.
//
// ****************************************************************************
void
......@@ -5039,6 +5042,7 @@ avtGenericDatabase::ReadDataset(avtDatasetCollection &ds, intVector &domains,
sprintf(progressString, "Reading from %s", Interface->GetType());
stringVector blockNames;
stringVector groupNames;
intVector gIds;
intVector groupIdsBasedOnRange;
int domOrigin = 0;
......@@ -5051,6 +5055,7 @@ avtGenericDatabase::ReadDataset(avtDatasetCollection &ds, intVector &domains,
blockNames = GetMetaData(ts)->GetMesh(meshName)->blockNames;
domOrigin = GetMetaData(ts)->GetMesh(meshName)->blockOrigin;
grpOrigin = GetMetaData(ts)->GetMesh(meshName)->groupOrigin;
groupNames = GetMetaData(ts)->GetMesh(meshName)->groupNames;
gIds = GetMetaData(ts)->GetMesh(meshName)->groupIds;
groupIdsBasedOnRange = GetMetaData(ts)->GetMesh(meshName)->groupIdsBasedOnRange;
}
......@@ -5188,7 +5193,9 @@ avtGenericDatabase::ReadDataset(avtDatasetCollection &ds, intVector &domains,
else if (subT == AVT_GROUP_SUBSET)
{
char temp[512];
if (gIds.size() != 0)
if (!groupNames.empty() && !gIds.empty())
sprintf(temp, "%s", groupNames[gIds[i]].c_str());
else if (gIds.size() != 0)
sprintf(temp, "%d", gIds[domains[i]]);
else
{
......
......@@ -359,3 +359,4 @@ StatisticalTrendsViewerPluginInfo::XPMIconData() const
{
return StatisticalTrends_xpm;
}
......@@ -226,6 +226,9 @@ Definition:
// Hank Childs, Tue Dec 15 15:08:41 PST 2009
// Add support for groups based on ranges.
//
// Kathleen Biagas, Tue Aug 27 16:59:10 PDT 2013
// Add support for groupNames.
//
// ****************************************************************************
#include <stdio.h>
......@@ -305,7 +308,14 @@ SubsetViewerPluginInfo::PrivateSetPlotAtts(AttributeSubject *atts,
debug5 << "Variable for subset plot is a group Mesh." << endl;
subsetAtts->SetSubsetType(SubsetAttributes::Group);
defaultAtts->SetSubsetType(SubsetAttributes::Group);
if (mesh->groupIds.size() > 0)
if (!mesh->groupNames.empty())
{
for (size_t i = 0; i < mesh->groupNames.size(); ++i)
{
sv.push_back(mesh->groupNames[i]);
}
}
else if (mesh->groupIds.size() > 0)
{
for (size_t i = 0; i < mesh->groupIds.size(); i++)
{
......
......@@ -404,6 +404,9 @@ SubsetViewerPluginInfo::XPMIconData() const
// Hank Childs, Tue Dec 15 15:08:41 PST 2009
// Add support for groups based on ranges.
//
// Kathleen Biagas, Tue Aug 27 16:59:10 PDT 2013
// Add support for groupNames.
//
// ****************************************************************************
#include <stdio.h>
......@@ -483,7 +486,14 @@ SubsetViewerPluginInfo::PrivateSetPlotAtts(AttributeSubject *atts,
debug5 << "Variable for subset plot is a group Mesh." << endl;
subsetAtts->SetSubsetType(SubsetAttributes::Group);
defaultAtts->SetSubsetType(SubsetAttributes::Group);
if (mesh->groupIds.size() > 0)
if (!mesh->groupNames.empty())
{
for (size_t i = 0; i < mesh->groupNames.size(); ++i)
{
sv.push_back(mesh->groupNames[i]);
}
}
else if (mesh->groupIds.size() > 0)
{
for (size_t i = 0; i < mesh->groupIds.size(); i++)
{
......
......@@ -44,7 +44,6 @@
#include <VolumeAttributes.h>
#include <visit-config.h>
VISIT_PLUGIN_VERSION(Volume,PLOT_EXPORT)
// ****************************************************************************
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......@@ -1752,30 +1752,33 @@ class InfoGeneratorPlugin : public Plugin
c << "}" << endl;
}
c << endl;
funcName = name + "ViewerPluginInfo::GetClientAtts";
if(!ReplaceBuiltin(c, funcName + "3"))
if (type=="operator")
{
c << "// ****************************************************************************" << endl;
c << "// Method: "<<funcName<< endl;
c << "//" << endl;
c << "// Purpose:" << endl;
c << "// Get the viewer client attributes." << endl;
c << "//" << endl;
c << "// Arguments:" << endl;
c << "// atts A pointer to return the client default attributes in." << endl;
c << "//" << endl;
c << "// Programmer: generated by xml2info" << endl;
c << "// Creation: omitted"<< endl;
c << "//" << endl;
c << "// ****************************************************************************" << endl;
funcName = name + "ViewerPluginInfo::GetClientAtts";
if(!ReplaceBuiltin(c, funcName + "3"))
{
c << "// ****************************************************************************" << endl;
c << "// Method: "<<funcName<< endl;
c << "//" << endl;
c << "// Purpose:" << endl;
c << "// Get the viewer client attributes." << endl;
c << "//" << endl;
c << "// Arguments:" << endl;
c << "// atts A pointer to return the client default attributes in." << endl;
c << "//" << endl;
c << "// Programmer: generated by xml2info" << endl;
c << "// Creation: omitted"<< endl;
c << "//" << endl;
c << "// ****************************************************************************" << endl;
c << endl;
c << "void" << endl;
c << funcName<<"(AttributeSubject *atts, const bool, const bool)" << endl;
c << "{" << endl;
c << " GetClientAtts(atts);" << endl;
c << "}" << endl;
}
c << endl;
c << "void" << endl;
c << funcName<<"(AttributeSubject *atts, const bool, const bool)" << endl;
c << "{" << endl;
c << " GetClientAtts(atts);" << endl;
c << "}" << endl;
}
c << endl;
if (type=="plot")
{
......@@ -1926,7 +1929,7 @@ class InfoGeneratorPlugin : public Plugin
c << endl;
c << "void" << endl;
c << funcName<<"(AttributeSubject *atts," << endl
<< " const ViewerPlot *)" << endl;
<< " ViewerPlot *)" << endl;
c << "{" << endl;
c << " *("<<atts->name<<"*)atts = *defaultAtts;" << endl;
c << "}" << endl;
......
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