/[escript]/branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp

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

revision 2778 by caltinay, Thu Nov 26 01:50:30 2009 UTC revision 2842 by caltinay, Thu Jan 14 05:42:02 2010 UTC
# Line 253  void MeshAdapter::dump(const string& fil Line 253  void MeshAdapter::dump(const string& fil
253    
254     // // // // // Nodes // // // // //     // // // // // Nodes // // // // //
255    
256       // Nodes nodeDistribution
257       if (! ( ids = dataFile.add_var("Nodes_NodeDistribution", ncInt, ncdims[2])) )
258          throw DataException(msgPrefix+"add_var(Nodes_NodeDistribution)");
259       int_ptr = &mesh->Nodes->nodesDistribution->first_component[0];
260       if (! (ids->put(int_ptr, mpi_size+1)) )
261          throw DataException(msgPrefix+"put(Nodes_NodeDistribution)");
262    
263       // Nodes degreesOfFreedomDistribution
264       if (! ( ids = dataFile.add_var("Nodes_DofDistribution", ncInt, ncdims[2])) )
265          throw DataException(msgPrefix+"add_var(Nodes_DofDistribution)");
266       int_ptr = &mesh->Nodes->degreesOfFreedomDistribution->first_component[0];
267       if (! (ids->put(int_ptr, mpi_size+1)) )
268          throw DataException(msgPrefix+"put(Nodes_DofDistribution)");
269    
270     // Only write nodes if non-empty because NetCDF doesn't like empty arrays     // Only write nodes if non-empty because NetCDF doesn't like empty arrays
271     // (it treats them as NC_UNLIMITED)     // (it treats them as NC_UNLIMITED)
272     if (numNodes>0) {     if (numNodes>0) {
# Line 305  void MeshAdapter::dump(const string& fil Line 319  void MeshAdapter::dump(const string& fil
319        if (! (ids->put(&(mesh->Nodes->Coordinates[INDEX2(0,0,numDim)]), numNodes, numDim)) )        if (! (ids->put(&(mesh->Nodes->Coordinates[INDEX2(0,0,numDim)]), numNodes, numDim)) )
320           throw DataException(msgPrefix+"put(Nodes_Coordinates)");           throw DataException(msgPrefix+"put(Nodes_Coordinates)");
321    
       // Nodes degreesOfFreedomDistribution  
       if (! ( ids = dataFile.add_var("Nodes_DofDistribution", ncInt, ncdims[2])) )  
          throw DataException(msgPrefix+"add_var(Nodes_DofDistribution)");  
       int_ptr = &mesh->Nodes->degreesOfFreedomDistribution->first_component[0];  
       if (! (ids->put(int_ptr, mpi_size+1)) )  
          throw DataException(msgPrefix+"put(Nodes_DofDistribution)");  
   
       // Nodes nodeDistribution  
       if (! ( ids = dataFile.add_var("Nodes_NodeDistribution", ncInt, ncdims[2])) )  
          throw DataException(msgPrefix+"add_var(Nodes_NodeDistribution)");  
       int_ptr = &mesh->Nodes->nodesDistribution->first_component[0];  
       if (! (ids->put(int_ptr, mpi_size+1)) )  
          throw DataException(msgPrefix+"put(Nodes_NodeDistribution)");  
   
322     }     }
323    
324     // // // // // Elements // // // // //     // // // // // Elements // // // // //

Legend:
Removed from v.2778  
changed lines
  Added in v.2842

  ViewVC Help
Powered by ViewVC 1.1.26