/[escript]/trunk/weipa/src/EscriptDataset.h
ViewVC logotype

Diff of /trunk/weipa/src/EscriptDataset.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3090 by caltinay, Mon Jun 14 00:59:30 2010 UTC revision 3091 by caltinay, Fri Aug 13 07:47:57 2010 UTC
# Line 42  struct VarInfo { Line 42  struct VarInfo {
42  typedef std::vector<VarInfo> VarVector;  typedef std::vector<VarInfo> VarVector;
43    
44    
45  /// \brief Represents an escript dataset including domain and variables for  /// \brief Represents an escript dataset including a domain and data variables
46  /// one timestep.  ///        for one timestep.
47  //  //
48  /// This class represents an escript/finley dataset complete with domain and  /// This class represents an escript/finley dataset complete with domain and
49  /// variable data. It can read the dataset from NetCDF files generated by the  /// variable data. It can read the dataset from NetCDF files generated by the
# Line 77  public: Line 77  public:
77      WEIPA_DLL_API      WEIPA_DLL_API
78      bool initFromEscript(const escript::AbstractDomain* mesh,      bool initFromEscript(const escript::AbstractDomain* mesh,
79                           DataVec& escriptVars, const StringVec& varNames);                           DataVec& escriptVars, const StringVec& varNames);
80                            
81      /// \brief Loads mesh and variables from escript NetCDF files.      /// \brief Loads mesh and variables from escript NetCDF files.
82      ///      ///
83      /// \param meshFilePattern a printf-style pattern for the mesh file names      /// \param meshFilePattern a printf-style pattern for the mesh file names
# Line 107  public: Line 107  public:
107      bool saveSilo(const std::string fileName, bool useMultiMesh=true);      bool saveSilo(const std::string fileName, bool useMultiMesh=true);
108    
109      /// \brief Saves the dataset in the VTK XML file format.      /// \brief Saves the dataset in the VTK XML file format.
     /// \note NOT IMPLEMENTED.  
110      WEIPA_DLL_API      WEIPA_DLL_API
111      bool saveVTK(const std::string fileName);      bool saveVTK(const std::string fileName);
112    
113      /// \brief Returns the dataset's mesh.      /// \brief Returns the dataset's converted domain so it can be reused.
     WEIPA_DLL_API  
     MeshBlocks extractMesh() { keepMesh = true; return meshBlocks; }  
   
     /// \brief Returns the dataset's mesh.  
114      WEIPA_DLL_API      WEIPA_DLL_API
115      const MeshBlocks& getMesh() const { return meshBlocks; }      MeshBlocks getConvertedDomain() { return meshBlocks; }
116    
117      /// \brief Returns a vector with the dataset's variables.      /// \brief Returns a vector with the dataset's variables.
118      WEIPA_DLL_API      WEIPA_DLL_API
# Line 128  public: Line 123  public:
123      const VarVector& getMeshVariables() const { return meshVariables; }      const VarVector& getMeshVariables() const { return meshVariables; }
124    
125  private:  private:
126      bool loadMeshFromNetCDF();      bool setDomain(const escript::AbstractDomain* domain);
127      bool loadVarFromNetCDF(const std::string& fileName,      bool setDomain(const std::string filePattern, int nBlocks);
128                             const std::string& varName);      bool setDomain(const MeshBlocks& domain);
129        bool addData(escript::Data& data, const std::string name);
130        bool addData(const std::string filePattern, const std::string name);
131    
132      void convertMeshVariables();      void convertMeshVariables();
133      void updateSampleDistribution(VarInfo& vi);      void updateSampleDistribution(VarInfo& vi);
134      void putSiloMultiMesh(DBfile* dbfile, const std::string& meshName);      void putSiloMultiMesh(DBfile* dbfile, const std::string& meshName);
# Line 139  private: Line 137  private:
137                           bool useMeshFile = false);                           bool useMeshFile = false);
138      void writeVarToVTK(const VarInfo& varInfo, std::ostream& os);      void writeVarToVTK(const VarInfo& varInfo, std::ostream& os);
139    
     int numParts;  
140      int cycle;      int cycle;
141      double time;      double time;
142      bool keepMesh, externalMesh;      bool externalMesh;
     std::string meshFmt;  
143      MeshBlocks meshBlocks;      MeshBlocks meshBlocks;
144      VarVector variables, meshVariables;      VarVector variables, meshVariables;
145      int mpiRank, mpiSize;      int mpiRank, mpiSize;

Legend:
Removed from v.3090  
changed lines
  Added in v.3091

  ViewVC Help
Powered by ViewVC 1.1.26