avtDatabaseMetaData.h 25.1 KB
Newer Older
hrchilds's avatar
hrchilds committed
1 2 3 4 5 6 7 8
// ************************************************************************* //
//                             avtDatabaseMetaData.h                         //
// ************************************************************************* //

#ifndef _AVT_DATABASE_METADATA_H_
#define _AVT_DATABASE_METADATA_H_
#include <dbatts_exports.h>

hrchilds's avatar
hrchilds committed
9
#include <visitstream.h>
hrchilds's avatar
hrchilds committed
10 11 12 13
#include <vectortypes.h>

#include <avtTypes.h>
#include <AttributeSubject.h>
hrchilds's avatar
hrchilds committed
14
#include <ExpressionList.h>
hrchilds's avatar
hrchilds committed
15

hrchilds's avatar
hrchilds committed
16
class avtSimulationInformation;
hrchilds's avatar
hrchilds committed
17 18 19

//----------------------------------------------------------------------------
//  Class: avtMeshMetaData
hrchilds's avatar
hrchilds committed
20 21 22 23 24
//
//  Modifications:
//
//    Mark C. Miller, August 9, 2004
//    Added containsGlobalZoneIds data member
hrchilds's avatar
hrchilds committed
25 26 27 28
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
hrchilds's avatar
hrchilds committed
29 30 31 32
//----------------------------------------------------------------------------
struct DBATTS_API avtMeshMetaData : public AttributeSubject
{
    std::string   name;
hrchilds's avatar
hrchilds committed
33
    std::string   originalName;
hrchilds's avatar
hrchilds committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
    std::string   blockTitle; 
    std::string   blockPieceName;
    int           numBlocks;
    int           blockOrigin;  // The origin for blocks/domains.
    int           cellOrigin;   // The origin for cells within a block.

    int           numGroups;
    intVector     groupIds;     // Entry i is the group id for the ith block.
    std::string   groupTitle;
    std::string   groupPieceName;

    int           spatialDimension;      // the physical or global dimension
    int           topologicalDimension;  // the parametric or local dimension
    avtMeshType   meshType;
    stringVector  blockNames;
    bool          disjointElements;      // A mesh of disjoint cubes, etc.
    avtGhostType  containsGhostZones;
    bool          containsOriginalCells;
hrchilds's avatar
hrchilds committed
52
    bool          containsOriginalNodes;
hrchilds's avatar
hrchilds committed
53
    bool          containsGlobalNodeIds;
hrchilds's avatar
hrchilds committed
54
    bool          containsGlobalZoneIds;
hrchilds's avatar
hrchilds committed
55 56 57 58 59 60 61 62 63

    bool          hasSpatialExtents;
    float         minSpatialExtents[3];
    float         maxSpatialExtents[3];

    std::string   xUnits;
    std::string   yUnits;
    std::string   zUnits;

hrchilds's avatar
hrchilds committed
64 65 66 67
    std::string   xLabel;
    std::string   yLabel;
    std::string   zLabel;

hrchilds's avatar
hrchilds committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
    bool          validVariable;

public:
    avtMeshMetaData();
    avtMeshMetaData(const float *, std::string, int, int, int, int, int,
                    avtMeshType);
    avtMeshMetaData(std::string, int, int, int, int, int, avtMeshType);
    avtMeshMetaData(const avtMeshMetaData&);
    virtual ~avtMeshMetaData();
    const avtMeshMetaData &operator=(const avtMeshMetaData&);
    virtual void SelectAll();
    void SetExtents(const float *);
    void UnsetExtents() { hasSpatialExtents = false; };
    void Print(ostream &, int = 0) const;
};

