Commit 753d4f5f authored by pugmire's avatar pugmire
Browse files

Fix for multi-time files.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16091 18c085ea-50e0-402c-830e-de6fd14e8384
parent 421fdf75
......@@ -90,35 +90,18 @@ avtADIOSBasicFileFormat::Identify(ADIOSFileObject *f)
// ****************************************************************************
avtFileFormatInterface *
avtADIOSBasicFileFormat::CreateInterface(ADIOSFileObject *f,
const char *const *list,
avtADIOSBasicFileFormat::CreateInterface(const char *const *list,
int nList,
int nBlock)
{
int nTimestepGroups = nList / nBlock;
avtMTMDFileFormat **ffl = new avtMTMDFileFormat*[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
ffl[i] = new avtADIOSBasicFileFormat(list[i*nBlock], (i==0)?f:NULL);
ffl[i] = new avtADIOSBasicFileFormat(list[i*nBlock]);
return new avtMTMDFileFormatInterface(ffl, nTimestepGroups);
}
// ****************************************************************************
// Method: avtADIOSBasicFileFormat constructor
//
// Programmer: Dave Pugmire
// Creation: Thu Sep 17 11:23:05 EDT 2009
//
// ****************************************************************************
avtADIOSBasicFileFormat::avtADIOSBasicFileFormat(const char *nm, ADIOSFileObject *f)
: avtMTMDFileFormat(nm)
{
fileObj = f;
initialized = false;
}
// ****************************************************************************
// Method: avtADIOSBasicFileFormat constructor
//
......
......@@ -73,12 +73,10 @@ class avtADIOSBasicFileFormat : public avtMTMDFileFormat
{
public:
static bool Identify(ADIOSFileObject *);
static avtFileFormatInterface *CreateInterface(ADIOSFileObject *f,
const char *const *list,
static avtFileFormatInterface *CreateInterface(const char *const *list,
int nList,
int nBlock);
avtADIOSBasicFileFormat(const char *);
avtADIOSBasicFileFormat(const char *, ADIOSFileObject *);
virtual ~avtADIOSBasicFileFormat();
//
......
......@@ -103,6 +103,7 @@ ADIOS_CreateFileFormatInterface(const char * const *list, int nList, int nBlock)
debug5<<"Database is avtADIOSBasicFileFormat"<<endl;
flavor = 0;
}
delete f;
}
CATCH(VisItException)
{
......@@ -114,20 +115,20 @@ ADIOS_CreateFileFormatInterface(const char * const *list, int nList, int nBlock)
switch(flavor)
{
case 1:
ffi = avtXGCFileFormat::CreateInterface(f, list, nList, nBlock);
ffi = avtXGCFileFormat::CreateInterface(list, nList, nBlock);
break;
case 2:
ffi = avtPixieFileFormat::CreateInterface(f, list, nList, nBlock);
ffi = avtPixieFileFormat::CreateInterface(list, nList, nBlock);
break;
case 0:
ffi = avtADIOSBasicFileFormat::CreateInterface(f, list, nList, nBlock);
ffi = avtADIOSBasicFileFormat::CreateInterface(list, nList, nBlock);
break;
default:
delete f;
return NULL;
}
}
return ffi;
......
......@@ -95,35 +95,18 @@ avtPixieFileFormat::Identify(ADIOSFileObject *f)
// ****************************************************************************
avtFileFormatInterface *
avtPixieFileFormat::CreateInterface(ADIOSFileObject *f,
const char *const *list,
int nList,
int nBlock)
avtPixieFileFormat::CreateInterface(const char *const *list,
int nList,
int nBlock)
{
int nTimestepGroups = nList / nBlock;
avtMTMDFileFormat **ffl = new avtMTMDFileFormat*[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
ffl[i] = new avtPixieFileFormat(list[i*nBlock], (i==0)?f:NULL);
ffl[i] = new avtPixieFileFormat(list[i*nBlock]);
return new avtMTMDFileFormatInterface(ffl, nTimestepGroups);
}
// ****************************************************************************
// Method: avtPixieFileFormat constructor
//
// Programmer: Dave Pugmire
// Creation: Wed Mar 17 15:29:24 EDT 2010
//
// ****************************************************************************
avtPixieFileFormat::avtPixieFileFormat(const char *nm, ADIOSFileObject *f)
: avtMTMDFileFormat(nm)
{
file = f;
initialized = false;
}
// ****************************************************************************
// Method: avtPixieFileFormat constructor
//
......
......@@ -76,12 +76,10 @@ class avtPixieFileFormat : public avtMTMDFileFormat
{
public:
static bool Identify(ADIOSFileObject *);
static avtFileFormatInterface *CreateInterface(ADIOSFileObject *f,
const char *const *list,
static avtFileFormatInterface *CreateInterface(const char *const *list,
int nList,
int nBlock);
avtPixieFileFormat(const char *);
avtPixieFileFormat(const char *, ADIOSFileObject *);
virtual ~avtPixieFileFormat();
virtual void GetCycles(std::vector<int> &);
......
......@@ -97,15 +97,14 @@ avtXGCFileFormat::Identify(ADIOSFileObject *f)
// ****************************************************************************
avtFileFormatInterface *
avtXGCFileFormat::CreateInterface(ADIOSFileObject *f,
const char *const *list,
avtXGCFileFormat::CreateInterface(const char *const *list,
int nList,
int nBlock)
{
int nTimestepGroups = nList / nBlock;
avtMTMDFileFormat **ffl = new avtMTMDFileFormat*[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
ffl[i] = new avtXGCFileFormat(list[i*nBlock], (i==0)?f:NULL);
ffl[i] = new avtXGCFileFormat(list[i*nBlock]);
return new avtMTMDFileFormatInterface(ffl, nTimestepGroups);
}
......@@ -194,23 +193,6 @@ avtXGCFileFormat::IsFieldIFile(ADIOSFileObject *f)
}
// ****************************************************************************
// Method: avtXGCFileFormat constructor
//
// Programmer: Dave Pugmire
// Creation: Tue Mar 9 12:40:15 EST 2010
//
// ****************************************************************************
avtXGCFileFormat::avtXGCFileFormat(const char *nm, ADIOSFileObject *f)
: avtMTMDFileFormat(nm)
{
file = f;
meshFile = NULL;
initialized = false;
}
// ****************************************************************************
// Method: avtXGCFileFormat constructor
//
......
......@@ -67,8 +67,7 @@ class avtXGCFileFormat : public avtMTMDFileFormat
{
public:
static bool Identify(ADIOSFileObject *);
static avtFileFormatInterface *CreateInterface(ADIOSFileObject *f,
const char *const *list,
static avtFileFormatInterface *CreateInterface(const char *const *list,
int nList,
int nBlock);
static std::string CreateMeshName(const std::string &filename);
......@@ -76,7 +75,6 @@ class avtXGCFileFormat : public avtMTMDFileFormat
static bool IsFieldIFile(ADIOSFileObject *f);
avtXGCFileFormat(const char *);
avtXGCFileFormat(const char *, ADIOSFileObject *);
virtual ~avtXGCFileFormat();
//
......
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