/[escript]/trunk/dataexporter/src/DataVar.h
ViewVC logotype

Diff of /trunk/dataexporter/src/DataVar.h

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

revision 2879 by caltinay, Mon Dec 7 04:13:49 2009 UTC revision 2880 by caltinay, Thu Jan 28 01:21:30 2010 UTC
# Line 133  private: Line 133  private:
133      ///        data.      ///        data.
134      IndexMap buildIndexMap();      IndexMap buildIndexMap();
135    
136      /// \brief Reorders the samples according to the corresponding node IDs.      /// \brief Reorders the samples according to the corresponding node or
137        ///        element IDs.
138      ///      ///
139      /// \return true if the function space is supported and the number of      /// \return true if the function space is supported and the number of
140      ///         elements or nodes corresponds to the number of data samples.      ///         elements or nodes matches the number of data samples.
141      bool filterSamples(const FinleyMesh_ptr mesh);      bool reorderSamples();
142    
143      bool initialized;      bool initialized;
144        FinleyMesh_ptr finleyMesh;
145      std::string varName;      std::string varName;
146      int numSamples, rank, ptsPerSample, centering, funcSpace;      int numSamples, rank, ptsPerSample, centering, funcSpace;
147      IntVec shape;      IntVec shape;
# Line 151  private: Line 153  private:
153  inline IndexMap DataVar::buildIndexMap()  inline IndexMap DataVar::buildIndexMap()
154  {  {
155      IndexMap sampleID2idx;      IndexMap sampleID2idx;
156      int idx = 0;      int idx = sampleID.size()-1;
157      IntVec::const_iterator idIt;      IntVec::const_reverse_iterator idIt;
158      for (idIt = sampleID.begin(); idIt != sampleID.end(); idIt++, idx++)      for (idIt = sampleID.rbegin(); idIt != sampleID.rend(); idIt++, idx--)
159          sampleID2idx[*idIt] = idx;          sampleID2idx[*idIt] = idx;
160    
161      return sampleID2idx;      return sampleID2idx;

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

  ViewVC Help
Powered by ViewVC 1.1.26