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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26