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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4657 - (show annotations)
Thu Feb 6 06:12:20 2014 UTC (5 years, 3 months ago) by jfenwick
File MIME type: text/x-python
File size: 2572 byte(s)
I changed some files.
Updated copyright notices, added GeoComp.



1
2 ##############################################################################
3 #
4 # Copyright (c) 2011-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 __copyright__="""Copyright (c) 2011-2014 by University of Queensland
18 http://www.uq.edu.au
19 Primary Business: Queensland, Australia"""
20 __license__="""Licensed under the Open Software License version 3.0
21 http://www.opensource.org/licenses/osl-3.0.php"""
22 __url__="https://launchpad.net/escript-finley"
23
24
25 from .finleycpp import __Brick_driver, __Rectangle_driver
26
27
28 def Rectangle(n0=1, n1=1, order=1, l0=1.0, l1=1.0, periodic0=False, periodic1=False, integrationOrder=-1,
29 reducedIntegrationOrder=-1, useElementsOnFace=None, useFullElementOrder=0, optimize=0, **kwargs):
30 points=[]
31 tags=[]
32 if 'diracPoints' in kwargs:
33 points=kwargs['diracPoints']
34 if 'diracTags' in kwargs:
35 tags=kwargs['diracTags']
36 faceon=useElementsOnFace
37 if useElementsOnFace is None: #We want to use 1 as the default, but only where it makes sense
38 if useFullElementOrder or order==-1:
39 faceon=0 #Don't use it
40 else:
41 faceon=1
42 return __Rectangle_driver([n0, n1, order, l0, l1, periodic0, periodic1, integrationOrder,
43 reducedIntegrationOrder, faceon, useFullElementOrder, optimize, points, tags])
44
45 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,
46 integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=1, useFullElementOrder=0,
47 optimize=0, **kwargs):
48 points=[]
49 tags=[]
50 if 'diracPoints' in kwargs:
51 points=kwargs['diracPoints']
52 if 'diracTags' in kwargs:
53 tags=kwargs['diracTags']
54 faceon=useElementsOnFace
55 if useElementsOnFace is None: #We want to use 1 as the default, but only where it makes sense
56 if useFullElementOrder or order==-1:
57 faceon=0 #Don't use it
58 else:
59 faceon=1
60 return __Brick_driver([n0, n1, n2, order, l0, l1, l2, periodic0, periodic1, periodic2,
61 integrationOrder, reducedIntegrationOrder, faceon, useFullElementOrder,
62 optimize, points, tags])

  ViewVC Help
Powered by ViewVC 1.1.26