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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2344 - (hide annotations)
Mon Mar 30 02:13:58 2009 UTC (10 years, 8 months ago) by jfenwick
File MIME type: text/x-python
File size: 2351 byte(s)
Change __url__ to launchpad site

1 ksteube 1809
2     ########################################################
3 ksteube 1312 #
4 ksteube 1809 # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1312 #
8 ksteube 1809 # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11 ksteube 1312 #
12 ksteube 1809 ########################################################
13 ksteube 1312
14 ksteube 1809 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15     Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18     __license__="""Licensed under the Open Software License version 3.0
19     http://www.opensource.org/licenses/osl-3.0.php"""
20 jfenwick 2344 __url__="https://launchpad.net/escript-finley"
21 ksteube 1809
22 gross 934 """
23 caltinay 2180 some mesh handling
24 gross 934
25     @var __author__: name of author
26     @var __licence__: licence agreement
27     @var __url__: url entry point on documentation
28     @var __version__: version
29     @var __date__: date of the version
30     """
31    
32     __author__="Lutz Gross, l.gross@uq.edu.au"
33    
34     from esys.escript import *
35     from esys.pycad.gmsh import Design as GMSHDesign
36     from finleycpp import ReadGmsh
37    
38     def MakeDomain(design,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True):
39 caltinay 2180 """
40     Creates a Finley L{Domain} from a L{esys.pycad.design.Design} object.
41     Currently only gmsh is supported.
42 gross 934
43 caltinay 2180 @param design: the geometry
44     @type design: L{esys.pycad.design.Design}
45     @param integrationOrder: integration order. If -1 the default is used.
46     @type integrationOrder: C{int}
47     @param reducedIntegrationOrder: reduced integration order. If -1 the
48     default is used.
49     @type reducedIntegrationOrder: C{int}
50     @param optimizeLabeling: if set the labeling of the mesh nodes is optimized
51     @type optimizeLabeling: C{bool}
52     @return: the Finley domain defined by the design
53     @rtype: L{Domain}
54     """
55     if isinstance(design, GMSHDesign):
56     mshname=design.getMeshHandler()
57     dom = ReadGmsh(mshname,
58     design.getDim(),
59     integrationOrder,
60     reducedIntegrationOrder,
61     optimizeLabeling)
62     else:
63     raise TypeError("Finley does not support %s designs."%design.__class__.__name__)
64     # fill in the tag map
65     design.getTagMap().passToDomain(dom)
66     return dom
67    

  ViewVC Help
Powered by ViewVC 1.1.26