/[escript]/trunk/finley/src/CPPAdapter/MeshAdapterFactory.cpp
ViewVC logotype

Diff of /trunk/finley/src/CPPAdapter/MeshAdapterFactory.cpp

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

revision 756 by bcumming, Mon Jun 26 01:46:34 2006 UTC revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 32  namespace finley { Line 32  namespace finley {
32      // create a copy of the filename to overcome the non-constness of call      // create a copy of the filename to overcome the non-constness of call
33      // to Finley_Mesh_read      // to Finley_Mesh_read
34      Finley_Mesh* fMesh=0;      Finley_Mesh* fMesh=0;
35      char fName[fileName.size()+1];      // Win32 refactor
36        char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;
37      strcpy(fName,fileName.c_str());      strcpy(fName,fileName.c_str());
38    
39  #ifndef PASO_MPI  #ifndef PASO_MPI
# Line 46  namespace finley { Line 47  namespace finley {
47  #endif  #endif
48      checkFinleyError();      checkFinleyError();
49      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);
50        
51        /* win32 refactor */
52        TMPMEMFREE(fName);
53        
54      return temp;      return temp;
55    }    }
56    
# Line 167  namespace finley { Line 172  namespace finley {
172      // extract the meshes from meshList      // extract the meshes from meshList
173  #ifndef PASO_MPI  #ifndef PASO_MPI
174      int numMsh=boost::python::extract<int>(meshList.attr("__len__")());      int numMsh=boost::python::extract<int>(meshList.attr("__len__")());
175      Finley_Mesh* mshes[numMsh];      Finley_Mesh **mshes = (numMsh) ? TMPMEMALLOC(numMsh,Finley_Mesh*) : (Finley_Mesh**)NULL;
176      for (int i=0;i<numMsh;++i) {      for (int i=0;i<numMsh;++i) {
177           AbstractContinuousDomain& meshListMember=boost::python::extract<AbstractContinuousDomain&>(meshList[i]);           AbstractContinuousDomain& meshListMember=boost::python::extract<AbstractContinuousDomain&>(meshList[i]);
178           const MeshAdapter* finley_meshListMember=static_cast<const MeshAdapter*>(&meshListMember);           const MeshAdapter* finley_meshListMember=static_cast<const MeshAdapter*>(&meshListMember);
# Line 187  namespace finley { Line 192  namespace finley {
192      // Convert any finley errors into a C++ exception      // Convert any finley errors into a C++ exception
193      checkFinleyError();      checkFinleyError();
194      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);
195        TMPMEMFREE(mshes);
196    
197      return temp;      return temp;
198    }    }
199    AbstractContinuousDomain*  glueFaces(const boost::python::list& meshList,    AbstractContinuousDomain*  glueFaces(const boost::python::list& meshList,

Legend:
Removed from v.756  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.26