/[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 1312 - (hide annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years, 2 months ago) by ksteube
File MIME type: text/x-python
File size: 2475 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

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

  ViewVC Help
Powered by ViewVC 1.1.26