/[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 2880 by caltinay, Thu Jan 28 01:21:30 2010 UTC revision 2886 by caltinay, Thu Jan 28 05:39:23 2010 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2009 by University of Queensland  * Copyright (c) 2003-2010 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 293  StringVec NodeData::getVarNames() const Line 293  StringVec NodeData::getVarNames() const
293  }  }
294    
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)

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

  ViewVC Help
Powered by ViewVC 1.1.26