//----------------------------------------------------------------------------
//  Class: avtScalarMetaData
hrchilds's avatar
hrchilds committed
86 87 88 89 90 91
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
hrchilds's avatar
hrchilds committed
92 93 94 95
//----------------------------------------------------------------------------
struct DBATTS_API avtScalarMetaData : public AttributeSubject
{
    std::string   name;
hrchilds's avatar
hrchilds committed
96
    std::string   originalName;
hrchilds's avatar
hrchilds committed
97 98 99 100 101 102 103 104 105
    std::string   meshName;

    avtCentering  centering;

    bool          hasDataExtents;
    float         minDataExtents;
    float         maxDataExtents;

    bool          validVariable;
hrchilds's avatar
hrchilds committed
106
    bool          treatAsASCII;
hrchilds's avatar
hrchilds committed
107

hrchilds's avatar
hrchilds committed
108 109
    bool          hasUnits;
    std::string   units;
hrchilds's avatar
hrchilds committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
public:
    avtScalarMetaData();
    avtScalarMetaData(std::string, std::string, avtCentering);
    avtScalarMetaData(std::string, std::string, avtCentering, float, float);
    avtScalarMetaData(const avtScalarMetaData&);
    virtual ~avtScalarMetaData();
    const avtScalarMetaData &operator=(const avtScalarMetaData&);
    virtual void SelectAll();
    void SetExtents(const float *);
    void UnsetExtents() { hasDataExtents = false; };
    void Print(ostream &, int = 0) const;
};

//----------------------------------------------------------------------------
//  Class: avtVectorMetaData
hrchilds's avatar
hrchilds committed
125 126 127 128 129 130
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
hrchilds's avatar
hrchilds committed
131 132 133 134
//----------------------------------------------------------------------------
struct DBATTS_API avtVectorMetaData : public AttributeSubject
{
    std::string          name;
hrchilds's avatar
hrchilds committed
135
    std::string          originalName;
hrchilds's avatar
hrchilds committed
136 137 138 139 140 141
    std::string          meshName;

    avtCentering         centering;
    int                  varDim;

    bool                 hasDataExtents;
hrchilds's avatar
hrchilds committed
142 143
    float                minDataExtents;
    float                maxDataExtents;
hrchilds's avatar
hrchilds committed
144 145 146

    bool                 validVariable;

hrchilds's avatar
hrchilds committed
147 148
    bool                 hasUnits;
    std::string          units;
hrchilds's avatar
hrchilds committed
149 150 151 152 153 154 155 156 157 158 159 160 161 162
public:
    avtVectorMetaData();
    avtVectorMetaData(std::string, std::string, avtCentering, int);
    avtVectorMetaData(std::string, std::string, avtCentering, int, 
                      const float *);
    avtVectorMetaData(const avtVectorMetaData&);
    virtual ~avtVectorMetaData();
    const avtVectorMetaData &operator=(const avtVectorMetaData&);
    virtual void SelectAll();
    void SetExtents(const float *);
    void UnsetExtents() { hasDataExtents = false; };
    void Print(ostream &, int = 0) const;
};

163 164
//----------------------------------------------------------------------------
//  Class: avtTensorMetaData
hrchilds's avatar
hrchilds committed
165 166 167 168 169 170
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
171 172 173 174
//----------------------------------------------------------------------------
struct DBATTS_API avtTensorMetaData : public AttributeSubject
{
    std::string   name;
hrchilds's avatar
hrchilds committed
175
    std::string   originalName;
176 177 178 179
    std::string   meshName;
    int           dim;
    avtCentering  centering;
    bool          validVariable;
hrchilds's avatar
hrchilds committed
180 181
    bool          hasUnits;
    std::string   units;
182 183 184 185 186 187 188 189 190 191 192 193
public:
    avtTensorMetaData();
    avtTensorMetaData(std::string, std::string, avtCentering, int);
    avtTensorMetaData(const avtTensorMetaData&);
    virtual ~avtTensorMetaData();
    const avtTensorMetaData &operator=(const avtTensorMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
};

//----------------------------------------------------------------------------
//  Class: avtSymmetricTensorMetaData
hrchilds's avatar
hrchilds committed
194 195 196 197 198 199
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
200 201 202 203
//----------------------------------------------------------------------------
struct DBATTS_API avtSymmetricTensorMetaData : public AttributeSubject
{
    std::string   name;
hrchilds's avatar
hrchilds committed
204
    std::string   originalName;
205 206 207 208 209 210
    std::string   meshName;
    int           dim;
    avtCentering  centering;

