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

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

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

revision 2187 by caltinay, Tue Dec 23 04:13:15 2008 UTC revision 2196 by caltinay, Wed Jan 7 06:14:59 2009 UTC
# Line 559  bool ElementData::writeToSilo(DBfile* db Line 559  bool ElementData::writeToSilo(DBfile* db
559      ret = DBPutZonelist2(dbfile, varName.c_str(), count,      ret = DBPutZonelist2(dbfile, varName.c_str(), count,
560              originalMesh->getNumDims(), &nodes[0], arraylen, 0, 0,              originalMesh->getNumDims(), &nodes[0], arraylen, 0, 0,
561              numGhostElements, &eltype, &nodesPerElement, &count, 1, NULL);              numGhostElements, &eltype, &nodesPerElement, &count, 1, NULL);
562      if (ret == 0)      if (ret == 0) {
563            CoordArray& coordbase = const_cast<CoordArray&>(fullMesh->getCoords());
564          ret = DBPutUcdmesh(dbfile, siloMeshName.c_str(),          ret = DBPutUcdmesh(dbfile, siloMeshName.c_str(),
565                  originalMesh->getNumDims(), NULL, &fullMesh->coords[0],                  originalMesh->getNumDims(), NULL, &coordbase[0],
566                  fullMesh->getNumNodes(), count, varName.c_str(),                  fullMesh->getNumNodes(), count, varName.c_str(),
567                  /*"facelist"*/NULL, DB_FLOAT, NULL);                  /*"facelist"*/NULL, DB_FLOAT, NULL);
568        }
569            
570      // Point mesh is useful for debugging      // Point mesh is useful for debugging
571      //DBPutPointmesh(dbfile, "/pointmesh",      if (0) {
572      //        originalMesh->getNumDims(), &fullMesh->coords[0],          CoordArray& coordbase = const_cast<CoordArray&>(fullMesh->getCoords());
573      //        fullMesh->getNumNodes(), DB_FLOAT, NULL);          DBPutPointmesh(dbfile, "/pointmesh",
574                  originalMesh->getNumDims(), &coordbase[0],
575                  fullMesh->getNumNodes(), DB_FLOAT, NULL);
576        }
577    
578      if (ret != 0)      if (ret != 0)
579          return false;          return false;
# Line 586  bool ElementData::writeToSilo(DBfile* db Line 591  bool ElementData::writeToSilo(DBfile* db
591                  originalMesh->getNumDims(), &reducedNodes[0], arraylen, 0, 0,                  originalMesh->getNumDims(), &reducedNodes[0], arraylen, 0, 0,
592                  numReducedGhostElements, &eltype, &reducedNodesPerElement,                  numReducedGhostElements, &eltype, &reducedNodesPerElement,
593                  &reducedCount, 1, NULL);                  &reducedCount, 1, NULL);
594          if (ret == 0)          if (ret == 0) {
595                CoordArray& coordbase = const_cast<CoordArray&>(reducedMesh->getCoords());
596              ret = DBPutUcdmesh(dbfile, siloMeshName.c_str(),              ret = DBPutUcdmesh(dbfile, siloMeshName.c_str(),
597                     originalMesh->getNumDims(), NULL, &reducedMesh->coords[0],                     originalMesh->getNumDims(), NULL, &coordbase[0],
598                     reducedMesh->getNumNodes(), reducedCount, varName.c_str(),                     reducedMesh->getNumNodes(), reducedCount, varName.c_str(),
599                     NULL, DB_FLOAT, NULL);                     NULL, DB_FLOAT, NULL);
600            }
601          if (ret != 0)          if (ret != 0)
602              return false;              return false;
603          numCells = reducedCount;          numCells = reducedCount;

Legend:
Removed from v.2187  
changed lines
  Added in v.2196

  ViewVC Help
Powered by ViewVC 1.1.26