/[escript]/branches/arrexp_2137_win/finley/py_src/readers.py
ViewVC logotype

Contents of /branches/arrexp_2137_win/finley/py_src/readers.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2202 - (show annotations)
Fri Jan 9 01:28:32 2009 UTC (11 years, 9 months ago) by jfenwick
File MIME type: text/x-python
File size: 2427 byte(s)
Branching the array experiments from version 2137.
The idea is to make the changes required for the c++ changes to compile 
on windows without bringing in the later python changes.


1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
8 # 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 #
12 ########################################################
13
14 __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 __url__="http://www.uq.edu.au/esscc/escript-finley"
21
22 """
23 some mesh handling
24
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 """
40 creates a Finley L{Domain} from a L{esys.pycad.design.Design} object. Currently only
41 gmsh is supported.
42
43 @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 default is used.
48 @type reducedIntegrationOrder: C{int}
49 @param optimizeLabeling: if set the labeling of the mesh nodes is optimized
50 @type optimizeLabeling: C{bool}
51 @return: the Finley domain defined by the designs
52 @rtype: L{Domain}
53 """
54 if isinstance(design, GMSHDesign):
55 mshname=design.getMeshHandler()
56 dom = ReadGmsh(mshname,
57 design.getDim(),
58 integrationOrder,
59 reducedIntegrationOrder,
60 optimizeLabeling)
61 else:
62 raise TypeError("Finley does not support %s designs."%design.__class__.__name__)
63 # fill in the tag map
64 design.getTagMap().passToDomain(dom)
65 return dom

  ViewVC Help
Powered by ViewVC 1.1.26