    bool          validVariable;

hrchilds's avatar
hrchilds committed
211 212
    bool          hasUnits;
    std::string   units;
213 214 215 216 217 218 219 220 221 222 223
public:
    avtSymmetricTensorMetaData();
    avtSymmetricTensorMetaData(std::string, std::string, avtCentering, int);
    avtSymmetricTensorMetaData(const avtSymmetricTensorMetaData&);
    virtual ~avtSymmetricTensorMetaData();
    const avtSymmetricTensorMetaData 
                                &operator=(const avtSymmetricTensorMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
};

hrchilds's avatar
hrchilds committed
224 225
//----------------------------------------------------------------------------
//  Class: avtMaterialMetaData
hrchilds's avatar
hrchilds committed
226 227 228 229 230 231
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
hrchilds's avatar
hrchilds committed
232 233 234 235
//----------------------------------------------------------------------------
struct DBATTS_API avtMaterialMetaData : public AttributeSubject
{
    std::string   name;
hrchilds's avatar
hrchilds committed
236
    std::string   originalName;
hrchilds's avatar
hrchilds committed
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
    std::string   meshName;

    int           numMaterials;
    stringVector  materialNames;
    
    bool          validVariable;

public:
    avtMaterialMetaData();
    avtMaterialMetaData(std::string, std::string, int, 
                        stringVector);
    avtMaterialMetaData(const avtMaterialMetaData&);
    virtual ~avtMaterialMetaData();
    const avtMaterialMetaData &operator=(const avtMaterialMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
};

//----------------------------------------------------------------------------
//  Class: avtSpeciesMetaData
hrchilds's avatar
hrchilds committed
257 258 259 260 261 262
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
hrchilds's avatar
hrchilds committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
//----------------------------------------------------------------------------
struct DBATTS_API avtMatSpeciesMetaData : public AttributeSubject
{
    int          numSpecies;
    stringVector speciesNames;

    bool         validVariable;

public:
    avtMatSpeciesMetaData();
    avtMatSpeciesMetaData(int, stringVector);
    avtMatSpeciesMetaData(const avtMatSpeciesMetaData&);
    virtual ~avtMatSpeciesMetaData();
    const avtMatSpeciesMetaData &operator=(const avtMatSpeciesMetaData&);
    virtual void SelectAll();
};

struct DBATTS_API avtSpeciesMetaData : public AttributeSubject
{
    std::string                          name;
hrchilds's avatar
hrchilds committed
283
    std::string                          originalName;
hrchilds's avatar
hrchilds committed
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
    std::string                          meshName;
    std::string                          materialName;
    int                                  numMaterials;
    std::vector<avtMatSpeciesMetaData*>  species;

