/[escript]/trunk/tools/libescriptreader/src/escriptreader/DataVar.cpp
ViewVC logotype

Diff of /trunk/tools/libescriptreader/src/escriptreader/DataVar.cpp

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

revision 2187 by caltinay, Tue Dec 23 04:13:15 2008 UTC revision 2196 by caltinay, Wed Jan 7 06:14:59 2009 UTC
# Line 54  DataVar::~DataVar() Line 54  DataVar::~DataVar()
54    
55  //  //
56  // Copy constructor  // Copy constructor
 // Performs a deep copy of the data values  
57  //  //
58  DataVar::DataVar(const DataVar& d) :  DataVar::DataVar(const DataVar& d) :
59      varName(d.varName), numSamples(d.numSamples),      varName(d.varName), numSamples(d.numSamples),
# Line 77  DataVar::DataVar(const DataVar& d) : Line 76  DataVar::DataVar(const DataVar& d) :
76    
77  //  //
78  // Special constructor for mesh data  // Special constructor for mesh data
 // Used to store "special" integral mesh variables such as IDs or tags  
79  //  //
80  DataVar::DataVar(const string& name, const IntVec& data,  DataVar::DataVar(const string& name, const IntVec& data,
81                   MeshWithElements* mesh) :                   MeshWithElements* mesh) :
# Line 127  DataVar::DataVar(const string& name, con Line 125  DataVar::DataVar(const string& name, con
125  }  }
126    
127  //  //
128  // Appends raw data including IDs from rhs. Reordered data becomes invalid.  // Appends raw data including IDs from rhs.
129  //  //
130  bool DataVar::append(const DataVar& rhs)  bool DataVar::append(const DataVar& rhs)
131  {  {
# Line 256  void DataVar::readRank2Data(NcFile* ncfi Line 254  void DataVar::readRank2Data(NcFile* ncfi
254  //  //
255  // Reads a NetCDF file in escript/finley format.  // Reads a NetCDF file in escript/finley format.
256  //  //
257  bool DataVar::readFromNc(const string& ncFile)  bool DataVar::readFromNc(const string& filename)
258  {  {
259      NcError ncerr(NcError::silent_nonfatal);          NcError ncerr(NcError::silent_nonfatal);    
260      NcFile* input = new NcFile(ncFile.c_str());      NcFile* input = new NcFile(filename.c_str());
261      if (!input->is_valid()) {      if (!input->is_valid()) {
262          cerr << "Could not open input file " << ncFile.c_str() << "." << endl;          cerr << "Could not open input file " << filename << "." << endl;
263          delete input;          delete input;
264          return false;          return false;
265      }      }

Legend:
Removed from v.2187  
changed lines
  Added in v.2196

  ViewVC Help
Powered by ViewVC 1.1.26