/[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

trunk/dataexporter/src/DataVar.cpp revision 2888 by caltinay, Fri Jan 29 00:07:00 2010 UTC trunk/weipa/src/DataVar.cpp revision 3037 by caltinay, Mon Jun 14 00:59:30 2010 UTC
# Line 11  Line 11 
11  *  *
12  *******************************************************/  *******************************************************/
13    
14  #include <escriptexport/DataVar.h>  #include <weipa/DataVar.h>
15  #include <escriptexport/ElementData.h>  #include <weipa/ElementData.h>
16  #include <escriptexport/FinleyMesh.h>  #include <weipa/FinleyMesh.h>
17  #include <escriptexport/NodeData.h>  #include <weipa/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 27  Line 29 
29    
30  using namespace std;  using namespace std;
31    
32  namespace escriptexport {  namespace weipa {
33            
34  enum {  enum {
35      NODE_CENTERED = 1,      NODE_CENTERED = 1,
# 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++) {
# Line 650  bool DataVar::writeToSilo(DBfile* dbfile Line 657  bool DataVar::writeToSilo(DBfile* dbfile
657  #endif  #endif
658  }  }
659    
660  } // namespace escriptexport  } // namespace weipa
661    

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

  ViewVC Help
Powered by ViewVC 1.1.26