    bool                                 validVariable;

public:
    avtSpeciesMetaData();
    avtSpeciesMetaData(std::string, std::string, std::string, int,
                     intVector, std::vector<stringVector >);
    avtSpeciesMetaData(const avtSpeciesMetaData&);
    virtual ~avtSpeciesMetaData();
    const avtSpeciesMetaData &operator=(const avtSpeciesMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
protected:
    virtual AttributeGroup *CreateSubAttributeGroup(int);
};

hrchilds's avatar
hrchilds committed
304 305
//----------------------------------------------------------------------------
//  Class: avtCurveMetaData
hrchilds's avatar
hrchilds committed
306 307 308 309 310 311
//
//  Modifications:
//
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added originalName.
//
hrchilds's avatar
hrchilds committed
312 313 314 315
//----------------------------------------------------------------------------
struct DBATTS_API avtCurveMetaData : public AttributeSubject
{
    std::string                          name;
hrchilds's avatar
hrchilds committed
316
    std::string                          originalName;
hrchilds's avatar
hrchilds committed
317 318 319 320
    std::string                          xUnits;
    std::string                          xLabel;
    std::string                          yUnits;
    std::string                          yLabel;
hrchilds's avatar
hrchilds committed
321 322 323 324 325 326 327 328 329 330
    bool                                 validVariable;
public:
    avtCurveMetaData();
    avtCurveMetaData(std::string);
    avtCurveMetaData(const avtCurveMetaData&);
    virtual ~avtCurveMetaData();
    const avtCurveMetaData &operator=(const avtCurveMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
};
hrchilds's avatar
hrchilds committed
331 332 333


//----------------------------------------------------------------------------
334
//  Class: avtSILCollectionMetaData
hrchilds's avatar
hrchilds committed
335
//----------------------------------------------------------------------------
336 337 338 339 340 341 342 343
struct DBATTS_API avtSILCollectionMetaData : public AttributeSubject
{
   std::string                         classOfCollection;
   std::string                         defaultMemberBasename;
   int                                 collectionSize;
   int                                 collectionIdOfParent;
   int                                 indexOfParent;
   int                                 collectionIdOfChildren;
344
   intVector                           indicesOfChildren;
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398

public:
    typedef enum { 
       Class,
       PureCollection,
       CollectionAndSets,
       Unknown
    } CollectionType;

    avtSILCollectionMetaData();
    avtSILCollectionMetaData(const avtSILCollectionMetaData&);
    avtSILCollectionMetaData(
       std::string _classOfCollection, std::string _defaultMemberBasename,
       int _collectionSize,
       int _collectionIdOfParent, int _indexOfParent,
       int _collectionIdOfChildren, int *_indicesOfChildren);
    virtual ~avtSILCollectionMetaData();
    const avtSILCollectionMetaData &operator=(const avtSILCollectionMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
    int GetSize(void) const { return collectionSize; };
    CollectionType GetType(void) const;
    const std::string& GetClassName(void) const { return classOfCollection; };
};

//----------------------------------------------------------------------------
//  Class: avtSILMetaData
//----------------------------------------------------------------------------
struct DBATTS_API avtSILMetaData : public AttributeSubject
{
    std::string                             meshName;

