Commit graph

44 commits

Author SHA1 Message Date
Paul Romano
d3d6dc87dc Remove a few more __future__ imports. Use collections.abc 2018-02-05 23:14:30 -05:00
Paul Romano
c428cee667 Remove __future__ and six imports 2018-02-05 23:14:30 -05:00
Paul Romano
d26165f524 Add tests for regions 2018-02-05 07:35:18 -06:00
Paul Romano
c3c9df6a85 Make Intersection and Union obey the mutable sequence protocol 2017-06-07 20:12:51 -05:00
Will Boyd
400b5e2c1d Added __hash__ method to Surface class; revised clone methods memo param to use objects as keys 2017-04-10 17:17:17 -04:00
Will Boyd
120dca7703 Renamed clone memoize param as memo per request by @paulromano 2017-04-10 12:10:34 -04:00
Will Boyd
12a0e00305 Expanded docstrings for all clone methods 2017-04-10 10:13:59 -04:00
Will Boyd
364543b967 Now use memoization for geometry and materials cloning 2017-04-10 10:06:32 -04:00
Will Boyd
45af8a2937 Tested geometry cloning with examples and fixed a few bugs 2017-04-09 22:23:49 -04:00
Will Boyd
06a918c1b5 First stab at implementing clone() methods for geometric and material primitives 2017-04-09 16:30:33 -04:00
tjlaboss
781d0aa976 Renamed back to 2017-03-30 14:10:15 -04:00
tjlaboss
95d644f711 Merge branch 'get_surfs' of github.com:tjlaboss/openmc into get_surfs 2017-03-30 14:09:12 -04:00
tjlaboss
e4984311c3 Renamed update_surfaces back to get_surfaces 2017-03-30 14:08:38 -04:00
tjlaboss
5cc6e6a684 Changed if statement for surfaces
Corrected `if not surfaces` to `if surfaces is None`
2017-03-30 14:06:17 -04:00
tjlaboss
a01b87d628 Reverted rename of get_surfaces() 2017-03-30 14:03:17 -04:00
tjlaboss
fc23007dae Changed get_surfaces() to update_surface()
As per @paulromano's suggestion, renamed the method of
the `Region` class that updates the surface dictionary.
2017-03-30 13:37:12 -04:00
tjlaboss
30548c7c80 Addressed comments by @wbinventor 2017-03-30 13:34:51 -04:00
tjlaboss
2525c2a3f8 Accounted for surfaces from a Complement(). 2017-03-29 20:05:26 -04:00
tjlaboss
a002e58ee8 Addressed changes suggested by @paulromano 2017-03-29 20:01:18 -04:00
Paul Romano
61f0138555 Add Plot.from_geometry() classmethod 2017-03-08 14:24:41 -06:00
Paul Romano
9a3f3d1560 Use clever tricks to simplify Boolean geometry expressions 2016-12-14 06:57:51 -06:00
Paul Romano
de009f4c34 Use six.add_metaclass to be compatible with Python 2 and 3 2016-10-06 21:55:12 -05:00
Paul Romano
c7a0b716d2 General cleanup -- both bugs and style issues -- based on running pylint 2016-07-02 11:04:25 +07:00
Paul Romano
e8d4dbd5f4 Add Intersection.__iter__ and Union.__iter__ methods 2016-05-27 09:53:07 -05:00
Paul Romano
07be6306ce Add Surface.evaluate() methods and Region.__contains__ methods 2016-05-27 09:53:07 -05:00
Paul Romano
14dc134869 Complete overhaul of Python API documentation 2016-04-14 07:22:31 -05:00
Paul Romano
5f08f92282 Fix bug in Complement.bounding_box. Also remove a few unused variables 2015-12-14 07:36:22 -06:00
Paul Romano
7afebb029b Address @wbinventor comments on #516 2015-12-03 07:31:02 -06:00
Paul Romano
8506f32c4f Ability to determine bounding boxes for Regions 2015-12-02 08:48:58 -06:00
wbinventor@gmail.com
fca533e3d1 Added __eq__ and __ne__ method to Cell, Universe, Lattice and Material classes in Python API 2015-11-25 12:45:57 -05:00
Paul Romano
70b4bf3118 Allow + in region specification 2015-10-30 07:12:54 -05:00
Will Boyd
54f40eed32 Moved Python builtin routines to beginning of each Python API class 2015-10-08 14:23:19 -04:00
Paul Romano
4c2e0f5f82 Add examples in docstrings for Halfspace, Intersection, Union, and Complement 2015-10-04 21:47:52 +07:00
Paul Romano
b9024f2d8e Update example inputs and Jupyter notebooks 2015-10-03 09:55:58 +07:00
Paul Romano
71dfde8d12 Adopt shorthand notation for half-spaces and regions in Python API
Surfaces now have __neg__ and __pos__ operators, and regions have __and__,
__or__, and __invert__. This makes the syntax for complex regions much less
bulky.
2015-10-03 09:26:50 +07:00
Paul Romano
52fe3f5b76 Respond to @smharper comments on #463 2015-10-02 14:00:12 +07:00
Paul Romano
8414295b46 Expand check on combining parentheses 2015-10-02 11:33:57 +07:00
Paul Romano
e70a5af63e Make Region.from_expression a @staticmethod rather than @classmethod 2015-09-29 15:39:54 +07:00
Paul Romano
975771fbfe Combine multiple intersections/unions when parsing region expressions 2015-09-28 14:48:29 +07:00
Paul Romano
c237f700ad Fix bug in tokenize algorithm
The algorithm was failing to add intersections after right parentheses when appropriate.
2015-09-28 14:02:20 +07:00
Paul Romano
697e3c557b Join intersection/union of multiple half-spaces when possible. 2015-09-27 16:08:02 +07:00
Paul Romano
dc118afd2d Add Region.from_expression method 2015-09-26 20:01:07 +07:00
Paul Romano
7681995ef1 Add region attribute to Cell and use it in lieu of surfaces 2015-09-26 19:58:16 +07:00
Paul Romano
1cfff776a5 Started adding changes in Python API for complex cells. 2015-09-26 19:58:16 +07:00