/[escript]/trunk/escript/src/escriptcpp.cpp
ViewVC logotype

Diff of /trunk/escript/src/escriptcpp.cpp

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

revision 2644 by jfenwick, Wed Sep 2 04:14:03 2009 UTC revision 2646 by jfenwick, Fri Sep 4 00:13:00 2009 UTC
# Line 240  args("solver", "preconditioner", "packag Line 240  args("solver", "preconditioner", "packag
240      .def("isConstant",&escript::Data::isConstant,":rtype: ``bool``\n:return: True if this ``Data`` is an instance of ``DataConstant``\n:note: This does not mean the data is immutable.")      .def("isConstant",&escript::Data::isConstant,":rtype: ``bool``\n:return: True if this ``Data`` is an instance of ``DataConstant``\n:note: This does not mean the data is immutable.")
241      .def("isLazy",&escript::Data::isLazy,":rtype: ``bool``\n:return: True if this ``Data`` is lazy.")      .def("isLazy",&escript::Data::isLazy,":rtype: ``bool``\n:return: True if this ``Data`` is lazy.")
242      .def("isReady",&escript::Data::isReady,":rtype: ``bool``\n:return: True if this ``Data`` is not lazy.")      .def("isReady",&escript::Data::isReady,":rtype: ``bool``\n:return: True if this ``Data`` is not lazy.")
243        .def("hasNoSamples", &escript::Data::hasNoSamples,":rtype: ``bool``\n:return: True if this ``Data`` (locally)"
244    " contains no samples.")
245      .def("expand",&escript::Data::expand,"Convert the data to expanded representation if it is not expanded already.")      .def("expand",&escript::Data::expand,"Convert the data to expanded representation if it is not expanded already.")
246      .def("tag",&escript::Data::tag,"Convert data to tagged representation if it is not already tagged or expanded")      .def("tag",&escript::Data::tag,"Convert data to tagged representation if it is not already tagged or expanded")
247      .def("resolve",&escript::Data::resolve,"Convert the data to non-lazy representation.")      .def("resolve",&escript::Data::resolve,"Convert the data to non-lazy representation.")
# Line 259  args("solver", "preconditioner", "packag Line 261  args("solver", "preconditioner", "packag
261  "\n:param dataPointNo: datapoint to access\n:type dataPointNo: int")  "\n:param dataPointNo: datapoint to access\n:type dataPointNo: int")
262      .def("setToZero",&escript::Data::setToZero,"After this call the object will store values of the same shape as before but all components will be zero.")      .def("setToZero",&escript::Data::setToZero,"After this call the object will store values of the same shape as before but all components will be zero.")
263      .def("interpolate",&escript::Data::interpolate,args("functionspace"),"Interpolate this object's values into a new functionspace.")      .def("interpolate",&escript::Data::interpolate,args("functionspace"),"Interpolate this object's values into a new functionspace.")
264      .def("interpolateTable", &escript::Data::interpolateFromTable,      .def("interpolateTable", &escript::Data::interpolateFromTable2DP,
265  args("table","Amin","Astep","undef", "B", "Bmin", "Bstep"),  args("table","Amin","Astep", "B", "Bmin", "Bstep","undef"),
266  "Creates a new Data object by interpolating using the source data (which are\n"  "Creates a new Data object by interpolating using the source data (which are\n"
267  "looked up in ``table``)\n\n"  "looked up in ``table``)\n``A`` must be the outer dimension on the table\n\n"
268  ":param table: two dimensional collection of values\n"  ":param table: two dimensional collection of values\n"
269  ":param Amin: The base of locations in table\n:type Amin: float\n"  ":param Amin: The base of locations in table\n:type Amin: float\n"
270  ":param Astep: size of gap between each item in the table\n:type Astep: float\n"  ":param Astep: size of gap between each item in the table\n:type Astep: float\n"
# Line 274  args("table","Amin","Astep","undef", "B" Line 276  args("table","Amin","Astep","undef", "B"
276  ":raise RuntimeError(DataException): if the cordinates do not map into the table or if the interpolated value is above ``undef``"  ":raise RuntimeError(DataException): if the cordinates do not map into the table or if the interpolated value is above ``undef``"
277  "\n:rtype: `Data`"  "\n:rtype: `Data`"
278  )  )
279        .def("interpolateTable", &escript::Data::interpolateFromTable1DP,
280    args("table","Amin","Astep","undef"),
281    "Creates a new Data object by interpolating using the source data (which are\n"
282    "looked up in ``table``)\n\n"
283    ":param table: one dimensional collection of values\n"
284    ":param Amin: The base of locations in table\n:type Amin: float\n"
285    ":param Astep: size of gap between each item in the table\n:type Astep: float\n"
286    ":param undef: upper bound on interpolated values\n:type undef: float\n"
287    ":raise RuntimeError(DataException): if the cordinates do not map into the table or if the interpolated value is above ``undef``"
288    "\n:rtype: `Data`"
289    )
290    
291    
292      .def("minGlobalDataPoint",&escript::Data::minGlobalDataPoint)      .def("minGlobalDataPoint",&escript::Data::minGlobalDataPoint)
293      .def("maxGlobalDataPoint",&escript::Data::maxGlobalDataPoint)      .def("maxGlobalDataPoint",&escript::Data::maxGlobalDataPoint)
# Line 330  args("table","Amin","Astep","undef", "B" Line 344  args("table","Amin","Astep","undef", "B"
344      // following implements the python "-" negation operator      // following implements the python "-" negation operator
345      .def("__neg__",&escript::Data::neg, ":return: negation of the values in this object\n:rtype: `Data`")      .def("__neg__",&escript::Data::neg, ":return: negation of the values in this object\n:rtype: `Data`")
346      // following implements the python "+" identity operator      // following implements the python "+" identity operator
347      .def("__pos__",&escript::Data::pos, "\nThe unary + operator\n\n:rtype: Data`")      .def("__pos__",&escript::Data::pos, "\nThe unary + operator\n\n:rtype: `Data`")
348      // following two functions implement the python [] operator      // following two functions implement the python [] operator
349      .def("__getitem__",&escript::Data::getItem,"Used by the python [] operator\n\n:rtype: `Data`")      .def("__getitem__",&escript::Data::getItem,"Used by the python [] operator\n\n:rtype: `Data`")
350      .def("__setitem__",&escript::Data::setItemO,"Used by the python [] operator")      .def("__setitem__",&escript::Data::setItemO,"Used by the python [] operator")

Legend:
Removed from v.2644  
changed lines
  Added in v.2646

  ViewVC Help
Powered by ViewVC 1.1.26