/[escript]/branches/split/weipa/src/DataVar.cpp
ViewVC logotype

Diff of /branches/split/weipa/src/DataVar.cpp

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

revision 2888 by caltinay, Fri Jan 29 00:07:00 2010 UTC revision 2940 by caltinay, Fri Feb 19 00:38:45 2010 UTC
# Line 15  Line 15 
15  #include <escriptexport/ElementData.h>  #include <escriptexport/ElementData.h>
16  #include <escriptexport/FinleyMesh.h>  #include <escriptexport/FinleyMesh.h>
17  #include <escriptexport/NodeData.h>  #include <escriptexport/NodeData.h>
18    #ifndef VISIT_PLUGIN
19  #include <escript/Data.h>  #include <escript/Data.h>
20    #endif
21    
22  #if USE_NETCDF  #if USE_NETCDF
23  #include <netcdfcpp.h>  #include <netcdfcpp.h>
# Line 90  void DataVar::cleanup() Line 92  void DataVar::cleanup()
92  //  //
93  bool DataVar::initFromEscript(escript::Data& escriptData, FinleyMesh_ptr mesh)  bool DataVar::initFromEscript(escript::Data& escriptData, FinleyMesh_ptr mesh)
94  {  {
95    #ifndef VISIT_PLUGIN
96      cleanup();      cleanup();
97    
98      if (!escriptData.actsExpanded()) {      if (!escriptData.actsExpanded()) {
# Line 163  bool DataVar::initFromEscript(escript::D Line 166  bool DataVar::initFromEscript(escript::D
166      }      }
167    
168      return initialized;      return initialized;
169    
170    #else // VISIT_PLUGIN
171        return false;
172    #endif
173  }  }
174    
175  //  //
# Line 366  float* DataVar::averageData(const float* Line 373  float* DataVar::averageData(const float*
373          res = new float[cellFactor * numSamples];          res = new float[cellFactor * numSamples];
374          float* dest = res;          float* dest = res;
375          QuadMaskInfo qmi = cells->getQuadMask(funcSpace);          QuadMaskInfo qmi = cells->getQuadMask(funcSpace);
376          if (qmi.mask.size() > 0) {          if (!qmi.mask.empty()) {
377              const float* tmpSrc = src;              const float* tmpSrc = src;
378              for (int i=0; i<numSamples; i++, tmpSrc+=stride*ptsPerSample) {              for (int i=0; i<numSamples; i++, tmpSrc+=stride*ptsPerSample) {
379                  for (int l=0; l<cellFactor; l++) {                  for (int l=0; l<cellFactor; l++) {

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

  ViewVC Help
Powered by ViewVC 1.1.26