/[escript]/trunk/escript/src/DataConstant.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataConstant.cpp

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

revision 1799 by jfenwick, Wed Sep 17 06:33:18 2008 UTC revision 1800 by ksteube, Thu Sep 18 05:28:20 2008 UTC
# Line 322  DataConstant::dump(const std::string fil Line 322  DataConstant::dump(const std::string fil
322    
323     if (rank == 0) {     if (rank == 0) {
324        if( ! (ncdims[0] = dataFile.add_dim("l", 1)) )        if( ! (ncdims[0] = dataFile.add_dim("l", 1)) )
325          throw DataException("Error - DataConstant:: appending ncdimsion 0 to netCDF file failed.");          throw DataException("Error - DataConstant:: appending ncdimension 0 to netCDF file failed.");
326        dims[0]=1,        dims[0]=1,
327        ndims=1;        ndims=1;
328     } else {     } else {
329         ndims=rank;         ndims=rank;
330         dims[0]=shape[0];         dims[0]=shape[0];
331         if (! (ncdims[0] = dataFile.add_dim("d0",shape[0])) )         if (! (ncdims[0] = dataFile.add_dim("d0",shape[0])) )
332          throw DataException("Error - DataConstant:: appending ncdimsion 0 to netCDF file failed.");          throw DataException("Error - DataConstant:: appending ncdimension 0 to netCDF file failed.");
333         if ( rank >1 ) {         if ( rank >1 ) {
334             dims[1]=shape[1];             dims[1]=shape[1];
335             if (! (ncdims[1] = dataFile.add_dim("d1",shape[1])) )             if (! (ncdims[1] = dataFile.add_dim("d1",shape[1])) )
336          throw DataException("Error - DataConstant:: appending ncdimsion 1 to netCDF file failed.");          throw DataException("Error - DataConstant:: appending ncdimension 1 to netCDF file failed.");
337         }         }
338         if ( rank >2 ) {         if ( rank >2 ) {
339             dims[2]=shape[2];             dims[2]=shape[2];
340             if (! (ncdims[2] = dataFile.add_dim("d2", shape[2])) )             if (! (ncdims[2] = dataFile.add_dim("d2", shape[2])) )
341          throw DataException("Error - DataConstant:: appending ncdimsion 2 to netCDF file failed.");          throw DataException("Error - DataConstant:: appending ncdimension 2 to netCDF file failed.");
342         }         }
343         if ( rank >3 ) {         if ( rank >3 ) {
344             dims[3]=shape[3];             dims[3]=shape[3];
345             if (! (ncdims[3] = dataFile.add_dim("d3", shape[3])) )             if (! (ncdims[3] = dataFile.add_dim("d3", shape[3])) )
346          throw DataException("Error - DataConstant:: appending ncdimsion 3 to netCDF file failed.");          throw DataException("Error - DataConstant:: appending ncdimension 3 to netCDF file failed.");
347         }         }
348     }     }
349    

Legend:
Removed from v.1799  
changed lines
  Added in v.1800

  ViewVC Help
Powered by ViewVC 1.1.26