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

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

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

revision 3269 by jfenwick, Wed Oct 13 03:21:50 2010 UTC revision 3344 by caltinay, Thu Nov 11 23:26:52 2010 UTC
# Line 18  Line 18 
18  #ifdef USE_NETCDF  #ifdef USE_NETCDF
19  #include <netcdfcpp.h>  #include <netcdfcpp.h>
20  #endif  #endif
 #ifdef ESYS_MPI  
 #include <mpi.h>  
 #include "esysUtils/Esys_MPI.h"  
 #endif  
21  extern "C" {  extern "C" {
22  #include "esysUtils/blocktimer.h"  #include "esysUtils/blocktimer.h"
23  }  }
24    
25    #include <boost/python/import.hpp>
26    #include <boost/python/tuple.hpp>
27    
28  using namespace std;  using namespace std;
29  using namespace escript;  using namespace escript;
30    
# Line 1550  void MeshAdapter::saveDX(const string& f Line 1549  void MeshAdapter::saveDX(const string& f
1549  //  //
1550  void MeshAdapter::saveVTK(const string& filename,const boost::python::dict& arg,  const string& metadata, const string& metadata_schema) const  void MeshAdapter::saveVTK(const string& filename,const boost::python::dict& arg,  const string& metadata, const string& metadata_schema) const
1551  {  {
1552     int num_data;      boost::python::object pySaveVTK = boost::python::import("esys.weipa").attr("saveVTK");
1553     char **names;      pySaveVTK(*boost::python::make_tuple(filename,
1554     escriptDataC *data;                 const_cast<MeshAdapter*>(this)->getPtr(),
1555     escriptDataC **ptr_data;                 metadata, metadata_schema), **arg);
   
    extractArgsFromDict(arg, num_data, names, data, ptr_data);  
    Finley_Mesh_saveVTK(filename.c_str(), m_finleyMesh.get(), num_data, names, ptr_data, metadata.c_str(), metadata_schema.c_str());  
    checkFinleyError();  
   
    /* win32 refactor */  
    TMPMEMFREE(data);  
    TMPMEMFREE(ptr_data);  
    for(int i=0; i<num_data; i++)  
    {  
       TMPMEMFREE(names[i]);  
    }  
    TMPMEMFREE(names);  
1556  }  }
1557    
1558  bool MeshAdapter::ownSample(int fs_code, index_t id) const  bool MeshAdapter::ownSample(int fs_code, index_t id) const

Legend:
Removed from v.3269  
changed lines
  Added in v.3344

  ViewVC Help
Powered by ViewVC 1.1.26