Commit 4539cd8b authored by hrchilds's avatar hrchilds
Browse files

Merge RC to trunk; pick up fix for groups of Exodus files.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11831 18c085ea-50e0-402c-830e-de6fd14e8384
parent 8efa960e
......@@ -57,3 +57,13 @@ VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.7/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP})
##
## Exodus
##
VISIT_OPTION_DEFAULT(VISIT_EXODUSII_DIR ${VISITHOME}/exodus/4.46/${VISITARCH})
##
## NetCDF
##
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/3.6.3/${VISITARCH})
......@@ -35,70 +35,18 @@ Definition:
// I changed the code so when nBlocks==-1 it will treat the list of files
// as domains so multiblock files work again.
//
// Hank Childs, Wed Jul 7 15:54:21 PDT 2010
// Simplified the logic in this code. It is no longer possible to append
// Exodus files in time. (This was mostly broken anyway.)
//
// ****************************************************************************
avtDatabase *
ExodusCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
string file1 = list[0];
bool containsManyFiles = false;
if (nList == 1 &&
file1.length() > 7 && file1.substr(file1.length()-7,7)==".exodus")
containsManyFiles = true;
if (nList == 1 &&
file1.length() > 7 && file1.substr(file1.length()-7,7)==".EXODUS")
containsManyFiles = true;
if (nList == 1 &&
file1.length() > 8 && file1.substr(file1.length()-8,8)==".nemesis")
containsManyFiles = true;
if (nList == 1 &&
file1.length() > 8 && file1.substr(file1.length()-8,8)==".NEMESIS")
containsManyFiles = true;
if (containsManyFiles)
{
const char *filename = list[0];
char **reallist = NULL;
int listcount = 0;
avtDatabase::GetFileListFromTextFile(filename, reallist, listcount);
avtDatabase *rv = ExodusCommonPluginInfo::SetupDatabase(reallist,
listcount,-1);
//
// Clean up memory
//
for (int i = 0 ; i < listcount ; i++)
{
delete [] reallist[i];
}
delete [] reallist;
return rv;
}
//
// We don't want to register the file list with every Exodus file format,
// because that list can get big. Instead, register a list statically
// with the format. It will return an index and then tell each new
// instance that it should use this index.
//
int fileListId = -1;
if (!containsManyFiles)
{
fileListId = avtExodusFileFormat::RegisterFileList(list, nList);
}
int nTimestepGroups = 1;
if(nBlock == -1)
{
// If nBlock == -1 then we're in here recursively and we're dealing
// with a list of domains.
nBlock = nList;
}
nTimestepGroups = nList / nBlock;
nBlock = nList;
avtMTSDFileFormat ***ffl = new avtMTSDFileFormat**[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
......@@ -107,8 +55,6 @@ ExodusCommonPluginInfo::SetupDatabase(const char *const *list,
for (int j = 0 ; j < nBlock ; j++)
{
avtExodusFileFormat *exo = new avtExodusFileFormat(list[i*nBlock+j]);
if (!containsManyFiles)
exo->SetFileList(fileListId);
ffl[i][j] = exo;
}
}
......
......@@ -90,70 +90,18 @@ ExodusCommonPluginInfo::GetDatabaseType()
// I changed the code so when nBlocks==-1 it will treat the list of files
// as domains so multiblock files work again.
//
// Hank Childs, Wed Jul 7 15:54:21 PDT 2010
// Simplified the logic in this code. It is no longer possible to append
// Exodus files in time. (This was mostly broken anyway.)
//
// ****************************************************************************
avtDatabase *
ExodusCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
string file1 = list[0];
bool containsManyFiles = false;
if (nList == 1 &&
file1.length() > 7 && file1.substr(file1.length()-7,7)==".exodus")
containsManyFiles = true;
if (nList == 1 &&
file1.length() > 7 && file1.substr(file1.length()-7,7)==".EXODUS")
containsManyFiles = true;
if (nList == 1 &&
file1.length() > 8 && file1.substr(file1.length()-8,8)==".nemesis")
containsManyFiles = true;
if (nList == 1 &&
file1.length() > 8 && file1.substr(file1.length()-8,8)==".NEMESIS")
containsManyFiles = true;
if (containsManyFiles)
{
const char *filename = list[0];
char **reallist = NULL;
int listcount = 0;
avtDatabase::GetFileListFromTextFile(filename, reallist, listcount);
avtDatabase *rv = ExodusCommonPluginInfo::SetupDatabase(reallist,
listcount,-1);
//
// Clean up memory
//
for (int i = 0 ; i < listcount ; i++)
{
delete [] reallist[i];
}
delete [] reallist;
return rv;
}
//
// We don't want to register the file list with every Exodus file format,
// because that list can get big. Instead, register a list statically
// with the format. It will return an index and then tell each new
// instance that it should use this index.
//
int fileListId = -1;
if (!containsManyFiles)
{
fileListId = avtExodusFileFormat::RegisterFileList(list, nList);
}
int nTimestepGroups = 1;
if(nBlock == -1)
{
// If nBlock == -1 then we're in here recursively and we're dealing
// with a list of domains.
nBlock = nList;
}
nTimestepGroups = nList / nBlock;
nBlock = nList;
avtMTSDFileFormat ***ffl = new avtMTSDFileFormat**[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
......@@ -162,8 +110,6 @@ ExodusCommonPluginInfo::SetupDatabase(const char *const *list,
for (int j = 0 ; j < nBlock ; j++)
{
avtExodusFileFormat *exo = new avtExodusFileFormat(list[i*nBlock+j]);
if (!containsManyFiles)
exo->SetFileList(fileListId);
ffl[i][j] = exo;
}
}
......
......@@ -15,6 +15,7 @@
<p><b><font size="4">Bugs fixed in version 2.0.2</font></b></p>
<ul>
<li>Color tables that include transparency can now be saved in a session and restored properly.</li>
<li>Groups of Exodus files can now be read correctly.</li>
</ul>
<p><b><font size="4">Enhancements in version 2.0.2</font></b></p>
<ul>
......
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