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

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

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

revision 2939 by caltinay, Tue Feb 16 00:01:52 2010 UTC revision 2940 by caltinay, Fri Feb 19 00:38:45 2010 UTC
# Line 585  bool EscriptDataset::saveVTK(string file Line 585  bool EscriptDataset::saveVTK(string file
585      // now write all variables - first the nodal data, then cell data      // now write all variables - first the nodal data, then cell data
586    
587      // write nodal data if any      // write nodal data if any
588      if (nodalVars.size() > 0) {      if (!nodalVars.empty()) {
589          if (mpiRank == 0)          if (mpiRank == 0)
590              oss << "<PointData>" << endl;              oss << "<PointData>" << endl;
591          for (viIt = nodalVars.begin(); viIt != nodalVars.end(); viIt++) {          for (viIt = nodalVars.begin(); viIt != nodalVars.end(); viIt++) {
# Line 599  bool EscriptDataset::saveVTK(string file Line 599  bool EscriptDataset::saveVTK(string file
599      }      }
600    
601      // write cell data if any      // write cell data if any
602      if (cellVars.size() > 0) {      if (!cellVars.empty()) {
603          if (mpiRank == 0)          if (mpiRank == 0)
604              oss << "<CellData>" << endl;              oss << "<CellData>" << endl;
605          for (viIt = cellVars.begin(); viIt != cellVars.end(); viIt++) {          for (viIt = cellVars.begin(); viIt != cellVars.end(); viIt++) {
# Line 845  void EscriptDataset::putSiloMultiMesh(DB Line 845  void EscriptDataset::putSiloMultiMesh(DB
845      }      }
846    
847      // ignore empty mesh      // ignore empty mesh
848      if (meshnames.size() > 0) {      if (!meshnames.empty()) {
849          DBSetDir(dbfile, "/");          DBSetDir(dbfile, "/");
850          DBoptlist* optList = DBMakeOptlist(2);          DBoptlist* optList = DBMakeOptlist(2);
851          DBAddOption(optList, DBOPT_CYCLE, &cycle);          DBAddOption(optList, DBOPT_CYCLE, &cycle);
# Line 893  void EscriptDataset::putSiloMultiVar(DBf Line 893  void EscriptDataset::putSiloMultiVar(DBf
893      }      }
894    
895      // ignore empty variables      // ignore empty variables
896      if (varnames.size() > 0) {      if (!varnames.empty()) {
897          DBSetDir(dbfile, "/");          DBSetDir(dbfile, "/");
898          DBoptlist* optList = DBMakeOptlist(2);          DBoptlist* optList = DBMakeOptlist(2);
899          DBAddOption(optList, DBOPT_CYCLE, &cycle);          DBAddOption(optList, DBOPT_CYCLE, &cycle);
# Line 951  void EscriptDataset::putSiloMultiTensor( Line 951  void EscriptDataset::putSiloMultiTensor(
951                      vartypes.push_back(DB_UCDVAR);                      vartypes.push_back(DB_UCDVAR);
952                  }                  }
953              }              }
954              if (varnames.size() > 0) {              if (!varnames.empty()) {
955                  DBPutMultivar(dbfile, comp.str().c_str(), varnames.size(),                  DBPutMultivar(dbfile, comp.str().c_str(), varnames.size(),
956                          &varnames[0], &vartypes[0], optList);                          &varnames[0], &vartypes[0], optList);
957              }              }

Legend:
Removed from v.2939  
changed lines
  Added in v.2940

  ViewVC Help
Powered by ViewVC 1.1.26