    std::vector<int>                        classIds;
    std::vector<int>                        classDisjointFlags;
    int                                     theStorageChunkClassId;
    std::vector<avtSILCollectionMetaData*>  collections;

protected:
    virtual AttributeGroup *CreateSubAttributeGroup(int);

public:
    avtSILMetaData();
    avtSILMetaData(std::string _meshName);
    avtSILMetaData(const avtSILMetaData&);
    virtual ~avtSILMetaData();
    const avtSILMetaData &operator=(const avtSILMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;

    int GetCollectionClassId(std::string& className) const;

    int AddCollectionClass(std::string className, std::string defaultMemberBasename,
           int numSetsInClass, int pairwiseDisjoint = 0,
           bool hideFromWhole = false, bool isStorageChunkClass = false);
hrchilds's avatar
hrchilds committed
399

400 401 402 403 404 405 406 407
    int AddCollection(std::string classOfCollection,
           std::string defaultMemberBasename, int collectionSize,
           int collectionIdOfParent, int indexOfParent,
           int collectionIdOfChildren = 0, int *indicesOfChildren = NULL);

    void Validate(void);
};

hrchilds's avatar
hrchilds committed
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430
//----------------------------------------------------------------------------
//  Class: avtLabelMetaData
//
//  Modifications:
//
//----------------------------------------------------------------------------
struct DBATTS_API avtLabelMetaData : public AttributeSubject
{
    std::string   name;
    std::string   originalName;
    std::string   meshName;
    avtCentering  centering;
    bool          validVariable;
public:
    avtLabelMetaData();
    avtLabelMetaData(const std::string &, const std::string &, avtCentering);
    avtLabelMetaData(const avtLabelMetaData&);
    virtual ~avtLabelMetaData();
    const avtLabelMetaData &operator=(const avtLabelMetaData&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
};

431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
//----------------------------------------------------------------------------
//  Class: avtDefaultPlotMetaData
//----------------------------------------------------------------------------
struct DBATTS_API avtDefaultPlotMetaData : public AttributeSubject
{
    std::string   pluginID;
    std::string   plotVar;
    stringVector  plotAttributes;
    bool          validVariable;

public:
    avtDefaultPlotMetaData();
    avtDefaultPlotMetaData(std::string, std::string);
    avtDefaultPlotMetaData(const avtDefaultPlotMetaData&);
    virtual ~avtDefaultPlotMetaData();
    const avtDefaultPlotMetaData &operator=(const avtDefaultPlotMetaData&);
    void AddAttribute(const std::string&);
    virtual void SelectAll();
    void Print(ostream &, int = 0) const;
};
hrchilds's avatar
hrchilds committed
451 452 453

//----------------------------------------------------------------------------
//  Class: avtDatabaseMetaData
hrchilds's avatar
hrchilds committed
454 455 456 457
//
//  Modifications:
//    Mark C. Miller, Tue Aug 10 14:16:36 PDT 2004
//    Added method GetContainsGhosts()
hrchilds's avatar
hrchilds committed
458 459 460 461 462 463 464
//
//    Kathleen Bonnell, Wed Aug 25 08:37:12 PDT 2004 
//    Added method GetAllVariableNames. 
//
//    Jeremy Meredith, Thu Aug 12 11:39:38 PDT 2004
//    changed simulation information to be a separate class.
//
465 466
//    Mark C. Miller, Tue Sep 28 19:57:42 PDT 2004
//    Added formatCanDoDomainDecomposition and Set/Get methods
hrchilds's avatar
hrchilds committed
467 468 469 470
//
//    Kathleen Bonnell, Tue Jan 25 07:59:28 PST 2005 
//    Added GetAllMeshNames. 
//
hrchilds's avatar
hrchilds committed
471 472 473
//    Hank Childs, Mon Feb 14 14:11:29 PST 2005
//    Added support for forbidden characters.
//
hrchilds's avatar
hrchilds committed
474 475 476
//    Brad Whitlock, Fri Apr 1 15:04:48 PST 2005
//    Added support for avtLabelMetaData.
//
hrchilds's avatar
hrchilds committed
477 478 479
//    Jeremy Meredith, Thu Apr 28 17:48:21 PDT 2005
//    Added a non-const accessor for the simulation info.
//
hrchilds's avatar
hrchilds committed
480
//----------------------------------------------------------------------------
hrchilds's avatar
hrchilds committed
481

hrchilds's avatar
hrchilds committed
482 483 484 485 486 487 488
class DBATTS_API avtDatabaseMetaData : public AttributeSubject
{
    bool         hasTemporalExtents;
    double       minTemporalExtents;
    double       maxTemporalExtents;
    int          numStates;
    bool         isVirtualDatabase;
489
    bool         mustRepopulateOnStateChange;
hrchilds's avatar
hrchilds committed
490
    bool         mustAlphabetizeVariables;
491
    bool         formatCanDoDomainDecomposition;
hrchilds's avatar
hrchilds committed
492

hrchilds's avatar
hrchilds committed
493 494
    bool         useCatchAllMesh;

hrchilds's avatar
hrchilds committed
495 496 497 498 499 500 501
    std::string  timeStepPath;
    stringVector timeStepNames;
    intVector    cycles;
    intVector    cyclesAreAccurate;
    doubleVector times;
    intVector    timesAreAccurate;

hrchilds's avatar
hrchilds committed
502
    std::string  databaseName;
hrchilds's avatar
hrchilds committed
503
    std::string  fileFormat;
hrchilds's avatar
hrchilds committed
504
    std::string  databaseComment;
hrchilds's avatar
hrchilds committed
505

hrchilds's avatar
hrchilds committed
506
    ExpressionList exprList;
hrchilds's avatar
hrchilds committed
507

508 509 510 511 512 513 514 515
    std::vector<avtMeshMetaData *>              meshes;
    std::vector<avtScalarMetaData *>            scalars;
    std::vector<avtVectorMetaData *>            vectors;
    std::vector<avtTensorMetaData *>            tensors;
    std::vector<avtSymmetricTensorMetaData *>   symm_tensors;
    std::vector<avtMaterialMetaData *>          materials;
    std::vector<avtSpeciesMetaData *>           species;
    std::vector<avtCurveMetaData *>             curves;
hrchilds's avatar
hrchilds committed
516
    std::vector<avtLabelMetaData *>             labels;
517 518
    std::vector<avtDefaultPlotMetaData *>       defaultPlots;
    std::vector<avtSILMetaData *>               sils;
hrchilds's avatar
hrchilds committed
519

hrchilds's avatar
hrchilds committed
520 521 522
    bool                                        isSimulation;
    avtSimulationInformation                   *simInfo;

hrchilds's avatar
hrchilds committed
523 524 525 526 527 528 529 530 531 532
public:
    avtDatabaseMetaData();
    avtDatabaseMetaData(const avtDatabaseMetaData&);
    const avtDatabaseMetaData &operator=(const avtDatabaseMetaData&);
    virtual ~avtDatabaseMetaData();

