/[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 1407 by gross, Mon Feb 4 06:45:48 2008 UTC revision 1455 by phornby, Thu Feb 28 17:19:44 2008 UTC
# Line 24  extern "C" { Line 24  extern "C" {
24  }  }
25  #include <vector>  #include <vector>
26    
27    #define IS_THERE_A_REASON_FOR_THIS_MAGIC_NAME_LENGTH  256
28    
29  using namespace std;  using namespace std;
30  using namespace escript;  using namespace escript;
31    
# Line 1443  void MeshAdapter::setNewX(const escript: Line 1445  void MeshAdapter::setNewX(const escript:
1445  // saves a data array in openDX format:  // saves a data array in openDX format:
1446  void MeshAdapter::saveDX(const std::string& filename,const boost::python::dict& arg) const  void MeshAdapter::saveDX(const std::string& filename,const boost::python::dict& arg) const
1447  {  {
1448      int MAX_namelength=256;      unsigned int MAX_namelength=IS_THERE_A_REASON_FOR_THIS_MAGIC_NAME_LENGTH;
1449      const int num_data=boost::python::extract<int>(arg.attr("__len__")());      const int num_data=boost::python::extract<int>(arg.attr("__len__")());
1450    /* win32 refactor */    /* win32 refactor */
1451    char* *names = (num_data>0) ? TMPMEMALLOC(num_data,char*) : (char**)NULL;    char* *names = (num_data>0) ? TMPMEMALLOC(num_data,char*) : (char**)NULL;
# Line 1491  void MeshAdapter::saveDX(const std::stri Line 1493  void MeshAdapter::saveDX(const std::stri
1493  // saves a data array in openVTK format:  // saves a data array in openVTK format:
1494  void MeshAdapter::saveVTK(const std::string& filename,const boost::python::dict& arg) const  void MeshAdapter::saveVTK(const std::string& filename,const boost::python::dict& arg) const
1495  {  {
1496      int MAX_namelength=256;      unsigned int MAX_namelength=IS_THERE_A_REASON_FOR_THIS_MAGIC_NAME_LENGTH;
1497      const int num_data=boost::python::extract<int>(arg.attr("__len__")());      const int num_data=boost::python::extract<int>(arg.attr("__len__")());
1498    /* win32 refactor */    /* win32 refactor */
1499    char* *names = (num_data>0) ? TMPMEMALLOC(num_data,char*) : (char**)NULL;    char* *names = (num_data>0) ? TMPMEMALLOC(num_data,char*) : (char**)NULL;
# Line 1851  escript::Data MeshAdapter::getSize() con Line 1853  escript::Data MeshAdapter::getSize() con
1853    
1854  int* MeshAdapter::borrowSampleReferenceIDs(int functionSpaceType) const  int* MeshAdapter::borrowSampleReferenceIDs(int functionSpaceType) const
1855  {  {
1856    int *out=0,i;    int *out = NULL;
1857    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
1858    switch (functionSpaceType) {    switch (functionSpaceType) {
1859      case(Nodes):      case(Nodes):

Legend:
Removed from v.1407  
changed lines
  Added in v.1455

  ViewVC Help
Powered by ViewVC 1.1.26