Commit 1cdfef8c authored by whitlocb's avatar whitlocb

Fixing some C++11 issues.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@29354 18c085ea-50e0-402c-830e-de6fd14e8384
parent f934d745
......@@ -209,7 +209,7 @@ avtCellLocatorRect::FindCell(const double pos[3],
if( weights )
{
const float k[3] = { 1.0f-l[0], 1.0f-l[1], 1.0f-l[2] };
double k[3] = { 1.0-l[0], 1.0-l[1], 1.0-l[2] };
vtkIdType base = (i[2]*coord[1].size() + i[1])*coord[0].size() + i[0];
......
......@@ -162,7 +162,7 @@ avtCellLocatorRectEdge::FindCell(const double pos[3],
if( weights )
{
const float k[3] = { 1.0f-l[0], 1.0f-l[1], 1.0f-l[2] };
double k[3] = { 1.0-l[0], 1.0-l[1], 1.0-l[2] };
vtkIdType base = (i[2]*coord[1].size() + i[1])*coord[0].size() + i[0];
......
......@@ -152,7 +152,7 @@ avtCellLocatorRectFace::FindCell(const double pos[3],
if( weights )
{
const float k[3] = { 1.0f-l[0], 1.0f-l[1], 1.0f-l[2] };
double k[3] = { 1.0-l[0], 1.0-l[1], 1.0-l[2] };
vtkIdType base = (i[2]*coord[1].size() + i[1])*coord[0].size() + i[0];
......
......@@ -426,10 +426,13 @@ int vtkOpenGLRectilinearGridMapper::Draw(vtkRenderer *ren, vtkActor *act)
GetArray("RectilinearGridTransform");
double *matrix = xform->GetPointer(0);
// OpenGL wants the transpose of our VTK matrix.
float glmatrix[16] = {matrix[ 0], matrix[ 4], matrix[ 8], matrix[12],
matrix[ 1], matrix[ 5], matrix[ 9], matrix[13],
matrix[ 2], matrix[ 6], matrix[10], matrix[14],
matrix[ 3], matrix[ 7], matrix[11], matrix[15]};
const int indices[] = {0,4,8,12,
1,5,9,13,
2,6,10,14,
3,7,11,15};
float glmatrix[16];
for(int i = 0; i < 16; ++i)
glmatrix[i] = static_cast<float>(matrix[indices[i]]);
glPushMatrix();
glMultMatrixf(glmatrix);
}
......
......@@ -560,7 +560,9 @@ avtImageColleague::GetOptions(AnnotationObject &annot)
annot.SetPosition(actor->GetPosition());
double pos[] = {width, height, 0};
double pos[] = {static_cast<double>(width),
static_cast<double>(height),
0.};
annot.SetPosition2(pos);
annot.SetIntAttribute1(useOpacityColor ? 1 : 0);
......
#################################################################################################################
IF(VISIT_STATIC)
#################################################################################################################
#/Users/bjw/Development/thirdparty_static/2.10.0/cmake/3.0.2/i386-apple-darwin12_gcc-4.2/bin/cmake
#/Users/bjw/Development/thirdparty_shared/2.11.0/cmake/3.0.2/i386-apple-darwin16_clang/bin/cmake
##
## ./build_visit generated host.cmake
## created: Tue Oct 21 11:27:25 PDT 2014
## system: Darwin optimusprime.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
## by: bjw
##
## Setup VISITHOME & VISITARCH variables.
##
SET(VISITHOME /Users/bjw/Development/thirdparty_static/2.10.0)
SET(VISITARCH i386-apple-darwin12_gcc-4.2)
## Compiler flags.
##
VISIT_OPTION_DEFAULT(VISIT_C_COMPILER gcc TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER g++ TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "-Wall -fno-common -fexceptions" TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-Wall -fno-common -fexceptions" TYPE STRING)
##
## VisIt Thread Option
##
VISIT_OPTION_DEFAULT(VISIT_THREAD OFF TYPE BOOL)
##############################################################
##
## Database reader plugin support libraries
##
## The HDF4, HDF5 and NetCDF libraries must be first so that
## their libdeps are defined for any plugins that need them.
##
## For libraries with LIBDEP settings, order matters.
## Libraries with LIBDEP settings that depend on other
## Library's LIBDEP settings must come after them.
##############################################################
##
##
## Python
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.7.6/${VISITARCH})
##
## Qt
##
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/qt/4.8.6/${VISITARCH}/bin)
##
## QWT
##
SETUP_APP_VERSION(QWT 6.1.2)
VISIT_OPTION_DEFAULT(VISIT_QWT_DIR ${VISITHOME}/qwt/${QWT_VERSION}/${VISITARCH})
##
## VTK
##
SETUP_APP_VERSION(VTK 6.1.0)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH})
##
##
## MPICH
##
# Give VisIt information so it can install MPI into the binary distribution.
VISIT_OPTION_DEFAULT(VISIT_MPICH_DIR ${VISITHOME}/mpich/3.0.4/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON)
# Tell VisIt the parallel compiler so it can deduce parallel flags
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER ${VISIT_MPICH_DIR}/bin/mpicc)
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON)
##
## BOOST
##
SETUP_APP_VERSION(BOOST 1_57_0)
VISIT_OPTION_DEFAULT(VISIT_BOOST_DIR ${VISITHOME}/boost/1_57_0/${VISITARCH})
##
## CFITSIO
##
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio/3006/${VISITARCH})
##
## SZIP
##
VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip/2.1/${VISITARCH})
##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.14/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz /usr/lib z TYPE STRING)
##
## CGNS
##
VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/3.2.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## GDAL
##
##VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/1.10.0/${VISITARCH}) # unresolved iconv_open
##
## H5Part
##
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/1.6.6/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## NetCDF
##
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/4.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP HDF5_LIBRARY_DIR hdf5_hl HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## MFEM
##
VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.0.1/${VISITARCH})
##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## Xdmf
##
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 VTK_LIBRARY_DIRS vtklibxml2-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING)
#################################################################################################################
ELSE(VISIT_STATIC)
#################################################################################################################
#/Users/bjw/Development/thirdparty_shared/2.10.0/cmake/3.0.2/i386-apple-darwin12_gcc-4.2/bin/cmake
##
## ./build_visit generated host.cmake
## created: Fri Jan 23 11:00:20 PST 2015
## system: Darwin optimusprime.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
## created: Fri Sep 23 15:23:53 PDT 2016
## system: Darwin optimusprime.local 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016; root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
## by: bjw
##
## Setup VISITHOME & VISITARCH variables.
##
SET(VISITHOME /Users/bjw/Development/thirdparty_shared/2.11.0)
SET(VISITARCH i386-apple-darwin12_gcc-4.2)
SET(VISITARCH i386-apple-darwin16_clang)
## Compiler flags.
##
VISIT_OPTION_DEFAULT(VISIT_C_COMPILER gcc TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER g++ TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "-Wall -fno-common -fexceptions -fvisibility=hidden" TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-Wall -fno-common -fexceptions -fvisibility=hidden" TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_C_COMPILER clang TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER clang++ TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "-fno-common -fexceptions" TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-std=c++11 -Wno-deprecated-declarations -fno-common -fexceptions" TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_BUILD_ALL_PLUGINS ON TYPE BOOL)
VISIT_OPTION_DEFAULT(VISIT_DATA_MANUAL_EXAMPLES ON TYPE BOOL)
##
## VisIt Thread Option
##
VISIT_OPTION_DEFAULT(VISIT_THREAD OFF TYPE BOOL)
VISIT_OPTION_DEFAULT(VISIT_BUILD_ALL_PLUGINS ON TYPE BOOL)
VISIT_OPTION_DEFAULT(VISIT_DATA_MANUAL_EXAMPLES ON TYPE BOOL)
##############################################################
##
## Database reader plugin support libraries
......@@ -188,7 +47,8 @@ VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.7.11/${VISITARCH})
##
## Qt
##
SETUP_APP_VERSION(QT 4.8.6)
SETUP_APP_VERSION(QT 5.7.0)
VISIT_OPTION_DEFAULT(VISIT_QT5 ON TYPE BOOL)
VISIT_OPTION_DEFAULT(VISIT_QT_DIR ${VISITHOME}/qt/${QT_VERSION}/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISIT_QT_DIR}/bin)
......@@ -208,14 +68,13 @@ VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH})
##
## MPICH
##
# Give VisIt information so it can install MPI into the binary distribution.
VISIT_OPTION_DEFAULT(VISIT_MPICH_DIR ${VISITHOME}/mpich/3.0.4/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON)
VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON TYPE BOOL)
# Tell VisIt the parallel compiler so it can deduce parallel flags
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER ${VISIT_MPICH_DIR}/bin/mpicc)
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON)
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER ${VISIT_MPICH_DIR}/bin/mpicc TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON TYPE BOOL)
##
## ADIOS
......@@ -226,7 +85,7 @@ VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR ${VISITHOME}/adios/1.9.0/${VISITARCH})
##
## BOOST
##
SETUP_APP_VERSION(BOOST 1_57_0)
SETUP_APP_VERSION(BOOST 1_60_0)
VISIT_OPTION_DEFAULT(VISIT_BOOST_DIR ${VISITHOME}/boost/${BOOST_VERSION}/${VISITARCH})
##
......@@ -248,9 +107,7 @@ VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip/2.1/${VISITARCH})
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.14/${VISITARCH})
#VISIT_OPTION_DEFAULT(VISIT_HDF5_MPI_DIR ${VISITHOME}/hdf5_mpi/1.8.14/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz /usr/lib z TYPE STRING)
#VISIT_OPTION_DEFAULT(VISIT_HDF5_MPI_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz /usr/lib z TYPE STRING)
##
## CGNS
......@@ -275,10 +132,15 @@ VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBD
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4/4.2.5/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF4_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH}/lib vtkjpeg-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING)
##
## Ice-T
##
VISIT_OPTION_DEFAULT(VISIT_ICET_DIR ${VISITHOME}/icet/1.0.0/${VISITARCH})
##
## MFEM
##
VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.0.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.1/${VISITARCH})
##
## NetCDF
......@@ -289,19 +151,17 @@ VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP HDF5_LIBRARY_DIR hdf5_hl HDF5_LIBRARY_D
##
## PySide
##
VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR ${VISITHOME}/pyside/1.2.2/${VISITARCH}/)
#VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR ${VISITHOME}/pyside/1.2.2/${VISITARCH}/)
##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} /usr/lib z TYPE STRING)
##
## Xdmf
##
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 VTK_LIBRARY_DIRS vtklibxml2-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING)
#################################################################################################################
ENDIF(VISIT_STATIC)
#################################################################################################################
......@@ -643,13 +643,15 @@ avtPIConGPUFileFormat::GetAuxiliaryData(const char *var, int domain,
avtIntervalTree *itree = new avtIntervalTree(numBlocks, 3);
for (int i = 0; i < numBlocks; i++)
{
int x0 = avi->blockinfo[i].start[2];
int y0 = avi->blockinfo[i].start[1];
int z0 = avi->blockinfo[i].start[0];
int cx = avi->blockinfo[i].count[2];
int cy = avi->blockinfo[i].count[1];
int cz = avi->blockinfo[i].count[0];
int nx = cx+1, ny = cy+1, nz = cz+1;
double x0 = static_cast<double>(avi->blockinfo[i].start[2]);
double y0 = static_cast<double>(avi->blockinfo[i].start[1]);
double z0 = static_cast<double>(avi->blockinfo[i].start[0]);
double cx = static_cast<double>(avi->blockinfo[i].count[2]);
double cy = static_cast<double>(avi->blockinfo[i].count[1]);
double cz = static_cast<double>(avi->blockinfo[i].count[0]);
double nx = static_cast<double>(cx+1);
double ny = static_cast<double>(cy+1);
double nz = static_cast<double>(cz+1);
double b[6] = {x0, x0+nx, y0, y0+ny, z0, z0+nz};
itree->AddElement(i, b);
......
......@@ -993,6 +993,8 @@ avtCosmosPPFileFormat::GetVar(int ts, int dom, const char *name)
{
EXCEPTION2(BadIndexException, itype, maxitype);
}
return NULL;
}
......
......@@ -955,7 +955,7 @@ GetData(int exncfid, int ts, const char *visit_varname, int numBlocks, avtVarTyp
num_elem += (int) dlen;
if (pass == 1)
{
size_t starts[2] = {ts, 0};
size_t starts[2] = {static_cast<size_t>(ts), 0};
size_t counts[2] = {1, dlen};
ncerr = nc_get_vara(exncfid, elem_varid, starts, counts, p);
CheckNCError2(ncerr, nc_get_vara, __LINE__, __FILE__)
......
......@@ -3553,8 +3553,9 @@ avtFLASHFileFormat::ReadParticleVar(hid_t pointId, const char *vname,
if (fileFormatVersion < FLASH3_FFV8)
return;
hsize_t np = static_cast<hsize_t>(numParticles);
hsize_t dataspace = H5Dget_space(pointId);
hsize_t memdims[1] = {numParticles};
hsize_t memdims[1] = {np};
hsize_t memspace = H5Screate_simple(1, memdims, NULL);
int index = particleOriginalIndexMap[vname];
......@@ -3565,7 +3566,7 @@ avtFLASHFileFormat::ReadParticleVar(hid_t pointId, const char *vname,
#endif
offset[0] = 0;
offset[1] = index;
hsize_t count[2] = {numParticles, 1};
hsize_t count[2] = {np, 1};
H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, NULL,
count, NULL);
......
......@@ -345,11 +345,11 @@ avtGTCFileFormat::ReadVariable( int domain, int varIdx, int varDim, float **ptrV
hid_t dataspace = H5Dget_space(particleHandle);
//Select the Var.
hsize_t start[2] = { startOffset, varIdx };
hsize_t count[2] = { nPoints, varDim };
hsize_t start[2] = { static_cast<hsize_t>(startOffset), static_cast<hsize_t>(varIdx) };
hsize_t count[2] = { static_cast<hsize_t>(nPoints), static_cast<hsize_t>(varDim) };
H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, NULL, count, NULL);
hsize_t dataDim[1] = {nPoints*varDim};
hsize_t dataDim[1] = {static_cast<hsize_t>(nPoints*varDim)};
hid_t memspace = H5Screate_simple(1, dataDim, NULL);
H5Sselect_all(memspace);
......
......@@ -558,7 +558,7 @@ avtFVCOMParticleFileFormat::GetMesh(int timestate, const char *mesh)
// Need to specify time step to read SSH: timestate
debug4 << "timestate=" << timestate << endl;
size_t starts[]={timestate,0};
size_t starts[]={static_cast<size_t>(timestate),0};
size_t counts[]={1, nlag};
ptrdiff_t stride[]={1,1};
int x_id, y_id,z_id;
......@@ -666,7 +666,7 @@ avtFVCOMParticleFileFormat::GetVar(int timestate, const char *varname)
status = nc_inq_dimlen(ncid, nlag_id, &nlag);
if (status != NC_NOERR) fileObject-> HandleError(status);
size_t starts[]={timestate,0};
size_t starts[]={static_cast<size_t>(timestate),0};
size_t counts[]={1, nlag};
ptrdiff_t stride[]={1,1};
int s1_id;
......
......@@ -3247,8 +3247,8 @@ avtFVCOMReader::GetVar(int timestate, const char *Variable, avtVariableCache *ca
VarDimIDs[0] == nTimeID)
{
ntuples = dimSizes[VarDimIDs[1]];
size_t starts[]={timestate,0};
size_t counts[]={1, ntuples};
size_t starts[]={static_cast<size_t>(timestate),0};
size_t counts[]={1, static_cast<size_t>(ntuples)};
ptrdiff_t stride[]={1,1};
float *vals = new float[ntuples];
......@@ -3274,8 +3274,10 @@ avtFVCOMReader::GetVar(int timestate, const char *Variable, avtVariableCache *ca
VarDimIDs[0] == nTimeID)
{
ntuples = dimSizes[VarDimIDs[1]]*dimSizes[VarDimIDs[2]];
size_t starts[]={timestate,0,0};
size_t counts[]={1, dimSizes[VarDimIDs[1]], dimSizes[VarDimIDs[2]]};
size_t starts[]={static_cast<size_t>(timestate),0,0};
size_t counts[]={1,
static_cast<size_t>(dimSizes[VarDimIDs[1]]),
static_cast<size_t>(dimSizes[VarDimIDs[2]])};
ptrdiff_t stride[]={1,1,1};
float *vals = new float[ntuples];
......
......@@ -302,7 +302,7 @@ avtFVCOM_MTMDFileFormat::Init()
for(dom=0; dom<(int)ndoms; ++dom)
{
size_t start[]={dom,0};
size_t start[]={static_cast<size_t>(dom),0};
size_t count[]={1, nfnames};
ptrdiff_t stride[]={1,1};
......
......@@ -749,8 +749,12 @@ avtPFLOTRANFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData * md,
else
{
hid_t slabSpace = H5Scopy(dsSpace);
hsize_t start[] = {domainGlobalStart[0],domainGlobalStart[1],domainGlobalStart[2]};
hsize_t count[] = {domainGlobalCount[0]-1,domainGlobalCount[1]-1,domainGlobalCount[2]-1};
hsize_t start[] = {static_cast<hsize_t>(domainGlobalStart[0]),
static_cast<hsize_t>(domainGlobalStart[1]),
static_cast<hsize_t>(domainGlobalStart[2])};
hsize_t count[] = {static_cast<hsize_t>(domainGlobalCount[0]-1),
static_cast<hsize_t>(domainGlobalCount[1]-1),
static_cast<hsize_t>(domainGlobalCount[2]-1)};
if (oldFileNeedingCoordFixup)
{
for (int dim=0; dim<3; dim++)
......@@ -974,8 +978,8 @@ avtPFLOTRANFileFormat::GetMesh(int, int domain, const char *)
hid_t arraySpace = H5Dget_space(dimID[dim]);
hid_t slabSpace = H5Scopy(arraySpace);
hsize_t start[] = {domainGlobalStart[dim]};
hsize_t count[] = {domainGlobalCount[dim]};
hsize_t start[] = {static_cast<hsize_t>(domainGlobalStart[dim])};
hsize_t count[] = {static_cast<hsize_t>(domainGlobalCount[dim])};
H5Sselect_hyperslab(slabSpace, H5S_SELECT_SET, start,NULL,count,NULL);
hid_t memSpace = H5Screate_simple(1,count,NULL);
......@@ -1160,8 +1164,12 @@ avtPFLOTRANFileFormat::GetVar(int timestate, int, const char *varname)
}
hid_t slabSpace = H5Scopy(dsSpace);
hsize_t start[] = {domainGlobalStart[0],domainGlobalStart[1],domainGlobalStart[2]};
hsize_t count[] = {domainGlobalCount[0]-1,domainGlobalCount[1]-1,domainGlobalCount[2]-1};
hsize_t start[] = {static_cast<hsize_t>(domainGlobalStart[0]),
static_cast<hsize_t>(domainGlobalStart[1]),
static_cast<hsize_t>(domainGlobalStart[2])};
hsize_t count[] = {static_cast<hsize_t>(domainGlobalCount[0]-1),
static_cast<hsize_t>(domainGlobalCount[1]-1),
static_cast<hsize_t>(domainGlobalCount[2]-1)};
if (oldFileNeedingCoordFixup)
{
for (int dim=0; dim<3; dim++)
......@@ -1360,8 +1368,12 @@ avtPFLOTRANFileFormat::GetVectorVar(int timestate, int domain,
}
hid_t slabSpace = H5Scopy(dsSpace);
hsize_t start[] = {domainGlobalStart[0],domainGlobalStart[1],domainGlobalStart[2]};
hsize_t count[] = {domainGlobalCount[0]-1,domainGlobalCount[1]-1,domainGlobalCount[2]-1};
hsize_t start[] = {static_cast<hsize_t>(domainGlobalStart[0]),
static_cast<hsize_t>(domainGlobalStart[1]),
static_cast<hsize_t>(domainGlobalStart[2])};
hsize_t count[] = {static_cast<hsize_t>(domainGlobalCount[0]-1),
static_cast<hsize_t>(domainGlobalCount[1]-1),
static_cast<hsize_t>(domainGlobalCount[2]-1)};
if (oldFileNeedingCoordFixup)
{
for (int dim=0; dim<3; dim++)
......@@ -1511,8 +1523,12 @@ void *avtPFLOTRANFileFormat::GetAuxiliaryData(const char *var, int timestep
else
{
hid_t slabSpace = H5Scopy(dsSpace);
hsize_t start[] = {domainGlobalStart[0],domainGlobalStart[1],domainGlobalStart[2]};
hsize_t count[] = {domainGlobalCount[0]-1,domainGlobalCount[1]-1,domainGlobalCount[2]-1};
hsize_t start[] = {static_cast<hsize_t>(domainGlobalStart[0]),
static_cast<hsize_t>(domainGlobalStart[1]),
static_cast<hsize_t>(domainGlobalStart[2])};
hsize_t count[] = {static_cast<hsize_t>(domainGlobalCount[0]-1),
static_cast<hsize_t>(domainGlobalCount[1]-1),
static_cast<hsize_t>(domainGlobalCount[2]-1)};
if (oldFileNeedingCoordFixup)
{
for (int dim=0; dim<3; dim++)
......
......@@ -1456,14 +1456,18 @@ avtPixieFileFormat::CreateCurvilinearMesh(int timestate, const VarInfo &info,
//
if(nVarDims == 2)
{
int yxzNodes[] = {hyperslabDims[2], hyperslabDims[1], hyperslabDims[0]};
int yxzNodes[] = {static_cast<int>(hyperslabDims[2]),
static_cast<int>(hyperslabDims[1]),
static_cast<int>(hyperslabDims[0])};
sgrid->SetDimensions((int *)yxzNodes);
}
else
{
// In 3D, Pixie dimensions are stored ZYX. Reverse them so we
// give the right order to VTK.
int xyzNodes[] = {hyperslabDims[2], hyperslabDims[1], hyperslabDims[0]};
int xyzNodes[] = {static_cast<int>(hyperslabDims[2]),
static_cast<int>(hyperslabDims[1]),
static_cast<int>(hyperslabDims[0])};
sgrid->SetDimensions(xyzNodes);
}
int nMeshNodes = hyperslabDims[0] * hyperslabDims[1] * hyperslabDims[2];
......
......@@ -407,12 +407,15 @@ avtSXRISFileFormat::GetVar(int timestate, const char *varname)
hid_t dataId = H5Dopen(fileId, "/frames", H5P_DEFAULT);
hid_t spaceId = H5Dget_space(dataId);
hsize_t memDim[2] = {dimensions[0], dimensions[1]};
hsize_t memDim[2] = {static_cast<hsize_t>(dimensions[0]),
static_cast<hsize_t>(dimensions[1])};
hid_t memspaceId = H5Screate_simple(2, memDim, NULL);
hsize_t offset[3] = {0,0,timestate};
hsize_t count[3] = {dimensions[0], dimensions[1], 1};
hsize_t offset[3] = {0,0,static_cast<hsize_t>(timestate)};
hsize_t count[3] = {static_cast<hsize_t>(dimensions[0]),
static_cast<hsize_t>(dimensions[1]),
1};
H5Sselect_hyperslab(spaceId, H5S_SELECT_SET, offset, NULL, count, NULL);
herr_t status = H5Dread(dataId, H5T_NATIVE_DOUBLE, memspaceId, spaceId, H5P_DEFAULT, arr->GetVoidPointer(0)); (void) status;
......
......@@ -10429,7 +10429,8 @@ avtSiloFileFormat::ReadInConnectivity(vtkUnstructuredGrid *ugrid,
j++;
continue;
}
unsigned int ocdata[2] = {domain, i};
unsigned int ocdata[2] = {static_cast<unsigned int>(domain),
static_cast<unsigned int>(i)};
oca->InsertNextTupleValue(ocdata);
cellReMap->push_back(i);
}
......@@ -11113,7 +11114,8 @@ avtSiloFileFormat::ReadInArbConnectivity(const char *meshname,
else
fcnt = phzl->nodecnt[gz];
unsigned int ocdata[2] = {domain, gz+gzOffset};
unsigned int ocdata[2] = {static_cast<unsigned int>(domain),
static_cast<unsigned int>(gz+gzOffset)};
if (((nsdims == 3) && (fcnt == 3 || // Must be tri
fcnt == 4 || // Maybe tet or quad
......
......@@ -245,8 +245,9 @@ avtZeusMPFileFormat::GetFileInformation()
{
int32 sds_id = SDselect(file_handle, var);
if(sds_id == FAIL)
{
debug4 << "SDselect failed for " << dsname << endl;
}
// Read the long_name attribute to see what we should call the variable.
int32 attr_index = SDfindattr(sds_id, "long_name");
if (attr_index != FAIL)
......
......@@ -68,8 +68,8 @@ void dbg_maskstderr(int mask,char *fmt, ...);
#define DBGVERBOSE dbg_isverbose
#define varprint(debug, format, __var) if (debug) {printf(#__var" is '"format"'\n", __var); fflush(stdout);}
#define badvalue(format, __var, astring, errval) if (1) {printf("Bad value of "#__var" while reading file "astring": '"#format"'\n", __var); fflush(stdout); return errval;}
#define varprint(debug, format, __var) if (debug) {printf(#__var" is '" format "'\n", __var); fflush(stdout);}
#define badvalue(format, __var, astring, errval) if (1) {printf("Bad value of " #__var " while reading file " astring ": '" #format "'\n", __var); fflush(stdout); return errval;}
#define vectprint(debug, array, length) if (debug) {\
int __i=0; \
printf("printing array "#array":\n"); \
......
......@@ -452,7 +452,9 @@ QvisImageAnnotationInterface::positionStartChanged(double x, double y)
void
QvisImageAnnotationInterface::widthChanged(int w)
{
double pos[] = {w, annot->GetPosition2()[1], 0};
double pos[] = {static_cast<double>(w),
annot->GetPosition2()[1],
0.};
annot->SetPosition2(pos);
SetUpdate(false);
Apply();
......@@ -483,7 +485,7 @@ QvisImageAnnotationInterface::widthChanged(int w)
void
QvisImageAnnotationInterface::heightChanged(int h)
{
double pos[] = {annot->GetPosition2()[0], h, 0};
double pos[] = {annot->GetPosition2()[0], static_cast<double>(h), 0.};
annot->SetPosition2(pos);
SetUpdate(false);
Apply();
......
......@@ -698,9 +698,9 @@ avtConeFilter::SetUpProjection(avtConeFilterVTKObjects &obj)
}
}
float origin[4] = {Corigin[0], Corigin[1], Corigin[2],1};
float normal[3] = {nx,ny,nz};
float upaxis[3] = {ux,uy,uz};
double origin[4] = {Corigin[0], Corigin[1], Corigin[2],1};
double normal[3] = {nx,ny,nz};
double upaxis[3] = {ux,uy,uz};
vtkMath::Normalize(normal);
vtkMath::Normalize(upaxis);
......@@ -709,7 +709,7 @@ avtConeFilter::SetUpProjection(avtConeFilterVTKObjects &obj)
// The normal and up vectors for two thirds of a basis, take their
// cross product to find the third element of the basis.
//
float third[3];
double third[3];
vtkMath::Cross(upaxis, normal, third);
vtkMath::Normalize(third);
......@@ -765,7 +765,7 @@ avtConeFilter::SetUpProjection(avtConeFilterVTKObjects &obj)
obj.transform->SetTransform(mtlt);
mtlt->Delete();
float zdim[4];
double zdim[4];
ftcf->MultiplyPoint(origin, zdim);
zdim[0] = 0;
zdim[1] = 0;
......
......@@ -1509,7 +1509,9 @@ avtOpenGLMoleculeRenderer::DrawCylinderBetweenTwoPoints(double *p0,
{
CalculateCylPts();
float vc[3] = {p1[0]-p0[0], p1[1]-p0[1], p1[2]-p0[2]};
float vc[3] = {static_cast<float>(p1[0]-p0[0]),
static_cast<float>(p1[1]-p0[1]),
static_cast<float>(p1[2]-p0[2])};
float va[3];
float vb[3];
......@@ -1580,7 +1582,9 @@ avtOpenGLMoleculeRenderer::DrawCylinderCap(double *p0,
CalculateCylPts();
float vc[3] = {p1[0]-p0[0], p1[1]-p0[1], p1[2]-p0[2]};
float vc[3] = {static_cast<float>(p1[0]-p0[0]),
static_cast<float>(p1[1]-p0[1]),
static_cast<float>(p1[2]-p0[2])};
float va[3];
float vb[3];
......