Commit 288690b5 authored by hrchilds's avatar hrchilds

Update from December 11, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@777 18c085ea-50e0-402c-830e-de6fd14e8384
parent e7358dce
......@@ -740,6 +740,13 @@ avtTransformManager::NativeToFloat(const avtDatabaseMetaData *const md,
//
// Now, deal with cell data
//
vtkDataArray *da1 = ds->GetCellData()->GetScalars();
vtkDataArray *da2 = ds->GetCellData()->GetScalars();
if (da1 != da2)
{
cerr << "Problem" << endl;
abort();
}
vtkCellData *cd = ds->GetCellData();
for (i = 0; i < cd->GetNumberOfArrays(); i++)
{
......@@ -771,12 +778,14 @@ avtTransformManager::NativeToFloat(const avtDatabaseMetaData *const md,
newda->Delete();
}
}
switch (newda->GetNumberOfComponents())
{
case 1: rv->GetCellData()->SetScalars(newda); break;
case 3: rv->GetCellData()->SetVectors(newda); break;
default: rv->GetCellData()->SetTensors(newda); break;
}
if (cd->GetScalars() == da)
rv->GetCellData()->SetScalars(newda);
else if (cd->GetVectors() == da)
rv->GetCellData()->SetVectors(newda);
else if (cd->GetTensors() == da)
rv->GetCellData()->SetTensors(newda);
else
rv->GetCellData()->AddArray(newda);
}
}
else if (pass == 1)
......@@ -786,12 +795,14 @@ avtTransformManager::NativeToFloat(const avtDatabaseMetaData *const md,
rv->GetCellData()->AddArray(da);
else
{
switch (da->GetNumberOfComponents())
{
case 1: rv->GetCellData()->SetScalars(da); break;
case 3: rv->GetCellData()->SetVectors(da); break;
default: rv->GetCellData()->SetTensors(da); break;
}
if (cd->GetScalars() == da)
rv->GetCellData()->SetScalars(da);
else if (cd->GetVectors() == da)
rv->GetCellData()->SetVectors(da);
else if (cd->GetTensors() == da)
rv->GetCellData()->SetTensors(da);
else
rv->GetCellData()->AddArray(da);
}
}
}
......@@ -834,12 +845,14 @@ avtTransformManager::NativeToFloat(const avtDatabaseMetaData *const md,
cerr << "Not caching this array" << endl;
}
}
switch (newda->GetNumberOfComponents())
{
case 1: rv->GetPointData()->SetScalars(newda); break;
case 3: rv->GetPointData()->SetVectors(newda); break;
default: rv->GetPointData()->SetTensors(newda); break;
}
if (pd->GetScalars() == da)
rv->GetPointData()->SetScalars(newda);
else if (pd->GetVectors() == da)
rv->GetPointData()->SetVectors(newda);
else if (pd->GetTensors() == da)
rv->GetPointData()->SetTensors(newda);
else
rv->GetPointData()->AddArray(newda);
}
}
else if (pass == 1)
......@@ -849,12 +862,14 @@ avtTransformManager::NativeToFloat(const avtDatabaseMetaData *const md,
rv->GetPointData()->AddArray(da);
else
{
switch (da->GetNumberOfComponents())
{
case 1: rv->GetPointData()->SetScalars(da); break;
case 3: rv->GetPointData()->SetVectors(da); break;
default: rv->GetPointData()->SetTensors(da); break;
}
if (pd->GetScalars() == da)
rv->GetPointData()->SetScalars(da);
else if (pd->GetVectors() == da)
rv->GetPointData()->SetVectors(da);
else if (pd->GetTensors() == da)
rv->GetPointData()->SetTensors(da);
else
rv->GetPointData()->AddArray(da);
}
}
}
......
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -13,6 +13,11 @@ if test -z "$CXX"; then
CXX=g++-3.1
fi
##
## Disable build of Fast Interval Library
##
enable_filib=no
if test "$CXX" = "xlC"; then
##
## If MESA is not set, use VisIt's mesa.
......
......@@ -13,6 +13,11 @@ if test -z "$CXX"; then
CXX=g++-3.1
fi
##
## Disable build of Fast Interval Library
##
enable_filib=no
if test "$CXX" = "xlC"; then
##
## If MESA is not set, use VisIt's mesa.
......
......@@ -13,6 +13,11 @@ if test -z "$CXX"; then
CXX=g++-3.1
fi
##
## Disable build of Fast Interval Library
##
enable_filib=no
if test "$CXX" = "xlC"; then
##
## If MESA is not set, use VisIt's mesa.
......
......@@ -13,6 +13,11 @@ if test -z "$CXX"; then
CXX=g++-3.1
fi
##
## Disable build of Fast Interval Library
##
enable_filib=no
if test "$CXX" = "xlC"; then
##
## If MESA is not set, use VisIt's mesa.
......
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -62,6 +62,12 @@ PTHREAD_CXXFLAGS="-pthread"
##
LDFLAGS="-Wl,-S $LDFLAGS"
##
## Disable buliding of Fast Interval Library (filib)
## This also means adaptive CSG discretization won't be available
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -62,6 +62,12 @@ PTHREAD_CXXFLAGS="-pthread"
##
LDFLAGS="-Wl,-S $LDFLAGS"
##
## Disable buliding of Fast Interval Library (filib)
## This also means adaptive CSG discretization won't be available
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -62,6 +62,12 @@ PTHREAD_CXXFLAGS="-pthread"
##
LDFLAGS="-Wl,-S $LDFLAGS"
##
## Disable buliding of Fast Interval Library (filib)
## This also means adaptive CSG discretization won't be available
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -62,6 +62,12 @@ PTHREAD_CXXFLAGS="-pthread"
##
LDFLAGS="-Wl,-S $LDFLAGS"
##
## Disable buliding of Fast Interval Library (filib)
## This also means adaptive CSG discretization won't be available
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -62,6 +62,12 @@ PTHREAD_CXXFLAGS="-pthread"
##
LDFLAGS="-Wl,-S $LDFLAGS"
##
## Disable buliding of Fast Interval Library (filib)
## This also means adaptive CSG discretization won't be available
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -62,6 +62,12 @@ PTHREAD_CXXFLAGS="-pthread"
##
LDFLAGS="-Wl,-S $LDFLAGS"
##
## Disable buliding of Fast Interval Library (filib)
## This also means adaptive CSG discretization won't be available
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -13,6 +13,11 @@ if test -z "$CXX"; then
CXX=g++-3.1
fi
##
## Disable build of Fast Interval Library
##
enable_filib=no
if test "$CXX" = "xlC"; then
##
## If MESA is not set, use VisIt's mesa.
......
......@@ -71,6 +71,11 @@ if test -z "$MPI_LIBS"; then
SHLIB_MPI_LIBS="-L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ppe.poe/lib -L/usr/lpp/ppe.poe/lib/ip -lmpi_r -lvtd_r -llapi_r -lpthreads"
fi
##
## Disable building of Fast Interval Library
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -71,6 +71,11 @@ if test -z "$MPI_LIBS"; then
SHLIB_MPI_LIBS="-L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ppe.poe/lib -L/usr/lpp/ppe.poe/lib/ip -lmpi_r -lvtd_r -llapi_r -lpthreads"
fi
##
## Disable building of Fast Interval Library
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -71,6 +71,11 @@ if test -z "$MPI_LIBS"; then
SHLIB_MPI_LIBS="-L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ppe.poe/lib -L/usr/lpp/ppe.poe/lib/ip -lmpi_r -lvtd_r -llapi_r -lpthreads"
fi
##
## Disable building of Fast Interval Library
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -71,6 +71,11 @@ if test -z "$MPI_LIBS"; then
SHLIB_MPI_LIBS="-L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ppe.poe/lib -L/usr/lpp/ppe.poe/lib/ip -lmpi_r -lvtd_r -llapi_r -lpthreads"
fi
##
## Disable building of Fast Interval Library
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -119,9 +119,3 @@ DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.6-pre2/linux_rhel3_gcc_3.2.3/lib
##
DEFAULT_VISUS_INCLUDE=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/include
DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3/lib
##
## filib
##
DEFAULT_FILIB_INCLUDE=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/include
DEFAULT_FILIB_LIB=/usr/gapps/visit/filib/linux_rhel3_gcc_3.2.3/lib
......@@ -71,6 +71,11 @@ if test -z "$MPI_LIBS"; then
SHLIB_MPI_LIBS="-L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ppe.poe/lib -L/usr/lpp/ppe.poe/lib/ip -lmpi_r -lvtd_r -llapi_r -lpthreads"
fi
##
## Disable building of Fast Interval Library
##
enable_filib=no
##
## Database reader plugin support libraries
##
......
This diff is collapsed.
......@@ -1317,6 +1317,22 @@ AC_SUBST(BUILD_GLEW)
AC_SUBST(GLEW_INCLUDE)
AC_SUBST(GLEW_LIBS)
dnl
dnl Disable building filib. Only necessary if filib won't build somewhere
dnl
AC_ARG_ENABLE(filib,
[ --disable-filib do not build or use filib library -- disables adaptive CSG discretization],
Usefilib="$enable_filib", Usefilib=yes)
BUILD_FILIB=""
FILIB_LIBS=""
if test "$Usefilib" = "yes"; then
BUILD_FILIB="filib"
AC_DEFINE(HAVE_FILIB)
FILIB_LIBS="-lfi -lprim -lieee"
fi
AC_SUBST(BUILD_FILIB)
AC_SUBST(FILIB_LIBS)
dnl
dnl Make note if no CXXFLAGS have STILL yet been specified; this is the
dnl same check as for emptycxxflags above, except it is possible that a
......@@ -1578,55 +1594,6 @@ esac
AC_SUBST(ZLIB_INCLUDE)
AC_SUBST(ZLIB_LIB)
dnl
dnl check for fast interval library (filib)
dnl
VISIT_VTK_CPPFLAGS=""
VISIT_VTK_LDFLAGS=""
AC_MSG_CHECKING(for filib)
FILIB_INCLUDE=""
FILIB_LIB=""
FILIB_LIBS=""
AC_ARG_WITH(filib,
[ --with-filib=INC-DIR,LIB-DIR Location of filib header and library],
filib_specified="yes",
filib_specified="no"
)
if test "$SHORT_UNAME" = "darwin"; then
FI_LIBEXT="dylib"
else
FI_LIBEXT="a"
fi
if test "$filib_specified" = "yes"; then
if test "$withval" != "no"; then
FILIB_INCLUDE="-I`echo $withval |cut -f1 -d,`"
FILIB_LIB="-L`echo $withval |cut -f2 -d, -s`"
fi
else
if test "$DEFAULT_FILIB_INCLUDE" != "" ; then
FILIB_INCLUDE="-I$DEFAULT_FILIB_INCLUDE $FILIB_INCLUDE"
fi
if test "$DEFAULT_FILIB_LIB" != "" ; then
FILIB_LIB="-L$DEFAULT_FILIB_LIB"
fi
fi
if test "$FILIB_LIB" != "" ; then
if test "$FILIB_INCLUDE" != "" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FILIB)
FILIB_LIBS="-lfi -lprim -lieee"
VISIT_VTK_CPPFLAGS="$VISIT_VTK_CPPFLAGS $FILIB_INCLUDE"
VISIT_VTK_LDFLAGS="$VISIT_VTK_LDFLAGS""$""(FILIB_LIB)"
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
fi
AC_SUBST(FILIB_INCLUDE)
AC_SUBST(FILIB_LIB)
AC_SUBST(FILIB_LIBS)
dnl
dnl Is HDF5 present?
dnl
......@@ -2936,7 +2903,6 @@ CREATE_NETCDF_LINK=""
CREATE_CGNS_LINK=""
CREATE_GDAL_LINK=""
CREATE_EXODUS_LINK=""
CREATE_FILIB_LINK=""
case $SHORT_UNAME in
darwin)
if test "$SILO_LIB" != "" ; then
......@@ -2964,11 +2930,6 @@ case $SHORT_UNAME in
CREATE_EXODUS_LINK="create_exodus_link"
fi
;;
*)
if test "$FILIB_LIBS" != ""; then
CREATE_FILIB_LINK="libfilib"
fi
;;
esac
AC_SUBST(CREATE_SILO_LINK)
AC_SUBST(CREATE_MILI_LINK)
......@@ -2978,7 +2939,6 @@ AC_SUBST(CREATE_NETCDF_LINK)
AC_SUBST(CREATE_CGNS_LINK)
AC_SUBST(CREATE_GDAL_LINK)
AC_SUBST(CREATE_EXODUS_LINK)
AC_SUBST(CREATE_FILIB_LINK)
#
# Check for library functions that can work around, or that we have
......@@ -3223,7 +3183,8 @@ SIMULATION_PROTOTYPE_FILES="sim/Makefile
CQSCORE_FILES="cqscore/Makefile"
THIRD_PARTY_BUILTIN_FILES="third_party_builtin/Makefile
third_party_builtin/bzip2/Makefile
third_party_builtin/glew/Makefile"
third_party_builtin/glew/Makefile
third_party_builtin/filib/Makefile"
if test "$enable_scripting" = "yes"; then
VISITPY_FILES="visitpy/Makefile"
......
......@@ -697,7 +697,7 @@ avtCGNSFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
if(fUnits)
unitStack.PopUnits();
// See if we have Volicity and Momentum components.
// See if we have Velocity and Momentum components.
haveVelocityX |= (strcmp(fieldname, "VelocityX") == 0);
haveVelocityY |= (strcmp(fieldname, "VelocityY") == 0);
haveVelocityZ |= (strcmp(fieldname, "VelocityZ") == 0);
......@@ -834,21 +834,43 @@ avtCGNSFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
}
// Add some expressions.
if(haveVelocityX && haveVelocityY && haveVelocityZ)
if(cell_dim == 2)
{
Expression *e = new Expression;
e->SetName("Velocity");
e->SetDefinition("{VelocityX,VelocityY,VelocityZ}");
e->SetType(Expression::VectorMeshVar);
md->AddExpression(e);
if(haveVelocityX && haveVelocityY)
{
Expression *e = new Expression;
e->SetName("Velocity");
e->SetDefinition("{VelocityX,VelocityY}");
e->SetType(Expression::VectorMeshVar);
md->AddExpression(e);
}
if(haveMomentumX && haveMomentumY)
{
Expression *e = new Expression;
e->SetName("Momentum");
e->SetDefinition("{MomentumX,MomentumY}");
e->SetType(Expression::VectorMeshVar);
md->AddExpression(e);
}
}
if(haveMomentumX && haveMomentumY && haveMomentumZ)
else
{
Expression *e = new Expression;
e->SetName("Momentum");
e->SetDefinition("{MomentumX,MomentumY,MomentumZ}");
e->SetType(Expression::VectorMeshVar);
md->AddExpression(e);
if(haveVelocityX && haveVelocityY && haveVelocityZ)
{
Expression *e = new Expression;
e->SetName("Velocity");
e->SetDefinition("{VelocityX,VelocityY,VelocityZ}");
e->SetType(Expression::VectorMeshVar);
md->AddExpression(e);
}
if(haveMomentumX && haveMomentumY && haveMomentumZ)
{
Expression *e = new Expression;
e->SetName("Momentum");
e->SetDefinition("{MomentumX,MomentumY,MomentumZ}");
e->SetType(Expression::VectorMeshVar);
md->AddExpression(e);
}
}
}
......@@ -970,7 +992,10 @@ avtCGNSFileFormat::GetMesh(int timestate, int domain, const char *meshname)
// Creation: Wed Aug 31 11:45:55 PDT 2005
//
// Modifications:
//
// Brad Whitlock, Mon Dec 11 09:28:52 PDT 2006
// Prevent the coordinate arrays from being too large in the structured
// 1D, 2D cases.
//
// ****************************************************************************
bool
......@@ -1003,9 +1028,21 @@ avtCGNSFileFormat::GetCoords(int base, int zone, const int *zsize,
int rmax[3] = {1,1,1};
if(structured)
{
rmax[0] = zsize[0];
rmax[1] = zsize[1];
rmax[2] = zsize[2];
if(*ncoords == 1)
{
rmax[0] = zsize[0];
}
else if(*ncoords == 2)
{
rmax[0] = zsize[0];
rmax[1] = zsize[1];
}
else
{
rmax[0] = zsize[0];
rmax[1] = zsize[1];
rmax[2] = zsize[2];
}
nPts = zsize[0] * zsize[1] * zsize[2];
}
else
......@@ -1074,7 +1111,9 @@ avtCGNSFileFormat::GetCoords(int base, int zone, const int *zsize,
// Creation: Wed Aug 31 09:30:30 PDT 2005
//
// Modifications:
//
// Brad Whitlock, Mon Dec 11 09:42:35 PDT 2006
// Corrected support for 2D.
//
// ****************************************************************************
vtkDataSet *
......@@ -1098,8 +1137,8 @@ avtCGNSFileFormat::GetCurvilinearMesh(int base, int zone, const char *meshname,
// Populate the points array
int dims[3];
dims[0] = zsize[0];
dims[1] = zsize[1];
dims[2] = zsize[2];
dims[1] = (ncoords >= 2) ? zsize[1] : 1;
dims[2] = (ncoords == 3) ? zsize[2] : 1;
sgrid->SetDimensions(dims);
points->SetNumberOfPoints(dims[0] * dims[1] * dims[2]);
float *pts = (float *) points->GetVoidPointer(0);
......@@ -1133,7 +1172,15 @@ avtCGNSFileFormat::GetCurvilinearMesh(int base, int zone, const char *meshname,
}
}
}
else if(ncoords == 1)
{
for(int i = 0; i < dims[0]; ++i)
{
*pts++ = *xc++;
*pts++ = 0.;
*pts++ = 0.;
}
}
retval = sgrid;
delete [] coords[0];
......@@ -1535,6 +1582,9 @@ avtCGNSFileFormat::GetUnstructuredMesh(int base, int zone, const char *meshname,
// Creation: Tue Aug 30 16:08:44 PST 2005
//
// Modifications:
// Brad Whitlock, Mon Dec 11 09:33:15 PDT 2006
// Changed interpretation of zsize array for 1D, 2D cases so we allocate
// and read the right number of values.
//
// ****************************************************************************
......@@ -1558,6 +1608,25 @@ avtCGNSFileFormat::GetVar(int timestate, int domain, const char *varname)
memset(zonename, 0, 33);
memset(zsize, 0, 9 * sizeof(int));
//
// Determine the topological and spatial dimensions.
//
char namebase[33];
int cell_dim = 2, phys_dim = 2;
if(cg_base_read(GetFileHandle(), base, namebase, &cell_dim, &phys_dim) != CG_OK)
{
debug4 << cg_get_error() << endl;
EXCEPTION1(InvalidFilesException, filename);
}
else
{
debug4 << mName << " name=" << namebase << " cell_dim=" << cell_dim
<< " phys_dim=" << phys_dim << endl;
}
//
// Read the zone information
//
if(cg_zone_read(GetFileHandle(), base, zone, zonename, zsize) != CG_OK)
{
debug4 << mName << cg_get_error() << endl;
......@@ -1686,15 +1755,39 @@ avtCGNSFileFormat::GetVar(int timestate, int domain, const char *varname)
{
if(varcentering == Vertex)
{
rmax[0] = zsize[0];
rmax[1] = zsize[1];
rmax[2] = zsize[2];
if(cell_dim == 1)
{
rmax[0] = zsize[0];
}
else if(cell_dim == 2)
{
rmax[0] = zsize[0];
rmax[1] = zsize[1];
}
else
{
rmax[0] = zsize[0];
rmax[1] = zsize[1];
rmax[2] = zsize[2];
}
}
else
{
rmax[0] = zsize[3];
rmax[1] = zsize[4];
rmax[2] = zsize[5];
if(cell_dim == 1)
{
rmax[0] = zsize[1];
}
else if(cell_dim == 2)
{
rmax[0] = zsize[2];