Dear all,


I tried to build a mixed space with periodic bc on two of the subspaces:

 

meshbase = RectangleMesh(Nx, Ny, Lx, Ly, quadrilateral=True)

mesh = ExtrudedMesh(meshbase, Nz, Delta_z)

horiz_elt = FiniteElement("DG", quadrilateral, 0)

DG1 = FunctionSpace(mesh, horiz_elt)

 

meshbase = PeriodicRectangleMesh(Nx, Ny, Lx, Ly, quadrilateral=True)

mesh = ExtrudedMesh(meshbase, Nz, Delta_z)

horiz_elt = FiniteElement("DG", quadrilateral, 0)

DG2 = FunctionSpace(mesh, horiz_elt)

DG3 = FunctionSpace(mesh, horiz_elt)

 

W = DG1 * DG2 * DG3

 

but got an error message (see below).

 

Is there a way to set periodic bc on two of the three subspaces?

Henrik

 

 

Traceback (most recent call last):                                            

  File "twophase.py", line 43, in <module>                                    

    W = DG1 * DG2 * DG3                                                       

  File "/home/hb111949/Code/firedrake/firedrake/functionspace.py", line 536, in __mul__

    return MixedFunctionSpace((self, other))

  File "/home/hb111949/.local/lib/python2.7/site-packages/PyOP2-0.11.0_425_g64db689-py2.7-linux-x86_64.egg/pyop2/caching.py", line 161, in __new__

    obj = make_obj()

  File "/home/hb111949/.local/lib/python2.7/site-packages/PyOP2-0.11.0_425_g64db689-py2.7-linux-x86_64.egg/pyop2/caching.py", line 142, in make_obj

    obj.__init__(*args, **kwargs)

  File "/home/hb111949/Code/firedrake/firedrake/functionspace.py", line 742, in __init__

    self._ufl_element = ufl.MixedElement(*[fs.ufl_element() for fs in self._spaces])

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/finiteelement/mixedelement.py", line 57, in __init__

    domains = tuple(sorted(set(chain(*[element.domains() for element in elements]))))

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/domain.py", line 216, in __lt__

    return self.hash_data() < other.hash_data()

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/exproperators.py", line 55, in _lt

    return LT(left, right)

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/conditional.py", line 144, in __init__

    BinaryCondition.__init__(self, "<", left, right)

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/conditional.py", line 72, in __init__

    "Expecting scalar arguments.")

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/assertions.py", line 37, in ufl_assert

    if not condition: error(*message)

  File "/home/hb111949/.local/lib/python2.7/site-packages/ufl/log.py", line 151, in error

    raise self._exception_type(self._format_raw(*message))

ufl.log.UFLException: Expecting scalar arguments.

 

 

 

 

--

Dipl.-Math. Henrik Büsing

Institute for Applied Geophysics and Geothermal Energy

E.ON Energy Research Center

RWTH Aachen University

------------------------------------------------------

Mathieustr. 10            |    Tel +49 (0)241 80 49907

52074 Aachen, Germany     |    Fax +49 (0)241 80 49889

------------------------------------------------------

http://www.eonerc.rwth-aachen.de/GGE

hbuesing@eonerc.rwth-aachen.de

------------------------------------------------------