/[escript]/trunk/dataexporter/src/FileSavers.cpp
ViewVC logotype

Diff of /trunk/dataexporter/src/FileSavers.cpp

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

revision 2885 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 2886 by caltinay, Thu Jan 28 05:39:23 2010 UTC
# Line 66  void saveSilo(const string& filename, in Line 66  void saveSilo(const string& filename, in
66      dataset->saveSilo(filename);      dataset->saveSilo(filename);
67  }  }
68    
69    void saveVTK(const string& filename, int cycle, double time, Domain_ptr domain,
70                 const boost::python::dict& datavars, const string& metadata,
71                 const string& metadata_schema)
72    {
73        DataVec vars;
74        StringVec varNames;
75    
76        unpackDict(datavars, vars, varNames);
77    
78        EscriptDataset_ptr dataset;
79    #ifdef PASO_MPI
80        MPI_Comm comm = domain->getMPIComm();
81        dataset.reset(new EscriptDataset(comm));
82    #else
83        dataset.reset(new EscriptDataset());
84    #endif
85    
86        if (!dataset->initFromEscript(domain, vars, varNames))
87            throw escript::DataException("saveVTK: Error initialising dataset.");
88    
89        dataset->setCycleAndTime(cycle, time);
90        dataset->saveVTK(filename);
91    }
92    
93  } // namespace escriptexport  } // namespace escriptexport
94    

Legend:
Removed from v.2885  
changed lines
  Added in v.2886

  ViewVC Help
Powered by ViewVC 1.1.26