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

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

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

revision 2881 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 2886 by caltinay, Thu Jan 28 05:39:23 2010 UTC
# Line 295  StringVec NodeData::getVarNames() const Line 295  StringVec NodeData::getVarNames() const
295  //  //
296  //  //
297  //  //
298    int NodeData::getGlobalNumNodes() const
299    {
300        int ret=0;
301        if (!nodeDist.empty())
302            ret = nodeDist[nodeDist.size()-1];
303        return ret;
304    }
305    
306    //
307    //
308    //
309    void NodeData::writeCoordinatesVTK(ostream& os, int ownIndex)
310    {
311        if (numNodes > 0) {
312            int firstId = nodeDist[ownIndex];
313            int lastId = nodeDist[ownIndex+1];
314            for (size_t i=0; i<numNodes; i++) {
315                if (firstId <= nodeGNI[i] && nodeGNI[i] < lastId) {
316                    os << coords[0][i] << " " << coords[1][i] << " ";
317                    if (numDims == 3)
318                        os << coords[2][i];
319                    else
320                        os << 0.;
321                    os << endl;
322                }
323            }
324        }
325    }
326    
327    //
328    //
329    //
330  bool NodeData::writeToSilo(DBfile* dbfile)  bool NodeData::writeToSilo(DBfile* dbfile)
331  {  {
332  #if USE_SILO  #if USE_SILO

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

  ViewVC Help
Powered by ViewVC 1.1.26