Escript  Revision_4320
VisItData.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 #ifndef __WEIPA_VISITDATA_H__
17 #define __WEIPA_VISITDATA_H__
18 
19 #include <escript/AbstractDomain.h>
20 #include <escript/Data.h>
21 #include <weipa/EscriptDataset.h>
22 
23 #include <VisItInterfaceTypes_V2.h>
24 
25 namespace weipa {
26 
27 class VisItData {
28 
29 public:
30  VisItData() : runFlag(false) {}
31 
33  void setCommandNames(std::vector<std::string> names) { cmdNames=names; }
34  void setSimulationStatus(bool running) { runFlag=running; }
35 
36  visit_handle getDomainList();
37  visit_handle getMesh(const char* name);
38  visit_handle getSimMetaData();
39  visit_handle getVariable(const char* name);
40 
41 private:
42  void addExpressionMetadata(visit_handle smd, const std::string& name,
43  const std::string& def, int type);
44  void addMeshMetadata(visit_handle smd, const std::string& name,
45  int dim, int numDoms);
46  void addVariableMetadata(visit_handle smd, const std::string& name,
47  const std::string& meshName, int centering,
48  int rank);
49 
50  bool runFlag;
52  std::vector<std::string> cmdNames;
53  std::map<std::string, DataVar_ptr> variables;
54 };
55 
56 typedef boost::shared_ptr<VisItData> VisItData_ptr;
57 
58 
59 } // namespace weipa
60 
61 #endif // __WEIPA_VISITDATA_H__
62