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

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

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

revision 6143 by caltinay, Sun Apr 3 23:36:59 2016 UTC revision 6144 by caltinay, Wed Apr 6 05:25:13 2016 UTC
# Line 52  using escript::FileWriter; Line 52  using escript::FileWriter;
52  #include <numeric> // for std::accumulate  #include <numeric> // for std::accumulate
53  #include <sstream> // for std::ostringstream  #include <sstream> // for std::ostringstream
54    
55  #if USE_SILO  #if ESYS_HAVE_SILO
56  #include <silo.h>  #include <silo.h>
57    
58  #if WEIPA_HAVE_MPI  #if WEIPA_HAVE_MPI
# Line 60  using escript::FileWriter; Line 60  using escript::FileWriter;
60  const int NUM_SILO_FILES = 1; // number of Silo files to produce per save  const int NUM_SILO_FILES = 1; // number of Silo files to produce per save
61  #endif  #endif
62    
63  #endif // USE_SILO  #endif // ESYS_HAVE_SILO
64    
65  using namespace std;  using namespace std;
66    
# Line 306  bool EscriptDataset::loadNetCDF(const Do Line 306  bool EscriptDataset::loadNetCDF(const Do
306  //  //
307  bool EscriptDataset::saveSilo(string fileName, bool useMultiMesh)  bool EscriptDataset::saveSilo(string fileName, bool useMultiMesh)
308  {  {
309  #if USE_SILO  #if ESYS_HAVE_SILO
310      if (domainChunks.size() == 0)      if (domainChunks.size() == 0)
311          return false;          return false;
312    
# Line 474  bool EscriptDataset::saveSilo(string fil Line 474  bool EscriptDataset::saveSilo(string fil
474    
475      return true;      return true;
476    
477  #else // !USE_SILO  #else // !ESYS_HAVE_SILO
478      std::cerr << "WARNING: saving to silo file requested but escript was not built"      std::cerr << "WARNING: saving to silo file requested but escript was not built"
479              " with silo support";              " with silo support";
480      return false;      return false;
# Line 1057  void EscriptDataset::updateSampleDistrib Line 1057  void EscriptDataset::updateSampleDistrib
1057  //  //
1058  void EscriptDataset::putSiloMultiMesh(DBfile* dbfile, const string& meshName)  void EscriptDataset::putSiloMultiMesh(DBfile* dbfile, const string& meshName)
1059  {  {
1060  #if USE_SILO  #if ESYS_HAVE_SILO
1061      vector<int> meshtypes;      vector<int> meshtypes;
1062      vector<string> tempstrings;      vector<string> tempstrings;
1063      vector<char*> meshnames;      vector<char*> meshnames;
# Line 1126  void EscriptDataset::putSiloMultiMesh(DB Line 1126  void EscriptDataset::putSiloMultiMesh(DB
1126  void EscriptDataset::putSiloMultiVar(DBfile* dbfile, const VarInfo& vi,  void EscriptDataset::putSiloMultiVar(DBfile* dbfile, const VarInfo& vi,
1127                                       bool useMeshFile)                                       bool useMeshFile)
1128  {  {
1129  #if USE_SILO  #if ESYS_HAVE_SILO
1130      vector<int> vartypes;      vector<int> vartypes;
1131      vector<string> tempstrings;      vector<string> tempstrings;
1132      vector<char*> varnames;      vector<char*> varnames;
# Line 1181  void EscriptDataset::putSiloMultiVar(DBf Line 1181  void EscriptDataset::putSiloMultiVar(DBf
1181  //  //
1182  void EscriptDataset::putSiloMultiTensor(DBfile* dbfile, const VarInfo& vi)  void EscriptDataset::putSiloMultiTensor(DBfile* dbfile, const VarInfo& vi)
1183  {  {
1184  #if USE_SILO  #if ESYS_HAVE_SILO
1185      string tensorDir = vi.varName+string("_comps/");      string tensorDir = vi.varName+string("_comps/");
1186      DBSetDir(dbfile, "/");      DBSetDir(dbfile, "/");
1187      DBMkdir(dbfile, tensorDir.c_str());      DBMkdir(dbfile, tensorDir.c_str());

Legend:
Removed from v.6143  
changed lines
  Added in v.6144

  ViewVC Help
Powered by ViewVC 1.1.26