    int          GetNumStates(void) const { return numStates; };
    void         SetNumStates(int);
    void         SetTemporalExtents(double, double);

533
    void         SetMustRepopulateOnStateChange(bool mode)
hrchilds's avatar
hrchilds committed
534
                     { mustRepopulateOnStateChange = mode; };
535
    bool         GetMustRepopulateOnStateChange(void) const
hrchilds's avatar
hrchilds committed
536 537
                     { return mustRepopulateOnStateChange; };

hrchilds's avatar
hrchilds committed
538 539 540 541 542
    void         SetMustAlphabetizeVariables(bool mode)
                     { mustAlphabetizeVariables = mode; };
    bool         GetMustAlphabetizeVariables() const
                     { return mustAlphabetizeVariables; };

hrchilds's avatar
hrchilds committed
543 544 545 546
    bool         GetUseCatchAllMesh(void) const
                     { return useCatchAllMesh; };
    void         SetUseCatchAllMesh(bool useIt)
                     { useCatchAllMesh = useIt; };
547

548 549 550 551
    bool         GetFormatCanDoDomainDecomposition(void) const
                     { return formatCanDoDomainDecomposition; };
    void         SetFormatCanDoDomainDecomposition(bool can);

hrchilds's avatar
hrchilds committed
552 553 554
    void         SetIsVirtualDatabase(bool val) { isVirtualDatabase = val; };
    bool         GetIsVirtualDatabase() const { return isVirtualDatabase; };

hrchilds's avatar
hrchilds committed
555 556
    void         SetIsSimulation(bool val) { isSimulation = val; }
    bool         GetIsSimulation() const { return isSimulation; }
hrchilds's avatar
hrchilds committed
557 558
    void         SetSimInfo(const avtSimulationInformation&);
    const avtSimulationInformation &GetSimInfo() const;
hrchilds's avatar
hrchilds committed
559
          avtSimulationInformation &GetSimInfo();
hrchilds's avatar
hrchilds committed
560

hrchilds's avatar
hrchilds committed
561 562 563 564 565 566 567 568 569 570 571 572 573 574
    const intVector &GetCycles() const { return cycles; };
    void         SetCycle(int, int);
    void         SetCycles(intVector &);
    void         SetCycleIsAccurate(bool, int);
    void         SetCyclesAreAccurate(bool);
    bool         IsCycleAccurate(int) const;

