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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5077 - (show annotations)
Tue Jun 24 03:51:19 2014 UTC (4 years, 9 months ago) by caltinay
File size: 22578 byte(s)
Make readBinaryGrid "public" within the ripley module.

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2014 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 #include <ripley/AbstractAssembler.h>
18 #include <ripley/Brick.h>
19 #include <ripley/Rectangle.h>
20 #include <esysUtils/esysExceptionTranslator.h>
21
22 #include <boost/python.hpp>
23 #include <boost/python/module.hpp>
24 #include <boost/python/def.hpp>
25 #include <boost/python/detail/defaults_gen.hpp>
26 #include <boost/version.hpp>
27
28 #include "escript/SubWorld.h"
29
30 using namespace boost::python;
31
32 namespace ripley {
33
34 template<typename T>
35 std::vector<T> extractPyArray(const object& obj, const std::string& name,
36 int expectedLength=0)
37 {
38 std::vector<T> result;
39 if (extract<tuple>(obj).check() || extract<list>(obj).check()) {
40 if (expectedLength==0 || len(obj)==expectedLength) {
41 for (int i=0; i<len(obj); i++) {
42 result.push_back(extract<T>(obj[i]));
43 }
44 } else {
45 std::stringstream ssError;
46 ssError << "argument '" << name << "' has wrong length";
47 std::string error(ssError.str());
48 throw RipleyException(error.c_str());
49 }
50 } else {
51 std::stringstream ssError;
52 ssError << "argument '" << name << "' must be a tuple or list";
53 std::string error(ssError.str());
54 throw RipleyException(error.c_str());
55 }
56
57 return result;
58 }
59
60 escript::Data readBinaryGrid(std::string filename, escript::FunctionSpace fs,
61 const object& pyShape, double fill, int byteOrder, int dataType,
62 const object& pyFirst, const object& pyNum, const object& pyMultiplier,
63 const object& pyReverse)
64 {
65 int dim=fs.getDim();
66 ReaderParameters params;
67
68 params.first = extractPyArray<int>(pyFirst, "first", dim);
69 params.numValues = extractPyArray<int>(pyNum, "numValues", dim);
70 params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);
71 params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);
72 params.byteOrder = byteOrder;
73 params.dataType = dataType;
74 std::vector<int> shape(extractPyArray<int>(pyShape, "shape"));
75
76 const RipleyDomain* dom=dynamic_cast<const RipleyDomain*>(fs.getDomain().get());
77 if (!dom)
78 throw RipleyException("Function space must be on a ripley domain");
79
80 escript::Data res(fill, shape, fs, true);
81 dom->readBinaryGrid(res, filename, params);
82 return res;
83 }
84
85 #ifdef USE_BOOSTIO
86 escript::Data readBinaryGridFromZipped(std::string filename, escript::FunctionSpace fs,
87 const object& pyShape, double fill, int byteOrder, int dataType,
88 const object& pyFirst, const object& pyNum, const object& pyMultiplier,
89 const object& pyReverse)
90 {
91 int dim=fs.getDim();
92 ReaderParameters params;
93
94 params.first = extractPyArray<int>(pyFirst, "first", dim);
95 params.numValues = extractPyArray<int>(pyNum, "numValues", dim);
96 params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);
97 params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);
98 params.byteOrder = byteOrder;
99 params.dataType = dataType;
100 std::vector<int> shape(extractPyArray<int>(pyShape, "shape"));
101
102 const RipleyDomain* dom=dynamic_cast<const RipleyDomain*>(fs.getDomain().get());
103 if (!dom)
104 throw RipleyException("Function space must be on a ripley domain");
105
106 escript::Data res(fill, shape, fs, true);
107 dom->readBinaryGridFromZipped(res, filename, params);
108 return res;
109 }
110 #endif
111
112 escript::Data readNcGrid(std::string filename, std::string varname,
113 escript::FunctionSpace fs, const object& pyShape, double fill,
114 const object& pyFirst, const object& pyNum, const object& pyMultiplier,
115 const object& pyReverse)
116 {
117 int dim=fs.getDim();
118 ReaderParameters params;
119
120 params.first = extractPyArray<int>(pyFirst, "first", dim);
121 params.numValues = extractPyArray<int>(pyNum, "numValues", dim);
122 params.multiplier = extractPyArray<int>(pyMultiplier, "multiplier", dim);
123 params.reverse = extractPyArray<int>(pyReverse, "reverse", dim);
124 std::vector<int> shape(extractPyArray<int>(pyShape, "shape"));
125
126 const RipleyDomain* dom=dynamic_cast<const RipleyDomain*>(fs.getDomain().get());
127 if (!dom)
128 throw RipleyException("Function space must be on a ripley domain");
129
130 escript::Data res(fill, shape, fs, true);
131 dom->readNcGrid(res, filename, varname, params);
132 return res;
133 }
134
135 // These wrappers are required to make the shared pointers work through the
136 // Python wrapper
137
138 // The double for n? is just to keep python happy when people need to deal with
139 // truediv
140 escript::Domain_ptr _brick(double _n0, double _n1, double _n2, const object& l0,
141 const object& l1, const object& l2, int d0, int d1, int d2,
142 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);
145 double x0=0., x1=1., y0=0., y1=1., z0=0., z1=1.;
146 if (extract<tuple>(l0).check()) {
147 tuple x=extract<tuple>(l0);
148 if (len(x)==2) {
149 x0=extract<double>(x[0]);
150 x1=extract<double>(x[1]);
151 } else
152 throw RipleyException("Argument l0 must be a float or 2-tuple");
153 } else if (extract<double>(l0).check()) {
154 x1=extract<double>(l0);
155 } else
156 throw RipleyException("Argument l0 must be a float or 2-tuple");
157
158 if (extract<tuple>(l1).check()) {
159 tuple y=extract<tuple>(l1);
160 if (len(y)==2) {
161 y0=extract<double>(y[0]);
162 y1=extract<double>(y[1]);
163 } else
164 throw RipleyException("Argument l1 must be a float or 2-tuple");
165 } else if (extract<double>(l1).check()) {
166 y1=extract<double>(l1);
167 } else
168 throw RipleyException("Argument l1 must be a float or 2-tuple");
169
170 if (extract<tuple>(l2).check()) {
171 tuple z=extract<tuple>(l2);
172 if (len(z)==2) {
173 z0=extract<double>(z[0]);
174 z1=extract<double>(z[1]);
175 } else
176 throw RipleyException("Argument l2 must be a float or 2-tuple");
177 } else if (extract<double>(l2).check()) {
178 z1=extract<double>(l2);
179 } else
180 throw RipleyException("Argument l2 must be a float or 2-tuple");
181 boost::python::list pypoints=extract<boost::python::list>(objpoints);
182 boost::python::list pytags=extract<boost::python::list>(objtags);
183 int numpts=extract<int>(pypoints.attr("__len__")());
184 int numtags=extract<int>(pytags.attr("__len__")());
185 std::vector<double> points;
186 std::vector<int> tags;
187 tags.resize(numtags, -1);
188 for (int i=0;i<numpts;++i) {
189 tuple temp = extract<tuple>(pypoints[i]);
190 int l=extract<int>(temp.attr("__len__")());
191 if (l != 3)
192 throw RipleyException("Number of coordinates for each dirac point must match dimensions.");
193 for (int k=0;k<l;++k) {
194 points.push_back(extract<double>(temp[k]));
195 }
196 }
197 std::map<std::string, int> tagstonames;
198 int curmax=40;
199 // but which order to assign tags to names?????
200 for (int i=0;i<numtags;++i) {
201 extract<int> ex_int(pytags[i]);
202 extract<std::string> ex_str(pytags[i]);
203 if (ex_int.check()) {
204 tags[i]=ex_int();
205 if (tags[i]>= curmax) {
206 curmax=tags[i]+1;
207 }
208 } else if (ex_str.check()) {
209 std::string s=ex_str();
210 std::map<std::string, int>::iterator it=tagstonames.find(s);
211 if (it!=tagstonames.end()) {
212 // we have the tag already so look it up
213 tags[i]=it->second;
214 } else {
215 tagstonames[s]=curmax;
216 tags[i]=curmax;
217 curmax++;
218 }
219 } else {
220 throw RipleyException("Error - Unable to extract tag value.");
221 }
222 }
223 if (numtags != numpts)
224 throw RipleyException("Number of tags does not match number of points.");
225 return escript::Domain_ptr(new Brick(n0,n1,n2, x0,y0,z0, x1,y1,z1, d0,d1,d2,
226 points, tags, tagstonames, world));
227 }
228
229 //const int _q[]={0x61686969,0x746c4144,0x79616e43};
230 const int _q[]={0x62207363, 0x6574735F, 0x2020214e};
231 escript::Domain_ptr _rectangle(double _n0, double _n1, const object& l0,
232 const object& l1, int d0, int d1,
233 const object& objpoints, const object& objtags,
234 escript::SubWorld_ptr world
235 )
236 {
237 int n0=static_cast<int>(_n0), n1=static_cast<int>(_n1);
238 double x0=0., x1=1., y0=0., y1=1.;
239 if (extract<tuple>(l0).check()) {
240 tuple x=extract<tuple>(l0);
241 if (len(x)==2) {
242 x0=extract<double>(x[0]);
243 x1=extract<double>(x[1]);
244 } else
245 throw RipleyException("Argument l0 must be a float or 2-tuple");
246 } else if (extract<double>(l0).check()) {
247 x1=extract<double>(l0);
248 } else
249 throw RipleyException("Argument l0 must be a float or 2-tuple");
250
251 if (extract<tuple>(l1).check()) {
252 tuple y=extract<tuple>(l1);
253 if (len(y)==2) {
254 y0=extract<double>(y[0]);
255 y1=extract<double>(y[1]);
256 } else
257 throw RipleyException("Argument l1 must be a float or 2-tuple");
258 } else if (extract<double>(l1).check()) {
259 y1=extract<double>(l1);
260 } else
261 throw RipleyException("Argument l1 must be a float or 2-tuple");
262 boost::python::list pypoints=extract<boost::python::list>(objpoints);
263 boost::python::list pytags=extract<boost::python::list>(objtags);
264 int numpts=extract<int>(pypoints.attr("__len__")());
265 int numtags=extract<int>(pytags.attr("__len__")());
266 std::vector<double> points;
267 std::vector<int> tags;
268 tags.resize(numtags, -1);
269 for (int i=0;i<numpts;++i) {
270 tuple temp = extract<tuple>(pypoints[i]);
271 int l=extract<int>(temp.attr("__len__")());
272 if (l != 2)
273 throw RipleyException("Number of coordinates for each dirac point must match dimensions.");
274 for (int k=0;k<l;++k) {
275 points.push_back(extract<double>(temp[k]));
276 }
277 }
278 std::map<std::string, int> tagstonames;
279 int curmax=40;
280 // but which order to assign tags to names?????
281 for (int i=0;i<numtags;++i) {
282 extract<int> ex_int(pytags[i]);
283 extract<std::string> ex_str(pytags[i]);
284 if (ex_int.check()) {
285 tags[i]=ex_int();
286 if (tags[i]>= curmax) {
287 curmax=tags[i]+1;
288 }
289 } else if (ex_str.check()) {
290 std::string s=ex_str();
291 std::map<std::string, int>::iterator it=tagstonames.find(s);
292 if (it!=tagstonames.end()) {
293 // we have the tag already so look it up
294 tags[i]=it->second;
295 } else {
296 tagstonames[s]=curmax;
297 tags[i]=curmax;
298 curmax++;
299 }
300 } else {
301 throw RipleyException("Error - Unable to extract tag value.");
302 }
303 }
304 if (numtags != numpts)
305 throw RipleyException("Number of tags does not match number of points.");
306 return escript::Domain_ptr(new Rectangle(n0,n1, x0,y0, x1,y1, d0,d1,
307 points, tags, tagstonames, world));
308 }
309 std::string _who(){int a[]={_q[0]^42,_q[1]^42,_q[2]^42,0};return (char*)&a[0];}
310
311 } // end of namespace ripley
312
313
314 BOOST_PYTHON_MODULE(ripleycpp)
315 {
316 // This feature was added in boost v1.34
317 #if ((BOOST_VERSION/100)%1000 > 34) || (BOOST_VERSION/100000 >1)
318 // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
319 docstring_options docopt(true, true, false);
320 #endif
321
322 register_exception_translator<ripley::RipleyException>(&(esysUtils::RuntimeErrorTranslator));
323
324 scope().attr("__doc__") = "To use this module, please import esys.ripley";
325 scope().attr("BYTEORDER_NATIVE") = (int)ripley::BYTEORDER_NATIVE;
326 scope().attr("BYTEORDER_LITTLE_ENDIAN") = (int)ripley::BYTEORDER_LITTLE_ENDIAN;
327 scope().attr("BYTEORDER_BIG_ENDIAN") = (int)ripley::BYTEORDER_BIG_ENDIAN;
328 scope().attr("DATATYPE_INT32") = (int)ripley::DATATYPE_INT32;
329 scope().attr("DATATYPE_FLOAT32") = (int)ripley::DATATYPE_FLOAT32;
330 scope().attr("DATATYPE_FLOAT64") = (int)ripley::DATATYPE_FLOAT64;
331
332 def("Brick", ripley::_brick, (arg("n0"),arg("n1"),arg("n2"),arg("l0")=1.0,arg("l1")=1.0,arg("l2")=1.0,
333 arg("d0")=-1,arg("d1")=-1,arg("d2")=-1,arg("diracPoints")=list(),arg("diracTags")=list(), arg("escriptworld")=escript::SubWorld_ptr()),
334 "Creates a hexagonal mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].\n\n"
335 ":param n0: number of elements in direction 0\n:type n0: ``int``\n"
336 ":param n1: number of elements in direction 1\n:type n1: ``int``\n"
337 ":param n2: number of elements in direction 2\n:type n2: ``int``\n"
338 ":param l0: length of side 0 or coordinate range of side 0\n:type l0: ``float`` or ``tuple``\n"
339 ":param l1: length of side 1 or coordinate range of side 1\n:type l1: ``float`` or ``tuple``\n"
340 ":param l2: length of side 2 or coordinate range of side 2\n:type l2: ``float`` or ``tuple``\n"
341 ":param d0: number of subdivisions in direction 0\n:type d0: ``int``\n"
342 ":param d1: number of subdivisions in direction 1\n:type d1: ``int``\n"
343 ":param d2: number of subdivisions in direction 2\n:type d2: ``int``");
344
345 def("Rectangle", ripley::_rectangle, (arg("n0"),arg("n1"),arg("l0")=1.0,arg("l1")=1.0,arg("d0")=-1,arg("d1")=-1,arg("diracPoints")=list(),arg("diracTags")=list(), arg("escriptworld")=escript::SubWorld_ptr()),
346 "Creates a rectangular mesh with n0 x n1 elements over the rectangle [0,l0] x [0,l1].\n\n"
347 ":param n0: number of elements in direction 0\n:type n0: ``int``\n"
348 ":param n1: number of elements in direction 1\n:type n1: ``int``\n"
349 ":param l0: length of side 0 or coordinate range of side 0\n:type l0: ``float`` or ``tuple``\n"
350 ":param l1: length of side 1 or coordinate range of side 1\n:type l1: ``float`` or ``tuple``\n"
351 ":param d0: number of subdivisions in direction 0\n:type d0: ``int``\n"
352 ":param d1: number of subdivisions in direction 1\n:type d1: ``int``");
353 def("_theculprit_", ripley::_who);
354
355 def("readBinaryGrid", &ripley::readBinaryGrid, (arg("filename"),
356 arg("functionspace"), arg("shape"), arg("fill")=0.,
357 arg("byteOrder"), arg("dataType"), arg("first"),
358 arg("numValues"), arg("multiplier"), arg("reverse")),
359 "Reads a binary Grid");
360 #ifdef USE_BOOSTIO
361 def("_readBinaryGridFromZipped", &ripley::readBinaryGridFromZipped, (arg("filename"),
362 arg("functionspace"), arg("shape"), arg("fill")=0.,
363 arg("byteOrder"), arg("dataType"), arg("first"),
364 arg("numValues"), arg("multiplier"), arg("reverse")),
365 "Reads a binary Grid");
366 #endif
367 def("_readNcGrid", &ripley::readNcGrid, (arg("filename"), arg("varname"),
368 arg("functionspace"), arg("shape"), arg("fill"), arg("first"),
369 arg("numValues"), arg("multiplier"), arg("reverse")),
370 "Reads a grid from a netCDF file");
371
372 class_<ripley::RipleyDomain, bases<escript::AbstractContinuousDomain>, boost::noncopyable >
373 ("RipleyDomain", "", no_init)
374 .def("print_mesh_info", &ripley::RipleyDomain::Print_Mesh_Info, (arg("full")=false),
375 "Prints out a summary about the mesh.\n"
376 ":param full: whether to output additional data\n:type full: ``bool``")
377 .def("writeBinaryGrid", &ripley::RipleyDomain::writeBinaryGrid)
378
379 .def("dump", &ripley::RipleyDomain::dump, args("filename"),
380 "Dumps the mesh to a file with the given name.")
381 .def("getGridParameters", &ripley::RipleyDomain::getGridParameters,
382 "Returns the tuple (origin, spacing, elements) where the entries are tuples:\n"
383 "``origin``=the coordinates of the domain's global origin,\n"
384 "``spacing``=the element size (=node spacing) of the domain,\n"
385 "``elements``=the global number of elements in all dimensions\n\n"
386 ":rtype: ``tuple``")
387 .def("getDescription", &ripley::RipleyDomain::getDescription,
388 ":return: a description for this domain\n:rtype: ``string``")
389 .def("getDim", &ripley::RipleyDomain::getDim, ":rtype: ``int``")
390 .def("getDataShape", &ripley::RipleyDomain::getDataShape, args("functionSpaceCode"),
391 ":return: a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples\n:rtype: ``tuple``")
392 .def("getNumDataPointsGlobal", &ripley::RipleyDomain::getNumDataPointsGlobal,
393 ":return: the number of data points summed across all MPI processes\n"
394 ":rtype: ``int``")
395 .def("addToSystem",&ripley::RipleyDomain::addToSystemFromPython,
396 args("mat", "rhs", "data"),
397 "adds a PDE to the system, results depend on domain\n\n"
398 ":param mat:\n:type mat: `OperatorAdapter`\n"
399 ":param rhs:\n:type rhs: `Data`\n"
400 ":param data:\ntype data: `list`")
401 .def("addToRHS",&ripley::RipleyDomain::addToRHSFromPython,
402 args("rhs", "data"),
403 "adds a PDE onto the stiffness matrix mat and a rhs, "
404 "results depends on domain\n\n"
405 ":param rhs:\n:type rhs: `Data`\n"
406 ":param data:\ntype data: `list`")
407 .def("createAssembler", &ripley::RipleyDomain::createAssemblerFromPython,
408 args("typename", "options"),
409 "request from the domain an assembler of the specified type, if "
410 "supported, using the supplied options (if provided)"
411 ":param typename:\n:type typename: `string`\n"
412 ":param options:\n:type options: `list`\n")
413 .def("addPDEToTransportProblem",&ripley::RipleyDomain::addPDEToTransportProblemFromPython,
414 args("tp", "source", "data"),
415 ":param tp:\n:type tp: `TransportProblemAdapter`\n"
416 ":param source:\n:type source: `Data`\n"
417 ":param data:\ntype data: `list`")
418 .def("newOperator",&ripley::RipleyDomain::newSystemMatrix,
419 args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
420 "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"
421 ":param row_blocksize:\n:type row_blocksize: ``int``\n"
422 ":param row_functionspace:\n:type row_functionspace: `FunctionSpace`\n"
423 ":param column_blocksize:\n:type column_blocksize: ``int``\n"
424 ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
425 ":param type:\n:type type: ``int``"
426 )
427 .def("newTransportProblem",&ripley::RipleyDomain::newTransportProblem,
428 args("theta", "blocksize", "functionspace", "type"),
429 "creates a TransportProblemAdapter\n\n"
430 ":param theta:\n:type theta: ``float``\n"
431 ":param blocksize:\n:type blocksize: ``int``\n"
432 ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
433 ":param type:\n:type type: ``int``"
434 )
435 .def("getSystemMatrixTypeId",&ripley::RipleyDomain::getSystemMatrixTypeId,
436 args("solver", "preconditioner", "package", "symmetry"),
437 ":return: the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, preconditioner, and symmetric matrix is used.\n"
438 ":rtype: ``int``\n"
439 ":param solver:\n:type solver: ``int``\n"
440 ":param preconditioner:\n:type preconditioner: ``int``\n"
441 ":param package:\n:type package: ``int``\n"
442 ":param symmetry:\n:type symmetry: ``int``"
443 )
444 .def("getTransportTypeId",&ripley::RipleyDomain::getTransportTypeId,
445 args("solver", "preconditioner", "package", "symmetry"),
446 ":return: the identifier of the transport problem type to be used when a particular solver, preconditioner, package and symmetric matrix is used.\n"
447 ":rtype: ``int``\n"
448 ":param solver:\n:type solver: ``int``\n"
449 ":param preconditioner:\n:type preconditioner: ``int``\n"
450 ":param package:\n:type package: ``int``\n"
451 ":param symmetry:\n:type symmetry: ``int``"
452 )
453 .def("getX",&ripley::RipleyDomain::getX, ":return: locations in the FEM nodes\n\n"
454 ":rtype: `Data`")
455 .def("getNormal",&ripley::RipleyDomain::getNormal,
456 ":return: boundary normals at the quadrature point on the face elements\n"
457 ":rtype: `Data`")
458 .def("getSize",&ripley::RipleyDomain::getSize,":return: the element size\n"
459 ":rtype: `Data`")
460 .def("setTagMap",&ripley::RipleyDomain::setTagMap,args("name","tag"),
461 "Give a tag number a name.\n\n:param name: Name for the tag\n:type name: ``string``\n"
462 ":param tag: numeric id\n:type tag: ``int``\n:note: Tag names must be unique within a domain")
463 .def("getTag",&ripley::RipleyDomain::getTag,args("name"),":return: tag id for "
464 "``name``\n:rtype: ``string``")
465 .def("isValidTagName",&ripley::RipleyDomain::isValidTagName,args("name"),
466 ":return: True if ``name`` corresponds to a tag, otherwise False\n:rtype: ``bool``")
467 .def("showTagNames",&ripley::RipleyDomain::showTagNames,":return: A space separated list of tag names\n:rtype: ``string``")
468 .def("getMPISize",&ripley::RipleyDomain::getMPISize,":return: the number of processes used for this `Domain`\n:rtype: ``int``")
469 .def("getMPIRank",&ripley::RipleyDomain::getMPIRank,":return: the rank of this process\n:rtype: ``int``")
470 .def("MPIBarrier",&ripley::RipleyDomain::MPIBarrier,"Wait until all processes have reached this point")
471 .def("onMasterProcessor",&ripley::RipleyDomain::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");
472 /* These two class exports are necessary to ensure that the extra methods added by ripley make it to python.
473 * This change became necessary when the Brick and Rectangle constructors turned into factories instead of classes */
474 class_<ripley::Brick, bases<ripley::RipleyDomain> >("RipleyBrick", "", no_init);
475 class_<ripley::Rectangle, bases<ripley::RipleyDomain> >("RipleyRectangle", "", no_init);
476 class_<ripley::AbstractAssembler, ripley::Assembler_ptr, boost::noncopyable >
477 ("AbstractAssembler", "", no_init);
478 }
479

  ViewVC Help
Powered by ViewVC 1.1.26