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

Diff of /branches/intelc_win32/finley/src/CPPAdapter/MeshAdapterFactory.cpp

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

trunk/finley/src/CPPAdapter/MeshAdapterFactory.cpp revision 734 by jgs, Wed Feb 1 05:15:12 2006 UTC branches/intelc_win32/finley/src/CPPAdapter/MeshAdapterFactory.cpp revision 742 by woo409, Sat Jun 24 11:27:16 2006 UTC
# Line 31  namespace finley { Line 31  namespace finley {
31      //      //
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      char fName[fileName.size()+1];      // Win32 refactor
35        char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;
36      strcpy(fName,fileName.c_str());      strcpy(fName,fileName.c_str());
37      Finley_Mesh* fMesh=Finley_Mesh_read(fName,integrationOrder);      Finley_Mesh* fMesh=Finley_Mesh_read(fName,integrationOrder);
38      checkFinleyError();      checkFinleyError();
39      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);
40        
41        /* win32 refactor */
42        TMPMEMFREE(fName);
43        
44      return temp;      return temp;
45    }    }
46    
# Line 138  namespace finley { Line 143  namespace finley {
143      //      //
144      // extract the meshes from meshList      // extract the meshes from meshList
145      int numMsh=boost::python::extract<int>(meshList.attr("__len__")());      int numMsh=boost::python::extract<int>(meshList.attr("__len__")());
146      Finley_Mesh* mshes[numMsh];      Finley_Mesh **mshes = (numMsh) ? TMPMEMALLOC(numMsh,Finley_Mesh*) : (Finley_Mesh**)NULL;
147      for (int i=0;i<numMsh;++i) {      for (int i=0;i<numMsh;++i) {
148           AbstractContinuousDomain& meshListMember=boost::python::extract<AbstractContinuousDomain&>(meshList[i]);           AbstractContinuousDomain& meshListMember=boost::python::extract<AbstractContinuousDomain&>(meshList[i]);
149           const MeshAdapter* finley_meshListMember=static_cast<const MeshAdapter*>(&meshListMember);           const MeshAdapter* finley_meshListMember=static_cast<const MeshAdapter*>(&meshListMember);
# Line 151  namespace finley { Line 156  namespace finley {
156      // Convert any finley errors into a C++ exception      // Convert any finley errors into a C++ exception
157      checkFinleyError();      checkFinleyError();
158      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);      AbstractContinuousDomain* temp=new MeshAdapter(fMesh);
159        TMPMEMFREE(mshes);
160    
161      return temp;      return temp;
162    }    }
163    AbstractContinuousDomain*  glueFaces(const boost::python::list& meshList,    AbstractContinuousDomain*  glueFaces(const boost::python::list& meshList,

Legend:
Removed from v.734  
changed lines
  Added in v.742

  ViewVC Help
Powered by ViewVC 1.1.26