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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5539 - (hide annotations)
Tue Mar 17 05:56:07 2015 UTC (4 years, 1 month ago) by jfenwick
File MIME type: text/x-python
File size: 4047 byte(s)
Made the docstrings for finley and dudley wrappers echo the docstrings from the c++drivers. Removed some old commented out boost.
1 jfenwick 3558
2 jfenwick 3981 ##############################################################################
3 jfenwick 3558 #
4 jfenwick 5448 # Copyright (c) 2011-2015 by University of Queensland
5 jfenwick 3981 # http://www.uq.edu.au
6 jfenwick 3558 #
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 jfenwick 3981 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 # Development 2012-2013 by School of Earth Sciences
13     # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3981 #
15     ##############################################################################
16 jfenwick 3558
17 jfenwick 5448 __copyright__="""Copyright (c) 2011-2015 by University of Queensland
18 jfenwick 3981 http://www.uq.edu.au
19 jfenwick 3558 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 jfenwick 4945 from .finleycpp import __Brick_driver, __Rectangle_driver, __ReadMesh_driver, __ReadGmsh_driver
26 jfenwick 3558
27    
28 jfenwick 4945 def ReadMesh(filename, integrationOrder=-1, reducedIntegrationOrder=-1, optimize=True, **kwargs):
29     points=[]
30     tags=[]
31     if 'diracPoints' in kwargs:
32     points=kwargs['diracPoints']
33     if 'diracTags' in kwargs:
34     tags=kwargs['diracTags']
35     args=[filename, integrationOrder, reducedIntegrationOrder, optimize, points, tags];
36     if 'escriptworld' in kwargs:
37     args+=[kwargs['escriptworld']]
38     else:
39     args+=[None]
40     return __ReadMesh_driver(args)
41    
42 jfenwick 5539 ReadMesh.__doc__=__ReadMesh_driver.__doc__
43 jfenwick 4945
44     def ReadGmsh(fileName, numDim, integrationOrder=-1, reducedIntegrationOrder=-1, optimize=True,
45     useMacroElements=False, **kwargs):
46     points=[]
47     tags=[]
48     if 'diracPoints' in kwargs:
49     points=kwargs['diracPoints']
50     if 'diracTags' in kwargs:
51     tags=kwargs['diracTags']
52     args=[fileName, numDim, integrationOrder, reducedIntegrationOrder, optimize,
53     useMacroElements, points, tags];
54     if 'escriptworld' in kwargs:
55     args+=[kwargs['escriptworld']]
56     else:
57     args+=[None]
58     return __ReadGmsh_driver(args)
59    
60 jfenwick 5539 ReadGmsh.__doc__=__ReadGmsh_driver.__doc__
61 jfenwick 4945
62 jfenwick 5539
63 jfenwick 3558 def Rectangle(n0=1, n1=1, order=1, l0=1.0, l1=1.0, periodic0=False, periodic1=False, integrationOrder=-1,
64 jfenwick 3907 reducedIntegrationOrder=-1, useElementsOnFace=None, useFullElementOrder=0, optimize=0, **kwargs):
65 jfenwick 3558 points=[]
66     tags=[]
67     if 'diracPoints' in kwargs:
68 jfenwick 3892 points=kwargs['diracPoints']
69 jfenwick 3558 if 'diracTags' in kwargs:
70 jfenwick 3892 tags=kwargs['diracTags']
71 jfenwick 3907 faceon=useElementsOnFace
72     if useElementsOnFace is None: #We want to use 1 as the default, but only where it makes sense
73     if useFullElementOrder or order==-1:
74 jfenwick 4018 faceon=0 #Don't use it
75     else:
76     faceon=1
77 jfenwick 4934 args=[n0, n1, order, l0, l1, periodic0, periodic1, integrationOrder,
78     reducedIntegrationOrder, faceon, useFullElementOrder, optimize, points, tags];
79     if 'escriptworld' in kwargs:
80     args+=[kwargs['escriptworld']]
81     else:
82     args+=[None]
83     return __Rectangle_driver(args)
84 jfenwick 3558
85 jfenwick 5539 Rectangle.__doc__=__Rectangle_driver.__doc__
86    
87 jfenwick 3558 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,
88 jfenwick 3901 integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=1, useFullElementOrder=0,
89 jfenwick 3558 optimize=0, **kwargs):
90     points=[]
91     tags=[]
92     if 'diracPoints' in kwargs:
93 jfenwick 3892 points=kwargs['diracPoints']
94 jfenwick 3558 if 'diracTags' in kwargs:
95 jfenwick 3892 tags=kwargs['diracTags']
96 jfenwick 3907 faceon=useElementsOnFace
97     if useElementsOnFace is None: #We want to use 1 as the default, but only where it makes sense
98     if useFullElementOrder or order==-1:
99 jfenwick 4018 faceon=0 #Don't use it
100     else:
101 jfenwick 4934 faceon=1
102     args=[n0, n1, n2, order, l0, l1, l2, periodic0, periodic1, periodic2,
103 jfenwick 3907 integrationOrder, reducedIntegrationOrder, faceon, useFullElementOrder,
104 jfenwick 4934 optimize, points, tags];
105     if 'escriptworld' in kwargs:
106     args+=[kwargs['escriptworld']]
107     else:
108     args+=[None]
109     return __Brick_driver(args)
110 jfenwick 5539
111     Brick.__doc__=__Brick_driver.__doc__

  ViewVC Help
Powered by ViewVC 1.1.26