Commit ed42e8c2 authored by miller86's avatar miller86

* Updates for newer silo library

** Should still compile with older versions of Silo
** DBSet/GetDataReadMask interface changed to unsigned long long
** Added missing data support
** Added support for curves in polar coordinates defined by the file
** Added support for Label variables including arbitrary number of sub-variables in label variables
* Adjusted Label plot to support vtkCharArrays in addition to vtkUnsignedCharArrays
* Fixed misspellings in an error message in avtStructuredDomainBoundaries


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22894 18c085ea-50e0-402c-830e-de6fd14e8384
parent b5c08992
......@@ -1526,7 +1526,7 @@ avtStructuredDomainBoundaries::SetExtents(int domain, int e[6])
if (domain >= wholeBoundary.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
"targeted domain more than number of domains");
wholeBoundary[domain].domain = domain;
wholeBoundary[domain].SetExtents(e);
......@@ -1569,7 +1569,7 @@ avtStructuredDomainBoundaries::AddNeighbor(int domain, int d, int mi, int o[3],
if (domain >= wholeBoundary.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
"targeted domain more than number of domains");
wholeBoundary[domain].AddNeighbor(d, mi, o, e, rr, ref_ratio, nr);
}
......@@ -1593,7 +1593,7 @@ avtStructuredDomainBoundaries::Finish(int domain)
if (domain >= wholeBoundary.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
"targeted domain more than number of domains");
wholeBoundary[domain].Finish();
}
......@@ -3470,7 +3470,7 @@ avtStructuredDomainBoundaries::SetIndicesForAMRPatch(int domain,
if (domain >= levels.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
"targeted domain more than number of domains");
levels[domain] = level;
maxAMRLevel = (maxAMRLevel > level+1 ? maxAMRLevel : level+1);
......@@ -3989,7 +3989,7 @@ avtStructuredDomainBoundaries::GetExtents(int domain, int e[6])
if (domain >= wholeBoundary.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
"targeted domain more than number of domains");
e[0] = wholeBoundary[domain].oldnextents[0];
e[1] = wholeBoundary[domain].oldnextents[1];
......
......@@ -85,7 +85,8 @@ VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR ${VISITHOME}/pyside/1.1.1/${VISITARCH}/)
##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.9.1/${VISITARCH})
#VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.9.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR /Users/miller86/silo/trunk/my_install)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
......
This diff is collapsed.
......@@ -1441,7 +1441,7 @@ avtSiloWriter::WriteUnstructuredMesh(DBfile *dbfile, vtkUnstructuredGrid *ug,
if (npointcells == nzones && npointcells == npts)
{
DBPutPointmesh(dbfile, meshName.c_str(), dim, coords,
DBPutPointmesh(dbfile, meshName.c_str(), dim, (DB_DTPTR2) coords,
npts, coordType, optlist);
}
else
......@@ -1463,7 +1463,7 @@ avtSiloWriter::WriteUnstructuredMesh(DBfile *dbfile, vtkUnstructuredGrid *ug,
//
// Now write the actual mesh.
//
DBPutUcdmesh(dbfile, (char *) meshName.c_str(), dim, NULL, coords, npts,
DBPutUcdmesh(dbfile, (char *) meshName.c_str(), dim, NULL, (DB_DTPTR2) coords, npts,
nzones, "zonelist", NULL, coordType, optlist);
}
EndVar(dbfile, nlevels);
......@@ -1580,7 +1580,7 @@ avtSiloWriter::WriteCurvilinearMesh(DBfile *dbfile, vtkStructuredGrid *sg,
//
int nlevels = 0;
string meshName = BeginVar(dbfile, meshname, nlevels);
DBPutQuadmesh(dbfile, (char *) meshName.c_str(), NULL, coords, dims, ndims,
DBPutQuadmesh(dbfile, (char *) meshName.c_str(), NULL, (DB_DTPTR2) coords, dims, ndims,
coordType, DB_NONCOLLINEAR, optlist);
EndVar(dbfile, nlevels);
......@@ -1691,7 +1691,7 @@ avtSiloWriter::WriteRectilinearMesh(DBfile *dbfile, vtkRectilinearGrid *rg,
//
int nlevels = 0;
string meshName = BeginVar(dbfile, meshname, nlevels);
DBPutQuadmesh(dbfile, (char *) meshName.c_str(), NULL, vcoords, dims, ndims,
DBPutQuadmesh(dbfile, (char *) meshName.c_str(), NULL, (DB_DTPTR2) vcoords, dims, ndims,
DB_DOUBLE, DB_COLLINEAR, optlist);
EndVar(dbfile, nlevels);
......@@ -1835,7 +1835,7 @@ avtSiloWriter::WritePolygonalMesh(DBfile *dbfile, vtkPolyData *pd,
string meshName = BeginVar(dbfile, meshname, nlevels);
if (npointcells == nzones && npointcells == npts)
{
DBPutPointmesh(dbfile, (char *) meshName.c_str(), ndims, coords,
DBPutPointmesh(dbfile, (char *) meshName.c_str(), ndims, (DB_DTPTR2) coords,
npts, DB_FLOAT, optlist);
}
else
......@@ -1855,7 +1855,7 @@ avtSiloWriter::WritePolygonalMesh(DBfile *dbfile, vtkPolyData *pd,
//
// Now write the actual mesh.
//
DBPutUcdmesh(dbfile, (char *) meshName.c_str(), ndims, NULL, coords, npts,
DBPutUcdmesh(dbfile, (char *) meshName.c_str(), ndims, NULL, (DB_DTPTR2) coords, npts,
nzones, "zonelist", NULL, coordType, optlist);
}
EndVar(dbfile, nlevels);
......@@ -2076,12 +2076,12 @@ avtSiloWriter::WriteUcdvarsHelper(DBfile *dbfile, vtkDataSetAttributes *ds,
if (isPointMesh && centering == DB_NODECENT)
DBPutPointvar1(dbfile, (char *) varName.c_str(),
(char *) meshName.c_str(),
arr2->GetVoidPointer(0),
(DB_DTPTR1) arr2->GetVoidPointer(0),
nTuples, GetSiloType(arr2), optlist);
else
DBPutUcdvar1(dbfile, (char *) varName.c_str(),
(char *) meshName.c_str(),
arr2->GetVoidPointer(0), nTuples, NULL, 0,
(DB_DTPTR1) arr2->GetVoidPointer(0), nTuples, NULL, 0,
GetSiloType(arr2), centering, optlist);
}
else
......@@ -2110,11 +2110,11 @@ avtSiloWriter::WriteUcdvarsHelper(DBfile *dbfile, vtkDataSetAttributes *ds,
if (isPointMesh && centering == DB_NODECENT)
DBPutPointvar(dbfile, (char *) varName.c_str(),
(char *) meshName.c_str(),
ncomps, vars, nTuples, DB_DOUBLE, optlist);
ncomps, (DB_DTPTR2) vars, nTuples, DB_DOUBLE, optlist);
else
DBPutUcdvar(dbfile, (char *) varName.c_str(),
(char *) meshName.c_str(),
ncomps, varnames, vars, nTuples, NULL, 0, DB_DOUBLE,
ncomps, varnames, (DB_DTPTR2) vars, nTuples, NULL, 0, DB_DOUBLE,
centering, optlist);
for (j = 0 ; j < ncomps ; j++)
......@@ -2233,7 +2233,7 @@ avtSiloWriter::WriteQuadvarsHelper(DBfile *dbfile, vtkDataSetAttributes *ds,
DBPutQuadvar1(dbfile, (char *) varName.c_str(),
(char *) meshName.c_str(),
arr->GetVoidPointer(0), dims, ndims, NULL,
(DB_DTPTR1) arr->GetVoidPointer(0), dims, ndims, NULL,
0, GetSiloType(arr), centering, optlist);
}
else
......@@ -2263,7 +2263,7 @@ avtSiloWriter::WriteQuadvarsHelper(DBfile *dbfile, vtkDataSetAttributes *ds,
DBPutQuadvar(dbfile, (char *) varName.c_str(),
(char *) meshName.c_str(),
ncomps, varnames, vars, dims, ndims, NULL, 0,
ncomps, varnames, (DB_DTPTR2) vars, dims, ndims, NULL, 0,
DB_DOUBLE, centering, optlist);
for (j = 0 ; j < ncomps ; j++)
......
......@@ -112,6 +112,7 @@
}
else if(data != 0)
{
int numElements = data->GetNumberOfTuples();
if(numElements != nCells)
......@@ -122,9 +123,10 @@
if(treatAsASCII)
{
debug3 << "Labelling cells with label data" << endl;
int labelLength = data->GetNumberOfComponents();
debug3 << "Labelling cells with label data using labelLength of " << labelLength << endl;
if(labelLength == 1) // handle the single char case
{
for(vtkIdType id = 0; id < nCells; id += skipIncrement)
......@@ -135,7 +137,7 @@
END_LABEL
}
}
else if(data->IsA("vtkUnsignedCharArray"))
else if(data->IsA("vtkUnsignedCharArray") || data->IsA("vtkCharArray"))
{
unsigned char *label = (unsigned char *)data->GetVoidPointer(0);
for(vtkIdType id = 0; id < nCells; id += skipIncrement)
......
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