/[escript]/branches/doubleplusgood/dudley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/CPPAdapter/MeshAdapter.cpp

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

revision 4331 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4332 by jfenwick, Thu Mar 21 04:21:14 2013 UTC
# Line 115  Dudley_Mesh* MeshAdapter::getDudley_Mesh Line 115  Dudley_Mesh* MeshAdapter::getDudley_Mesh
115    
116  void MeshAdapter::write(const string& fileName) const  void MeshAdapter::write(const string& fileName) const
117  {  {
118     char *fName = (fileName.size()+1>0) ? TMPMEMALLOC(fileName.size()+1,char) : (char*)NULL;     char *fName = (fileName.size()+1>0) ? new char[fileName.size()+1] : (char*)NULL;
119     strcpy(fName,fileName.c_str());     strcpy(fName,fileName.c_str());
120     Dudley_Mesh_write(m_dudleyMesh.get(),fName);     Dudley_Mesh_write(m_dudleyMesh.get(),fName);
121     checkDudleyError();     checkDudleyError();
122     TMPMEMFREE(fName);     delete[] fName;
123  }  }
124    
125  void MeshAdapter::Print_Mesh_Info(const bool full) const  void MeshAdapter::Print_Mesh_Info(const bool full) const
# Line 433  void MeshAdapter::dump(const string& fil Line 433  void MeshAdapter::dump(const string& fil
433     if (num_Tags>0) {     if (num_Tags>0) {
434    
435        // Temp storage to gather node IDs        // Temp storage to gather node IDs
436        int *Tags_keys = TMPMEMALLOC(num_Tags, int);        int *Tags_keys = new  int[num_Tags];
437        char name_temp[4096];        char name_temp[4096];
438    
439        /* Copy tag data into temp arrays */        /* Copy tag data into temp arrays */
# Line 469  void MeshAdapter::dump(const string& fil Line 469  void MeshAdapter::dump(const string& fil
469           }           }
470        }        }
471    
472        TMPMEMFREE(Tags_keys);        delete[] Tags_keys;
473     }     }
474    
475  /* Send token to next MPI process so he can take his turn */  /* Send token to next MPI process so he can take his turn */

Legend:
Removed from v.4331  
changed lines
  Added in v.4332

  ViewVC Help
Powered by ViewVC 1.1.26