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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1809 by ksteube, Thu Sep 25 06:43:44 2008 UTC revision 2180 by caltinay, Thu Dec 18 00:30:25 2008 UTC
# Line 20  http://www.opensource.org/licenses/osl-3 Line 20  http://www.opensource.org/licenses/osl-3
20  __url__="http://www.uq.edu.au/esscc/escript-finley"  __url__="http://www.uq.edu.au/esscc/escript-finley"
21    
22  """  """
23  some mesh handling  some mesh handling
24    
25  @var __author__: name of author  @var __author__: name of author
26  @var __licence__: licence agreement  @var __licence__: licence agreement
# Line 36  from esys.pycad.gmsh import Design as GM Line 36  from esys.pycad.gmsh import Design as GM
36  from finleycpp import ReadGmsh  from finleycpp import ReadGmsh
37    
38  def MakeDomain(design,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True):  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      Creates a Finley L{Domain} from a L{esys.pycad.design.Design} object.
41          gmsh is supported.      Currently only gmsh is supported.
42    
43          @param design: the geometry      @param design: the geometry
44          @type design: L{esys.pycad.design.Design}      @type design: L{esys.pycad.design.Design}
45          @param integrationOrder: integration order. If -1 the default is used.      @param integrationOrder: integration order. If -1 the default is used.
46          @type integrationOrder: C{int}      @type integrationOrder: C{int}
47          @param reducedIntegrationOrder: reduced integration order. If -1 the default is used.      @param reducedIntegrationOrder: reduced integration order. If -1 the
48          @type reducedIntegrationOrder: C{int}                                      default is used.
49          @param optimizeLabeling: if set the labeling of the mesh nodes is optimized      @type reducedIntegrationOrder: C{int}
50          @type optimizeLabeling: C{bool}      @param optimizeLabeling: if set the labeling of the mesh nodes is optimized
51          @return: the Finley domain defined by the designs      @type optimizeLabeling: C{bool}
52          @rtype: L{Domain}      @return: the Finley domain defined by the design
53          """      @rtype: L{Domain}
54          if isinstance(design, GMSHDesign):      """
55              mshname=design.getMeshHandler()      if isinstance(design, GMSHDesign):
56              dom = ReadGmsh(mshname,          mshname=design.getMeshHandler()
57                             design.getDim(),          dom = ReadGmsh(mshname,
58                             integrationOrder,                         design.getDim(),
59                             reducedIntegrationOrder,                         integrationOrder,
60                             optimizeLabeling)                         reducedIntegrationOrder,
61          else:                         optimizeLabeling)
62              raise TypeError("Finley does not support %s designs."%design.__class__.__name__)      else:
63          # fill in the tag map          raise TypeError("Finley does not support %s designs."%design.__class__.__name__)
64          design.getTagMap().passToDomain(dom)      # fill in the tag map
65          return dom      design.getTagMap().passToDomain(dom)
66        return dom
67    

Legend:
Removed from v.1809  
changed lines
  Added in v.2180

  ViewVC Help
Powered by ViewVC 1.1.26