    const doubleVector &GetTimes() const { return times; };
    void         SetTime(int, double);
    void         SetTimes(doubleVector &);
    void         SetTimeIsAccurate(bool, int);
    void         SetTimesAreAccurate(bool);
    bool         IsTimeAccurate(int) const;

hrchilds's avatar
hrchilds committed
575 576 577
    void         SetDatabaseName(const std::string &dsn) {databaseName = dsn;};
    const std::string &GetDatabaseName() const { return databaseName; };

hrchilds's avatar
hrchilds committed
578 579 580
    void         SetFileFormat(const std::string &ff) {fileFormat = ff;};
    const std::string &GetFileFormat() const { return fileFormat; };

hrchilds's avatar
hrchilds committed
581 582 583 584 585
    void         SetTimeStepPath(const std::string &tsp);
    const std::string &GetTimeStepPath() const { return timeStepPath; };
    void         SetTimeStepNames(const stringVector &tsn);
    const stringVector &GetTimeStepNames() const { return timeStepNames; };

hrchilds's avatar
hrchilds committed
586 587 588 589
    void         SetDatabaseComment(const std::string &comment)
                     { databaseComment = comment; };
    const std::string &GetDatabaseComment() const { return databaseComment; };

hrchilds's avatar
hrchilds committed
590 591 592
    void         ReplaceForbiddenCharacters(std::vector<char> &,
                                            std::vector<std::string> &);

hrchilds's avatar
hrchilds committed
593 594 595
    void         Add(avtMeshMetaData *);
    void         Add(avtScalarMetaData *);
    void         Add(avtVectorMetaData *);
596 597
    void         Add(avtTensorMetaData *);
    void         Add(avtSymmetricTensorMetaData *);
hrchilds's avatar
hrchilds committed
598 599
    void         Add(avtMaterialMetaData *);
    void         Add(avtSpeciesMetaData *);
hrchilds's avatar
hrchilds committed
600
    void         Add(avtCurveMetaData *);
601
    void         Add(avtSILMetaData *);
hrchilds's avatar
hrchilds committed
602
    void         Add(avtLabelMetaData *);
603 604 605 606 607
    void         Add(avtDefaultPlotMetaData *);

    int GetNumMeshes()        const { return meshes.size();       };
    int GetNumScalars()       const { return scalars.size();      };
    int GetNumVectors()       const { return vectors.size();      };
608 609
    int GetNumTensors()       const { return tensors.size();      };
    int GetNumSymmTensors()   const { return symm_tensors.size();      };
610 611 612 613
    int GetNumMaterials()     const { return materials.size();    };
    int GetNumSpecies()       const { return species.size();      };
    int GetNumCurves()        const { return curves.size();       };
    int GetNumSILs()          const { return sils.size();         };
hrchilds's avatar
hrchilds committed
614
    int GetNumLabels()        const { return labels.size();       };
615 616 617 618 619 620 621 622
    int GetNumDefaultPlots()  const { return defaultPlots.size(); };

    const avtMeshMetaData        *GetMesh(int) const;
    const avtMeshMetaData        *GetMesh(const std::string&) const;
    const avtScalarMetaData      *GetScalar(int) const;
    const avtScalarMetaData      *GetScalar(const std::string&) const;
    const avtVectorMetaData      *GetVector(int) const;
    const avtVectorMetaData      *GetVector(const std::string&) const;
623 624 625 626
    const avtTensorMetaData      *GetTensor(int) const;
    const avtTensorMetaData      *GetTensor(const std::string&) const;
    const avtSymmetricTensorMetaData *GetSymmTensor(int) const;
    const avtSymmetricTensorMetaData *GetSymmTensor(const std::string&) const;
627 628 629 630 631 632 633 634
    const avtMaterialMetaData    *GetMaterial(int) const;
    const avtMaterialMetaData    *GetMaterial(const std::string&) const;
    const avtSpeciesMetaData     *GetSpecies(int) const;
    const avtSpeciesMetaData     *GetSpecies(const std::string&) const;
    const avtCurveMetaData       *GetCurve(int) const;
    const avtCurveMetaData       *GetCurve(const std::string&) const;
    const avtSILMetaData         *GetSIL(int) const;
    const avtSILMetaData         *GetSIL(const std::string&) const;
hrchilds's avatar
hrchilds committed
635 636
    const avtLabelMetaData       *GetLabel(int) const;
    const avtLabelMetaData       *GetLabel(const std::string&) const;
637
    const avtDefaultPlotMetaData *GetDefaultPlot(int) const;
hrchilds's avatar
hrchilds committed
638 639 640

