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

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

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

revision 3901 by jfenwick, Wed May 23 08:09:45 2012 UTC revision 3907 by jfenwick, Fri Jun 8 01:20:09 2012 UTC
# Line 24  from .finleycpp import __Brick_driver, _ Line 24  from .finleycpp import __Brick_driver, _
24    
25    
26  def Rectangle(n0=1, n1=1, order=1, l0=1.0, l1=1.0, periodic0=False, periodic1=False, integrationOrder=-1,  def Rectangle(n0=1, n1=1, order=1, l0=1.0, l1=1.0, periodic0=False, periodic1=False, integrationOrder=-1,
27        reducedIntegrationOrder=-1, useElementsOnFace=1, useFullElementOrder=0, optimize=0, **kwargs):        reducedIntegrationOrder=-1, useElementsOnFace=None, useFullElementOrder=0, optimize=0, **kwargs):
28      points=[]      points=[]
29      tags=[]      tags=[]
30      if 'diracPoints' in kwargs:      if 'diracPoints' in kwargs:
31          points=kwargs['diracPoints']          points=kwargs['diracPoints']
32      if 'diracTags' in kwargs:      if 'diracTags' in kwargs:
33          tags=kwargs['diracTags']          tags=kwargs['diracTags']
34        faceon=useElementsOnFace
35        if useElementsOnFace is None:   #We want to use 1 as the default, but only where it makes sense
36            if useFullElementOrder or order==-1:
37            faceon=0    #Don't use it
38        else:
39            faceon=1
40      return __Rectangle_driver([n0, n1, order, l0, l1, periodic0, periodic1, integrationOrder,      return __Rectangle_driver([n0, n1, order, l0, l1, periodic0, periodic1, integrationOrder,
41        reducedIntegrationOrder, useElementsOnFace, useFullElementOrder, optimize, points, tags])        reducedIntegrationOrder, faceon, useFullElementOrder, optimize, points, tags])
42    
43  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,  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,
44      integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=1, useFullElementOrder=0,      integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=1, useFullElementOrder=0,
# Line 43  def Brick(n0=1, n1=1, n2=1, order=1, l0= Line 49  def Brick(n0=1, n1=1, n2=1, order=1, l0=
49          points=kwargs['diracPoints']          points=kwargs['diracPoints']
50      if 'diracTags' in kwargs:      if 'diracTags' in kwargs:
51          tags=kwargs['diracTags']          tags=kwargs['diracTags']
52        faceon=useElementsOnFace
53        if useElementsOnFace is None:   #We want to use 1 as the default, but only where it makes sense
54            if useFullElementOrder or order==-1:
55            faceon=0    #Don't use it
56        else:
57            faceon=1        
58      return __Brick_driver([n0, n1, n2, order, l0, l1, l2, periodic0,  periodic1, periodic2,      return __Brick_driver([n0, n1, n2, order, l0, l1, l2, periodic0,  periodic1, periodic2,
59      integrationOrder, reducedIntegrationOrder, useElementsOnFace, useFullElementOrder,      integrationOrder, reducedIntegrationOrder, faceon, useFullElementOrder,
60      optimize, points, tags])      optimize, points, tags])

Legend:
Removed from v.3901  
changed lines
  Added in v.3907

  ViewVC Help
Powered by ViewVC 1.1.26