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

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

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

revision 2385 by gross, Wed Apr 15 03:52:38 2009 UTC revision 2518 by gross, Fri Jul 3 07:43:11 2009 UTC
# Line 1453  void MeshAdapter::setNewX(const escript: Line 1453  void MeshAdapter::setNewX(const escript:
1453     const MeshAdapter& newDomain=dynamic_cast<const MeshAdapter&>(*(new_x.getFunctionSpace().getDomain()));     const MeshAdapter& newDomain=dynamic_cast<const MeshAdapter&>(*(new_x.getFunctionSpace().getDomain()));
1454     if (newDomain!=*this)     if (newDomain!=*this)
1455        throw FinleyAdapterException("Error - Illegal domain of new point locations");        throw FinleyAdapterException("Error - Illegal domain of new point locations");
1456     tmp = new_x.getDataC();     if ( new_x.getFunctionSpace() == continuousFunction(asAbstractContinuousDomain()) ) {
1457     Finley_Mesh_setCoordinates(mesh,&tmp);         tmp = new_x.getDataC();
1458           Finley_Mesh_setCoordinates(mesh,&tmp);
1459       } else {
1460           escript::Data new_x_inter=escript::Data( new_x,  continuousFunction(asAbstractContinuousDomain()) );
1461           tmp = new_x_inter.getDataC();
1462           Finley_Mesh_setCoordinates(mesh,&tmp);
1463       }
1464     checkFinleyError();     checkFinleyError();
1465  }  }
1466    
# Line 1512  void MeshAdapter::saveDX(const std::stri Line 1518  void MeshAdapter::saveDX(const std::stri
1518  //  //
1519  // saves mesh and optionally data arrays in VTK format  // saves mesh and optionally data arrays in VTK format
1520  //  //
1521  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 std::string& metadata, const std::string& metadata_schema) const
1522  {  {
1523     int num_data;     int num_data;
1524     char **names;     char **names;
# Line 1520  void MeshAdapter::saveVTK(const std::str Line 1526  void MeshAdapter::saveVTK(const std::str
1526     escriptDataC **ptr_data;     escriptDataC **ptr_data;
1527    
1528     extractArgsFromDict(arg, num_data, names, data, ptr_data);     extractArgsFromDict(arg, num_data, names, data, ptr_data);
1529     Finley_Mesh_saveVTK(filename.c_str(), m_finleyMesh.get(), num_data, names, ptr_data);     Finley_Mesh_saveVTK(filename.c_str(), m_finleyMesh.get(), num_data, names, ptr_data, metadata.c_str(), metadata_schema.c_str());
1530     checkFinleyError();     checkFinleyError();
1531    
1532     /* win32 refactor */     /* win32 refactor */
# Line 1858  escript::Data MeshAdapter::getSize() con Line 1864  escript::Data MeshAdapter::getSize() con
1864     return escript::function(asAbstractContinuousDomain()).getSize();     return escript::function(asAbstractContinuousDomain()).getSize();
1865  }  }
1866    
1867  int* MeshAdapter::borrowSampleReferenceIDs(int functionSpaceType) const  const int* MeshAdapter::borrowSampleReferenceIDs(int functionSpaceType) const
1868  {  {
1869     int *out = NULL;     int *out = NULL;
1870     Finley_Mesh* mesh=m_finleyMesh.get();     Finley_Mesh* mesh=m_finleyMesh.get();
# Line 2095  int MeshAdapter::getNumberOfTagsInUse(in Line 2101  int MeshAdapter::getNumberOfTagsInUse(in
2101    }    }
2102    return numTags;    return numTags;
2103  }  }
2104  int* MeshAdapter::borrowListOfTagsInUse(int functionSpaceCode) const  
2105    const int* MeshAdapter::borrowListOfTagsInUse(int functionSpaceCode) const
2106  {  {
2107    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
2108    index_t* tags=NULL;    index_t* tags=NULL;

Legend:
Removed from v.2385  
changed lines
  Added in v.2518

  ViewVC Help
Powered by ViewVC 1.1.26