/[escript]/trunk/bruce/src/Bruce.cpp
ViewVC logotype

Diff of /trunk/bruce/src/Bruce.cpp

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

revision 869 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 870 by phornby, Fri Oct 13 05:01:25 2006 UTC
# Line 894  Bruce::saveVTK(const std::string& filena Line 894  Bruce::saveVTK(const std::string& filena
894    
895    //    //
896    // extract Data objects and associated names from dictionary object    // extract Data objects and associated names from dictionary object
897    const int MAX_namelength=256;    const std::string::size_type MAX_namelength=256;
898    
899    //    //
900    // open archive file    // open archive file
# Line 1011  Bruce::saveVTK(const std::string& filena Line 1011  Bruce::saveVTK(const std::string& filena
1011      archiveFile << "\t\t\t\t<CellData";      archiveFile << "\t\t\t\t<CellData";
1012      for (int i_data=0; i_data<num_data; i_data++) {      for (int i_data=0; i_data<num_data; i_data++) {
1013        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);
1014        std::string name(boost::python::extract<std::string>(keys[i_data]),0 , MAX_namelength);        const std::string &
1015          full_name = boost::python::extract<std::string>(keys[i_data]);
1016          std::string name(full_name, 0, MAX_namelength);
1017                
1018        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==Function) {        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==Function) {
1019                    
# Line 1050  Bruce::saveVTK(const std::string& filena Line 1052  Bruce::saveVTK(const std::string& filena
1052      // write the cell-data data arrays      // write the cell-data data arrays
1053      for (int i_data=0; i_data<num_data; i_data++) {      for (int i_data=0; i_data<num_data; i_data++) {
1054        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);
1055        std::string name(boost::python::extract<std::string>(keys[i_data]),0 , MAX_namelength);        const std::string &
1056          full_name = boost::python::extract<std::string>(keys[i_data]);
1057          std::string name(full_name, 0, MAX_namelength);
1058                
1059        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==Function) {        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==Function) {
1060          int numPointsPerSample=1;          int numPointsPerSample=1;
# Line 1155  Bruce::saveVTK(const std::string& filena Line 1159  Bruce::saveVTK(const std::string& filena
1159      archiveFile << "\t\t\t\t<PointData";      archiveFile << "\t\t\t\t<PointData";
1160      for (int i_data=0; i_data<num_data; i_data++) {      for (int i_data=0; i_data<num_data; i_data++) {
1161        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);
1162        std::string name(boost::python::extract<std::string>(keys[i_data]),0 , MAX_namelength);        const std::string &
1163          full_name = boost::python::extract<std::string>(keys[i_data]);
1164          std::string name(full_name, 0, MAX_namelength);
1165    
1166        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==ContinuousFunction) {        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==ContinuousFunction) {
1167    
# Line 1194  Bruce::saveVTK(const std::string& filena Line 1200  Bruce::saveVTK(const std::string& filena
1200      // write the point-data data arrays      // write the point-data data arrays
1201      for (int i_data=0; i_data<num_data; i_data++) {      for (int i_data=0; i_data<num_data; i_data++) {
1202        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);        Data& d = boost::python::extract<Data&>(dataDict[keys[i_data]]);
1203        std::string name(boost::python::extract<std::string>(keys[i_data]),0 , MAX_namelength);        const std::string &
1204        if (!d.isEmpty() && d.getFunctionSpace().getTypeCode()==ContinuousFunction) {        full_name = boost::python::extract<std::string>(keys[i_data]);
1205          std::string name(full_name, 0, MAX_namelength);
1206    
1207          if (!d.isEmpty() &&
1208              d.getFunctionSpace().getTypeCode()==ContinuousFunction) {
1209    
1210          int numPointsPerSample=1;          int numPointsPerSample=1;
1211          int rank = d.getDataPointRank();          int rank = d.getDataPointRank();

Legend:
Removed from v.869  
changed lines
  Added in v.870

  ViewVC Help
Powered by ViewVC 1.1.26