/[escript]/trunk/ripley/src/ripleycpp.cpp
ViewVC logotype

Diff of /trunk/ripley/src/ripleycpp.cpp

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

revision 5148 by caltinay, Mon Sep 15 01:25:23 2014 UTC revision 5187 by caltinay, Wed Oct 1 06:49:24 2014 UTC
# Line 65  escript::Data readBinaryGrid(std::string Line 65  escript::Data readBinaryGrid(std::string
65      int dim=fs.getDim();      int dim=fs.getDim();
66      ReaderParameters params;      ReaderParameters params;
67    
68      params.first = extractPyArray<int>(pyFirst, "first", dim);      params.first = extractPyArray<dim_t>(pyFirst, "first", dim);
69      params.numValues = extractPyArray<int>(pyNum, "numValues", dim);      params.numValues = extractPyArray<dim_t>(pyNum, "numValues", dim);
70      params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);      params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);
71      params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);      params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);
72      params.byteOrder = byteOrder;      params.byteOrder = byteOrder;
# Line 91  escript::Data readBinaryGridFromZipped(s Line 91  escript::Data readBinaryGridFromZipped(s
91      int dim=fs.getDim();      int dim=fs.getDim();
92      ReaderParameters params;      ReaderParameters params;
93    
94      params.first = extractPyArray<int>(pyFirst, "first", dim);      params.first = extractPyArray<dim_t>(pyFirst, "first", dim);
95      params.numValues = extractPyArray<int>(pyNum, "numValues", dim);      params.numValues = extractPyArray<dim_t>(pyNum, "numValues", dim);
96      params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);      params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);
97      params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);      params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);
98      params.byteOrder = byteOrder;      params.byteOrder = byteOrder;
# Line 117  escript::Data readNcGrid(std::string fil Line 117  escript::Data readNcGrid(std::string fil
117      int dim=fs.getDim();      int dim=fs.getDim();
118      ReaderParameters params;      ReaderParameters params;
119    
120      params.first = extractPyArray<int>(pyFirst, "first", dim);      params.first = extractPyArray<dim_t>(pyFirst, "first", dim);
121      params.numValues = extractPyArray<int>(pyNum, "numValues", dim);      params.numValues = extractPyArray<dim_t>(pyNum, "numValues", dim);
122      params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);      params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);
123      params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);      params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);
124      std::vector<int> shape(extractPyArray<int>(pyShape, "shape"));      std::vector<int> shape(extractPyArray<int>(pyShape, "shape"));
# Line 141  escript::Domain_ptr _brick(double _n0, d Line 141  escript::Domain_ptr _brick(double _n0, d
141                   const object& l1, const object& l2, int d0, int d1, int d2,                   const object& l1, const object& l2, int d0, int d1, int d2,
142                   const object& objpoints, const object& objtags, escript::SubWorld_ptr world)                   const object& objpoints, const object& objtags, escript::SubWorld_ptr world)
143  {  {
144      int n0=static_cast<int>(_n0), n1=static_cast<int>(_n1), n2=static_cast<int>(_n2);      dim_t n0=static_cast<dim_t>(_n0), n1=static_cast<dim_t>(_n1), n2=static_cast<dim_t>(_n2);
145      double x0=0., x1=1., y0=0., y1=1., z0=0., z1=1.;      double x0=0., x1=1., y0=0., y1=1., z0=0., z1=1.;
146      if (extract<tuple>(l0).check()) {      if (extract<tuple>(l0).check()) {
147          tuple x=extract<tuple>(l0);          tuple x=extract<tuple>(l0);
# Line 234  escript::Domain_ptr _rectangle(double _n Line 234  escript::Domain_ptr _rectangle(double _n
234                    escript::SubWorld_ptr world                    escript::SubWorld_ptr world
235                    )                    )
236  {  {
237      int n0=static_cast<int>(_n0), n1=static_cast<int>(_n1);      dim_t n0=static_cast<dim_t>(_n0), n1=static_cast<dim_t>(_n1);
238      double x0=0., x1=1., y0=0., y1=1.;      double x0=0., x1=1., y0=0., y1=1.;
239      if (extract<tuple>(l0).check()) {      if (extract<tuple>(l0).check()) {
240          tuple x=extract<tuple>(l0);          tuple x=extract<tuple>(l0);
# Line 283  escript::Domain_ptr _rectangle(double _n Line 283  escript::Domain_ptr _rectangle(double _n
283          extract<std::string> ex_str(pytags[i]);          extract<std::string> ex_str(pytags[i]);
284          if (ex_int.check()) {          if (ex_int.check()) {
285              tags[i]=ex_int();              tags[i]=ex_int();
286              if (tags[i]>= curmax) {              if (tags[i] >= curmax) {
287                  curmax=tags[i]+1;                  curmax=tags[i]+1;
288              }              }
289          } else if (ex_str.check()) {          } else if (ex_str.check()) {

Legend:
Removed from v.5148  
changed lines
  Added in v.5187

  ViewVC Help
Powered by ViewVC 1.1.26