    void         SetBlocksForMesh(int index, int nBlocks);
    void         SetContainsGhostZones(std::string name, avtGhostType);
hrchilds's avatar
hrchilds committed
641
    avtGhostType GetContainsGhostZones(std::string name) const;
hrchilds's avatar
hrchilds committed
642
    void         SetContainsOriginalCells(std::string name, bool);
hrchilds's avatar
hrchilds committed
643
    void         SetContainsOriginalNodes(std::string name, bool);
hrchilds's avatar
hrchilds committed
644 645
    void         SetContainsGlobalNodeIds(std::string name, bool);
    void         SetContainsGlobalZoneIds(std::string name, bool);
hrchilds's avatar
hrchilds committed
646 647 648 649
    void         AddGroupInformation(int nGroups, int nBlocks,
                                     intVector &blockIds);
    void         UnsetExtents();

hrchilds's avatar
hrchilds committed
650 651 652
    void                AddExpression(Expression *);
    const Expression   *GetExpression(int) const;
    int                 GetNumberOfExpressions(void) const;
hrchilds's avatar
hrchilds committed
653

654 655 656 657 658 659
    int          GetNDomains(std::string) const;
    avtVarType   DetermineVarType(std::string) const;
    avtSubsetType   DetermineSubsetType(const std::string &) const;
    std::string  MeshForVar(std::string) const;
    std::string  MaterialOnMesh(std::string) const;
    std::string  SpeciesOnMesh(std::string) const;
hrchilds's avatar
hrchilds committed
660

661 662
    const avtMaterialMetaData *GetMaterialOnMesh(std::string) const;
    const avtSpeciesMetaData  *GetSpeciesOnMesh(std::string) const;
663
    const avtSILMetaData      *GetSILForMesh(std::string) const;
hrchilds's avatar
hrchilds committed
664 665 666 667 668 669 670 671

    void         Print(ostream &, int = 0) const;

    void         SetExtents(std::string, const float *);

    virtual void SelectAll();
    virtual AttributeGroup *CreateSubAttributeGroup(int);

hrchilds's avatar
hrchilds committed
672
    const stringVector GetAllVariableNames(const std::string &) const;
hrchilds's avatar
hrchilds committed
673 674
    const stringVector GetAllMeshNames(void) const;

hrchilds's avatar
hrchilds committed
675 676
    void  RegisterWarningCallback(void (*)(const char *));

hrchilds's avatar
hrchilds committed
677
private:
678 679 680 681 682 683 684
    bool VarIsCompound(const std::string &inVar) const;
    void ParseCompoundForVar(const std::string &inVar, std::string &outVar)
                                                                   const;
    void ParseCompoundForMesh(const std::string &inVar, std::string &meshName)
                                                                   const;
    void ParseCompoundForCategory(const std::string &inVar, 
                                            std::string &meshName) const;
hrchilds's avatar
hrchilds committed
685 686 687 688

    static void (*WarningCallback)(const char *);
    static bool haveWarningCallback;
    void        IssueWarning(const char *);
hrchilds's avatar
hrchilds committed
689 690 691 692
};


#endif