Commit b2057e09 authored by hrchilds's avatar hrchilds

Update from June 22, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@689 18c085ea-50e0-402c-830e-de6fd14e8384
parent a76a0fcb
This diff is collapsed.
......@@ -356,16 +356,20 @@ endif
cd distribution/visit/$version
# Determine the platform
set findgui = `find . -name gui`
set platformBin = `echo "$findgui" | sed -e "s/gui//"`
set savepwd = `pwd`
cd $platformBin/..
set platformPath = `pwd`
cd $savepwd
set platformDir = ""
foreach f (`echo $platformPath | tr "/" " "`)
set platformDir = $f
end
if("$os" == "darwin") then
set platformDir = "darwin-ppc"
else
set findgui = `find . -name gui`
set platformBin = `echo "$findgui" | sed -e "s/gui//"`
set savepwd = `pwd`
cd $platformBin/..
set platformPath = `pwd`
cd $savepwd
set platformDir = ""
foreach f (`echo $platformPath | tr "/" " "`)
set platformDir = $f
end
endif
# Copy the files
find . -print | cpio -pmud $dir/$version+
cd ../../..
......
......@@ -53,6 +53,9 @@
# optional -nodist argument that can make the script use an existing
# source distribution.
#
# Brad Whitlock, Tue Jun 13 16:44:22 PST 2006
# Added VisIt 1.5.3 and VTK 5.0 updates.
#
#------------------------------------------------------------------------------
if(`pwd` != "/data_vobs/VisIt") then
......@@ -122,6 +125,7 @@ mkdir include/VisIt
# blowing it away.
cp $VISITSRC/include/visit/lite_pdb.h include/VisIt
cp $VISITSRC/include/visit/lite_score.h include/VisIt
cp $VISITSRC/include/visit/visit-hdf5.h include/VisIt
# Remove the $VISITSRC/include/visit directory since it's full of symlinks and Windows
# will not honor them.
echo "Removing old visit include directory..."
......@@ -175,14 +179,19 @@ end
# Put the VTK header files into include/VTK
#
echo "Copying VTK include files to include/VTK..."
foreach hdrdir (Common Filtering Graphics Hybrid IO Imaging Rendering)
foreach hdrdir (Common Filtering GenericFiltering Graphics Hybrid IO Imaging Rendering VolumeRendering)
foreach hdrfile (`find $TOPDIR/include/vtk/$hdrdir -name "*.h"`)
cp $hdrfile include/VTK
end
end
# Copy TXX files
cp $TOPDIR/include/vtk/Common/*.txx include/VTK
cp $TOPDIR/include/vtk/Filtering/*.txx include/VTK
# Copy vtkstd
cp -R $TOPDIR/include/vtk/vtkstd include/VTK
# Copy mangled mesa
mkdir include/VTK/MangleMesaInclude
cp $TOPDIR/include/vtk/MangleMesaInclude/*.h include/VTK/MangleMesaInclude
cp $TOPDIR/include/vtk/expat.h include/VTK
#
......@@ -229,7 +238,7 @@ end
#
foreach buildmode (Debug Release)
cd $VisItDev/bin/$buildmode
foreach DLL (MesaGL.dll hdf5dll.dll osmesa.dll silohdf5.dll sziplib.dll zlib.dll libbz2.dll)
foreach DLL (MesaGL.dll hdf5dll.dll osmesa.dll silohdf5.dll szlibdll.dll zlib.dll libbz2.dll)
cp $DLL ../MSVC7.Net/$buildmode
end
end
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -42,15 +42,15 @@
#define MAX_ELEMENT_NUMBER 109
#define KNOWN_AMINO_ACIDS 23
extern unsigned char aminocolors[KNOWN_AMINO_ACIDS][3];
extern unsigned char shapelycolors[KNOWN_AMINO_ACIDS][3];
extern unsigned char jmolcolors[MAX_ELEMENT_NUMBER][3];
extern unsigned char rasmolcolors[MAX_ELEMENT_NUMBER][3];
extern float atomic_radius[MAX_ELEMENT_NUMBER];
extern float covalent_radius[MAX_ELEMENT_NUMBER];
extern UTILITY_API unsigned char aminocolors[KNOWN_AMINO_ACIDS][3];
extern UTILITY_API unsigned char shapelycolors[KNOWN_AMINO_ACIDS][3];
extern UTILITY_API unsigned char jmolcolors[MAX_ELEMENT_NUMBER][3];
extern UTILITY_API unsigned char rasmolcolors[MAX_ELEMENT_NUMBER][3];
extern UTILITY_API float atomic_radius[MAX_ELEMENT_NUMBER];
extern UTILITY_API float covalent_radius[MAX_ELEMENT_NUMBER];
extern const char *element_names[MAX_ELEMENT_NUMBER];
extern const char *residue_names[KNOWN_AMINO_ACIDS];
extern UTILITY_API const char *element_names[MAX_ELEMENT_NUMBER];
extern UTILITY_API const char *residue_names[KNOWN_AMINO_ACIDS];
int UTILITY_API ElementNameToAtomicNumber(const char *element);
int UTILITY_API ResiduenameToNumber(const char *name);
......
......@@ -1396,7 +1396,7 @@ int
VisItStat(const char *file_name, VisItStat_t *buf)
{
#if defined(_WIN32)
return _stat(name, &statbuf);
return _stat(file_name, buf);
#else
#if SIZEOF_OFF64_T > 4
......@@ -1423,7 +1423,7 @@ int
VisItFstat(int fd, VisItStat_t *buf)
{
#if defined(_WIN32)
return _fstat(fd, &statbuf);
return _fstat(fd, buf);
#else
#if SIZEOF_OFF64_T > 4
......
......@@ -46,10 +46,8 @@
#include <string>
#include <vector>
#if !defined(_WIN32)
#include <sys/types.h>
#include <sys/stat.h>
#endif
//
// Type definitions
......
......@@ -6462,7 +6462,7 @@ else
HDF5_INCLUDE="-I$DEFAULT_HDF5_INCLUDE $HDF5_INCLUDE"
fi
if test "$DEFAULT_HDF5_LIB" != "" ; then
HDF5_LIB="$DEFAULT_HDF5_LIB/libhdf5.$H5_LIBEXT -lz $HDF5_LIB"
HDF5_LIB="$DEFAULT_HDF5_LIB/libhdf5.$H5_LIBEXT $HDF5_LIB"
fi
fi
if test "$HDF5_LIB" != "" ; then
......@@ -10672,7 +10672,7 @@ case $SHORT_UNAME in
PREBIND_LIBS="$""(PREBIND_LIBS)"
# Create the address.txt file with the initial offset for the VisIt libraries.
rm -f address.txt linkedit.log
echo "0x36e9f000" > address.txt
echo "0x249a8000" > address.txt
;;
esac
# Set up the defaults
......
......@@ -1574,7 +1574,7 @@ else
HDF5_INCLUDE="-I$DEFAULT_HDF5_INCLUDE $HDF5_INCLUDE"
fi
if test "$DEFAULT_HDF5_LIB" != "" ; then
HDF5_LIB="$DEFAULT_HDF5_LIB/libhdf5.$H5_LIBEXT -lz $HDF5_LIB"
HDF5_LIB="$DEFAULT_HDF5_LIB/libhdf5.$H5_LIBEXT $HDF5_LIB"
fi
fi
if test "$HDF5_LIB" != "" ; then
......@@ -2946,7 +2946,7 @@ case $SHORT_UNAME in
PREBIND_LIBS="$""(PREBIND_LIBS)"
# Create the address.txt file with the initial offset for the VisIt libraries.
rm -f address.txt linkedit.log
echo "0x36e9f000" > address.txt
echo "0x249a8000" > address.txt
;;
esac
# Set up the defaults
......
......@@ -65,7 +65,26 @@ void lib_quit_bow()
/* lib_public include: */
#include "bow.h"
#include "Utility.h"
//
// Make some substitutions so the code is portable to Windows.
//
#if defined(_WIN32)
#include <process.h>
#include <io.h>
#define GETPID getpid
#define FILE_OPEN _open
#define FILE_CLOSE _close
#define FILE_READ _read
#define FILE_WRITE _write
#else
#define GETPID getpid
#define FILE_OPEN open
#define FILE_CLOSE close
#define FILE_READ read
#define FILE_WRITE write
#endif
extern int libargc;
......@@ -363,7 +382,7 @@ float *bow2bof(bowglobal bg,char *bow,int bowi)
find_tmpdir(tmpdir);
sprintf(tmpname,"%s/bof2bow_tmp%d_%d_%d_%d",tmpdir,
binf->ti[bowi],binf->bi[bowi],binf->vi[bowi],getpid());
binf->ti[bowi],binf->bi[bowi],binf->vi[bowi],GETPID());
sprintf(tmpnamegz,"%s.gz",tmpname);
fioX_write(tmpnamegz,(char *)ub,size-FULLHEADSIZE);
sprintf(cmd,"gunzip %s",tmpnamegz);
......@@ -722,14 +741,14 @@ static char *fioX_read(bowglobal bg,char *pathsrc)
char *buf;
/* open for read, get size stat */
if ((id=open(pathsrc,O_RDONLY))<0) RET((char *)0)
if (fstat(id,st)) { close(id); RET((char *)0) }
if ((id=FILE_OPEN(pathsrc,O_RDONLY))<0) RET((char *)0)
if (fstat(id,st)) { FILE_CLOSE(id); RET((char *)0) }
n=st->st_size;
if (n<=0) { close(id); RET((char *)0) }
if (n<=0) { FILE_CLOSE(id); RET((char *)0) }
buf=(char *)(*bg->alloc)(bg->opaque,n);
if (read(id,buf,n)!=n)
{ close(id); (*bg->free)(bg->opaque,(void *)buf); RET((char *)0) }
close(id);
if (FILE_READ(id,buf,n)!=n)
{ FILE_CLOSE(id); (*bg->free)(bg->opaque,(void *)buf); RET((char *)0) }
FILE_CLOSE(id);
RET(buf)
}
......@@ -742,10 +761,10 @@ static int fioX_write(char *pathdst,char *buf,int size)
{
int id;
id=open(pathdst,O_WRONLY|O_CREAT|O_TRUNC,0644);
id=FILE_OPEN(pathdst,O_WRONLY|O_CREAT|O_TRUNC,0644);
if (id<0) RET(-1)
if (write(id,buf,size)!=size) { close(id); RET(-1) }
close(id);
if (FILE_WRITE(id,buf,size)!=size) { FILE_CLOSE(id); RET(-1) }
FILE_CLOSE(id);
RET(0)
}
......
......@@ -130,8 +130,9 @@ void lib_quit_bow();
#define finfo finfo_BOWFIX
/* lib_include "unistd.h" */
#ifndef _WIN32
#include "unistd.h"
#endif
#undef finfo
/* lib_include "fcntl.h" */
......
<?xml version="1.0"?>
<Plugin name="Chombo" type="database" label="Chombo" version="1.0" enabled="true" mdspecificcode="false" onlyengine="false" noengine="false" dbtype="STMD" haswriter="false" hasoptions="false">
<CXXFLAGS> $(HDF5_INCLUDE) </CXXFLAGS>
<LIBS> $(HDF5_LIB) </LIBS>
<LIBS> $(HDF5_LIB) $(ZLIB_LIB) </LIBS>
<Extensions> hdf5 h5 </Extensions>
</Plugin>
......@@ -2,5 +2,5 @@
<Plugin name="CosmosPP" label="CosmosPP" type="database" dbtype="MTMD" version="1.0">
<Extensions> cosmospp cosmos++ </Extensions>
<CXXFLAGS> $(HDF5_INCLUDE) </CXXFLAGS>
<LIBS> $(HDF5_LIB) </LIBS>
<LIBS> $(HDF5_LIB) $(ZLIB_LIB) </LIBS>
</Plugin>
......@@ -2,5 +2,5 @@
<Plugin name="Enzo" label="Enzo" type="database" dbtype="STMD" version="1.0">
<Extensions> hierarchy boundary </Extensions>
<CXXFLAGS> $(HDF4_FLAGS) $(HDF5_INCLUDE) </CXXFLAGS>
<LIBS> $(HDF4_LIBS) $(HDF5_LIB) </LIBS>
<LIBS> $(HDF4_LIBS) $(HDF5_LIB) $(ZLIB_LIB) </LIBS>
</Plugin>
......@@ -4,7 +4,7 @@
$(HDF5_INCLUDE)
</CXXFLAGS>
<LIBS>
$(HDF5_LIB)
$(HDF5_LIB) $(ZLIB_LIB)
</LIBS>
<Attribute name="" purpose="" persistent="true">
</Attribute>
......
......@@ -2,5 +2,5 @@
<Plugin name="GTC" type="database" label="GTC" version="1.0" dbtype="STSD">
<Extensions> h5 </Extensions>
<CXXFLAGS> $(HDF5_INCLUDE) </CXXFLAGS>
<LIBS> $(HDF5_LIB) </LIBS>
<LIBS> $(HDF5_LIB) $(ZLIB_LIB) </LIBS>
</Plugin>
......@@ -995,6 +995,18 @@ void avtMFIXFileFormat::SkipBytes(istream& in, int n)
in.read(this->DataBuffer,n); // maybe seekg instead
}
//----------------------------------------------------------------------------
// ****************************************************************************
// Method: avtMFIXFileFormat::GetBlockOfDoubles
//
// Programmer: MFIX team
// Creation: Tue Jun 20 09:37:27 PDT 2006
//
// Modifications:
// Brad Whitlock, Tue Jun 20 09:37:45 PDT 2006
// Fixed a bug that could clobber the stack.
//
// ****************************************************************************
void avtMFIXFileFormat::GetBlockOfDoubles(istream& in, std::vector<double> &v, int n)
{
const int numberOfDoublesInBlock = 512/sizeof(double);
......@@ -1013,7 +1025,7 @@ void avtMFIXFileFormat::GetBlockOfDoubles(istream& in, std::vector<double> &v, i
int c = 0;
for (int i=0; i<numberOfRecords; ++i)
{
in.read( (char*)&tempArray , 512 );
in.read( (char*)tempArray , 512 );
for (int j=0; j<numberOfDoublesInBlock; ++j)
{
if (c < n)
......@@ -1027,6 +1039,17 @@ void avtMFIXFileFormat::GetBlockOfDoubles(istream& in, std::vector<double> &v, i
}
}
//----------------------------------------------------------------------------
// ****************************************************************************
// Method: avtMFIXFileFormat::GetBlockOfInts
//
// Programmer: MFIX team
// Creation: Tue Jun 20 09:37:27 PDT 2006
//
// Modifications:
// Brad Whitlock, Tue Jun 20 09:37:45 PDT 2006
// Fixed a bug that could clobber the stack.
//
// ****************************************************************************
void avtMFIXFileFormat::GetBlockOfInts(istream& in, std::vector<int> &v, int n)
{
const int numberOfIntsInBlock = 512/sizeof(int);
......@@ -1045,7 +1068,7 @@ void avtMFIXFileFormat::GetBlockOfInts(istream& in, std::vector<int> &v, int n)
int c = 0;
for (int i = 0; i < numberOfRecords; ++i)
{
in.read( (char*)&tempArray , 512 );
in.read( (char*)tempArray , 512 );
for (int j=0; j<numberOfIntsInBlock; ++j)
{
if (c < n)
......@@ -2319,10 +2342,27 @@ void avtMFIXFileFormat::GetVariableAtTimestep(int vari , int tstep,
this->GetBlockOfFloats (in, v, this->IJKMaximum2);
in.close();
}
//----------------------------------------------------------------------------
// ****************************************************************************
// Method: avtMFIXFileFormat::GetBlockOfFloats
//
// Purpose:
// Gets a block of floats from the MFIX file.
//
// Programmer: MFIX team
// Creation: Tue Jun 20 09:32:55 PDT 2006
//
// Modifications:
// Brad Whitlock, Tue Jun 20 09:33:27 PDT 2006
// I changed (char*)&tempArray to (char*)tempArray so the reader would
// no longer overwrite the stack and kill VisIt.
//
// ****************************************************************************
void avtMFIXFileFormat::GetBlockOfFloats(istream& in, vtkFloatArray *v, int n)
{
float tempArray[this->numberOfFloatsInBlock];
float *tempArray = new float[this->numberOfFloatsInBlock];
int numberOfRecords;
if ( n%this->numberOfFloatsInBlock == 0)
......@@ -2338,7 +2378,7 @@ void avtMFIXFileFormat::GetBlockOfFloats(istream& in, vtkFloatArray *v, int n)
int cnt = 0;
for (int i=0; i<numberOfRecords; ++i)
{
in.read( (char*)&tempArray , 512 );
in.read( (char*)tempArray , 512 );
for (int j=0; j<this->numberOfFloatsInBlock; ++j)
{
if (c < n)
......@@ -2355,6 +2395,8 @@ void avtMFIXFileFormat::GetBlockOfFloats(istream& in, vtkFloatArray *v, int n)
}
}
}
delete [] tempArray;
}
//----------------------------------------------------------------------------
void avtMFIXFileFormat::SwapFloat(float &value)
......
......@@ -18,6 +18,10 @@
avtADAPTFileFormat.C
avtLODIFileFormat.C
avtLODIParticleFileFormat.C
avtFVCOM_STSDFileFormat.C
avtFVCOMReader.C
avtFVCOMParticleFileFormat.C
avtFVCOM_MTSDFileFormat.C
NETCDFFileObject.C
</Files>
<Files components="E">
......@@ -26,6 +30,10 @@
avtADAPTFileFormat.C
avtLODIFileFormat.C
avtLODIParticleFileFormat.C
avtFVCOM_STSDFileFormat.C
avtFVCOMReader.C
avtFVCOMParticleFileFormat.C
avtFVCOM_MTSDFileFormat.C
NETCDFFileObject.C
</Files>
<Attribute name="" purpose="" persistent="true">
......
......@@ -202,12 +202,19 @@ NETCDFFileObject::IsOpen() const
bool
NETCDFFileObject::Open()
{
const char *mName = "NETCDFFileObject::Open: ";
int id = INVALID_FILE_HANDLE;
int status;
if((status = nc_open(filename.c_str(), NC_NOWRITE, &id)) == NC_NOERR)
{
ncid = id;
debug4 << mName << filename.c_str() << " was opened." << endl;
}
else
{
debug4 << mName << "Could not open " << filename.c_str() << ": ";
HandleError(status);
}
return ncid != INVALID_FILE_HANDLE;
}
......@@ -836,7 +843,11 @@ NETCDFFileObject::AutoOpen()
{
bool retval = true;
if(ncid == INVALID_FILE_HANDLE)
{
debug4 << "NETCDFFileObject::AutoOpen: need to open " << filename.c_str()
<< ". Calling Open." << endl;
retval = Open();
}
return retval;
}
......
This diff is collapsed.
// ************************************************************************* //
// avtFVCOMParticleFileFormat.h //
// ************************************************************************* //
#ifndef AVT_FVCOM_FILE_FORMAT_H
#define AVT_FVCOM_FILE_FORMAT_H
#include <avtMTSDFileFormat.h>
#include <avtMTSDFileFormatInterface.h>
#include <vectortypes.h>
class NETCDFFileObject;
class avtFileFormatInterface;
// ****************************************************************************
// Class: avtFVCOMParticleFileFormat
//
// Purpose:
// Reads in FVCOM files as a plugin to VisIt.
//
// Programmer: David Stuebe
// Creation: Thu May 18 08:39:01 PDT 2006
//
// ****************************************************************************
class avtFVCOMParticleFileFormat : public avtMTSDFileFormat
{
public:
static bool Identify(NETCDFFileObject *);
static avtFileFormatInterface *CreateInterface(NETCDFFileObject *f,
const char *const *list, int nList, int nBlock);
avtFVCOMParticleFileFormat(const char *, NETCDFFileObject *);
avtFVCOMParticleFileFormat(const char *);
virtual ~avtFVCOMParticleFileFormat();
//
// If you know the times and cycle numbers, overload this function.
// Otherwise, VisIt will make up some reasonable ones for you.
//
virtual void GetCycles(std::vector<int> &);
virtual void GetTimes(std::vector<double> &);
//
virtual int GetNTimesteps(void);
virtual const char *GetType(void) { return "FVCOM"; };
virtual void FreeUpResources(void);
virtual vtkDataSet *GetMesh(int, const char *);
virtual vtkDataArray *GetVar(int, const char *);
virtual vtkDataArray *GetVectorVar(int, const char *);
protected:
// DATA MEMBERS
NETCDFFileObject *fileObject;
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
};
#endif
This diff is collapsed.
// ************************************************************************* //
// avtFVCOMReader.h //
// ************************************************************************* //
#ifndef AVT_FVCOM_READER_H
#define AVT_FVCOM_READER_H
#include <vectortypes.h>
class vtkDataArray;
class vtkDataSet;
class avtDatabaseMetaData;
class avtFileFormatInterface;
class NETCDFFileObject;