/[escript]/trunk/dudley/py_src/factorywrappers.py
ViewVC logotype

Contents of /trunk/dudley/py_src/factorywrappers.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5706 - (show annotations)
Mon Jun 29 03:41:36 2015 UTC (4 years, 2 months ago) by sshaw
File MIME type: text/x-python
File size: 2503 byte(s)
all python files now force use of python3 prints and division syntax to stop sneaky errors appearing in py3 environs
1
2 ##############################################################################
3 #
4 # Copyright (c) 2014-2015 by The 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 from __future__ import print_function, division
18
19 __copyright__="""Copyright (c) 2014-2015 by The University of Queensland
20 http://www.uq.edu.au
21 Primary Business: Queensland, Australia"""
22 __license__="""Licensed under the Open Software License version 3.0
23 http://www.opensource.org/licenses/osl-3.0.php"""
24 __url__="https://launchpad.net/escript-finley"
25
26 # This file copied and adapted from the equivalent factorywrappers.py in finley
27
28 from .dudleycpp import __Brick_driver, __Rectangle_driver
29
30 def Rectangle(n0=1, n1=1, order=1, l0=1.0, l1=1.0, periodic0=False, periodic1=False, integrationOrder=-1,
31 reducedIntegrationOrder=-1, useElementsOnFace=0, useFullElementOrder=0, optimize=0, **kwargs):
32 if 'diracPoints' in kwargs:
33 points=kwargs['diracPoints']
34 if 'diracTags' in kwargs:
35 tags=kwargs['diracTags']
36 faceon=useElementsOnFace
37 args=[n0, n1, order, l0, l1, periodic0, periodic1, integrationOrder,
38 reducedIntegrationOrder, faceon, useFullElementOrder, optimize];
39 if 'escriptworld' in kwargs:
40 args+=[kwargs['escriptworld']]
41 else:
42 args+=[None]
43 return __Rectangle_driver(args)
44
45 Rectangle.__doc__=__Rectangle_driver.__doc__
46
47 def Brick(n0=1, n1=1, n2=1, order=1, l0=1.0, l1=1.0, l2=1.0, periodic0=0, periodic1=0, periodic2=0,
48 integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=0, useFullElementOrder=0,
49 optimize=0, **kwargs):
50 if 'diracPoints' in kwargs:
51 points=kwargs['diracPoints']
52 if 'diracTags' in kwargs:
53 tags=kwargs['diracTags']
54 faceon=useElementsOnFace
55 args=[n0, n1, n2, order, l0, l1, l2, periodic0, periodic1, periodic2,
56 integrationOrder, reducedIntegrationOrder, faceon, useFullElementOrder,
57 optimize];
58 if 'escriptworld' in kwargs:
59 args+=[kwargs['escriptworld']]
60 else:
61 args+=[None]
62 return __Brick_driver(args)
63
64 Brick.__doc__=__Brick_driver.__doc__

  ViewVC Help
Powered by ViewVC 1.1.26