avth5partFileFormat.h 2.34 KB
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8
// ************************************************************************* //
//                            avth5partFileFormat.h                           //
// ************************************************************************* //

#ifndef AVT_h5part_FILE_FORMAT_H
#define AVT_h5part_FILE_FORMAT_H

#include <avtMTMDFileFormat.h>
9
#include <H5Part.h>
gsell's avatar
gsell committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

#include <vector>
#include <string>




// ****************************************************************************
//  Class: avth5partFileFormat
//
//  Purpose:
//      Reads in h5part files as a plugin to VisIt.
//
//  Programmer: cristina -- generated by xml2avt
//  Creation:   Mon Feb 27 13:53:31 PST 2006
//
// ****************************************************************************

class avth5partFileFormat : public avtMTMDFileFormat
{
  public:
                       avth5partFileFormat(const char *);
    virtual           ~avth5partFileFormat() {;};

    //
    // This is used to return unconvention data -- ranging from material
    // information to information about block connectivity.
    //
    // virtual void      *GetAuxiliaryData(const char *var, const char *type,
    //                                     int timestep, int domain,void *args, 
    //                                     DestructorFunction &);
    //

    //
    // 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 "h5part"; };
    virtual void           FreeUpResources(void); 

    virtual vtkDataSet    *GetMesh(int, int, const char *);
    virtual vtkDataArray  *GetVar(int, int, const char *);
    virtual vtkDataArray  *GetVectorVar(int, int, const char *);

  protected:
    // DATA MEMBERS

    virtual void           PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
    std::string fname; //filename
    std::vector<float>  points; //point coordinates
    std::vector<std::vector<float> > pointvars; //point variables
    std::vector<std::string> pointvarnames; //point variables' names
    std::vector<float> minExtents; //min extents
    std::vector<float> maxExtents; //max extents


};


#endif