firedrake
  Threads by month 
                
            - ----- 2025 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
September 2016
- 13 participants
- 34 discussions
                    
                        Hi all,
I upgraded homebrew on my macbook and had to remove firedrake because the
compiled libraries were pointing to old/nonexistent brew packages. So when
I tried to install a fresh copy of firedrake, i get this message:
$ python firedrake-install --developer --disable_ssh --log
Installing command line tools...
Installing required packages via homebrew. You can safely ignore warnings
that packages are already installed
Creating firedrake virtualenv in 'firedrake'.
/Users/justin/Software/firedrake/bin/pip install -vvv -U pip
Traceback (most recent call last):
  File "firedrake-install", line 1016, in <module>
    framework = fix_osx_virtualenv_python()
  File "firedrake-install", line 973, in fix_osx_virtualenv_python
    shutil.copytree(appsrc, appdest)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 208, in copytree
    raise Error, errors
shutil.Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/
Resources/Python.app/Contents/Info.plist', '/Users/justin/Software/firedr
ake/Python.app/Contents/Info.plist', "[Errno 1] Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents/Info.plist'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/MacOS/Python', '/Users/justin/Software/firedr
ake/Python.app/Contents/MacOS/Python', "[Errno 1] Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents/MacOS/Python'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/MacOS', '/Users/justin/Software/firedr
ake/Python.app/Contents/MacOS', "[Errno 1] Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents/MacOS'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/PkgInfo', '/Users/justin/Software/firedr
ake/Python.app/Contents/PkgInfo', "[Errno 1] Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents/PkgInfo'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/Resources/PythonApplet.icns',
'/Users/justin/Software/firedrake/Python.app/Contents/Resources/PythonApplet.icns',
"[Errno 1] Operation not permitted: '/Users/justin/Software/firedr
ake/Python.app/Contents/Resources/PythonApplet.icns'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/Resources/PythonInterpreter.icns',
'/Users/justin/Software/firedrake/Python.app/Contents/Resources/PythonInterpreter.icns',
"[Errno 1] Operation not permitted: '/Users/justin/Software/firedr
ake/Python.app/Contents/Resources/PythonInterpreter.icns'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/Resources', '/Users/justin/Software/firedr
ake/Python.app/Contents/Resources', "[Errno 1] Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents/Resources'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/R
esources/Python.app/Contents/version.plist', '/Users/justin/Software/firedr
ake/Python.app/Contents/version.plist', "[Errno 1] Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents/version.plist'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents',
'/Users/justin/Software/firedrake/Python.app/Contents', "[Errno 1]
Operation not permitted:
'/Users/justin/Software/firedrake/Python.app/Contents'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app',
'/Users/justin/Software/firedrake/Python.app', "[Errno 1] Operation not
permitted: '/Users/justin/Software/firedrake/Python.app'")]
And when I run the script again, it installs correctly. I guess this meant
the virtualenv was "successfully" installed the first time.
However, I get this strange MPI warning/error that I have never before seen:
$ python -c "from firedrake import *"
[Justins-MacBook-Pro-2.local:88453] [[15547,0],0] bind() failed on error
Address already in use (48)
[Justins-MacBook-Pro-2.local:88453] [[15547,0],0] ORTE_ERROR_LOG: Error in
file oob_usock_component.c at line 228
My firedrake programs appear to run without any error, but these messages
still seem very suspicious. Any ideas what this could be? My homebrew
upgrade/update has now given me Open MPI 2.0.1, and I am wondering if
anyone else is having this issue.
Thanks,
Justin
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            4
                            
                          
                          
                            
    
                          
                        
                    20 Sep '16
                    
                        To view BL.py, sign in<https://leeds365-my.sharepoint.com/personal/mmfg_leeds_ac_uk/_layouts/15/ac…> or create an account.
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            Floriane Gidel [RPG] wants to share the file	horizontal.msh with you
                        
                        
by Floriane Gidel [RPG] 20 Sep '16
                    by Floriane Gidel [RPG] 20 Sep '16
20 Sep '16
                    
                        To view horizontal.msh, sign in<https://leeds365-my.sharepoint.com/personal/mmfg_leeds_ac_uk/_layouts/15/ac…> or create an account.
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        Dear Floriane,
Please provide a minimal failing example so we can see what is going on. By
a minimal failing example, we mean that you remove everything from the
example that is not related to the failure. Often this requires some trial
and error. The objective is to produce a very short piece of code which
illustrates the problem so that we can (a) check if we can reproduce it and
if so (b) find the problem easily.
Regards,
David
On Tue, 20 Sep 2016 at 09:46 Floriane Gidel [RPG] <mmfg(a)leeds.ac.uk> wrote:
> Dear all,
>
>
> Some of my codes do not work either since I updated firedrake. I have run
> firedrake-clean but still have the same error when calling the nonlinear
> solvers. The error is pasted below.
>
> Any idea of what I could do ?
>
> Thanks,
>
> Floriane
>
>
>
> Traceback (most recent call last):
>   File "3D_NL.py", line 232, in <module>
>     wf1_solver = NonlinearVariationalSolver(wf1_problem)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
> line 137, in __init__
>     appctx=appctx)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
> line 138, in __init__
>     for J, problem, ctx in zip(self.Js, problems, appctxs))
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
> line 138, in <genexpr>
>     for J, problem, ctx in zip(self.Js, problems, appctxs))
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
> line 81, in assemble
>
>     inverse=inverse, mat_type=mat_type, appctx=appctx)
>   File "<decorator-gen-295>", line 2, in _assemble
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
> line 62, in wrapper
>     return f(*args, **kwargs)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
> line 120, in _assemble
>     inverse=inverse)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
> line 189, in compile_form
>     number_map).kernels
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
> 198, in __new__
>     obj = make_obj()
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
> 188, in make_obj
>     obj.__init__(*args, **kwargs)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
> line 119, in __init__
>     kernels.append(KernelInfo(kernel=Kernel(ast, ast.name, opts=opts),
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
> line 118, in __call__
>     return t(*args, **kwargs)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
> 198, in __new__
>     obj = make_obj()
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
> 188, in make_obj
>     obj.__init__(*args, **kwargs)
>   File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/base.py",
> line 3778, in __init__
>     self._code = self._ast_to_c(self._ast, opts)
>   File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/host.py",
> line 60, in _ast_to_c
>     ast_handler.plan_cpu(self._opts)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/plan.py", line
> 119, in plan_cpu
>     loop_opt.rewrite(rewrite)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/optimizer.py",
> line 142, in rewrite
>     merged_loops = SSALoopMerger(self.expr_graph).merge(self.header)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/scheduler.py",
> line 181, in merge
>     merged, l_dims, m_dims = self._merge_loops(parent, l, merging_in)
>   File
> "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/scheduler.py",
> line 74, in _merge_loops
>     while isinstance(loop_b.children[0], (Block, For)):
> IndexError: list index out of range
> Exception AttributeError: "'NonlinearVariationalSolver' object has no
> attribute '_parameters'" in <bound method
> NonlinearVariationalSolver.__del__ of
> <firedrake.variational_solver.NonlinearVariationalSolver object at
> 0x595a250>> ignored
>
> ------------------------------
> *De :* firedrake-bounces(a)imperial.ac.uk <firedrake-bounces(a)imperial.ac.uk>
> de la part de Fabio Luporini <f.luporini12(a)imperial.ac.uk>
> *Envoyé :* jeudi 15 septembre 2016 14:14:44
> *À :* firedrake
> *Objet :* Re: [firedrake] (no subject)
>
> Hi Will,
>
> Could you just try a firedrake-clean and run it again ? it should then work
>
> Thanks
>
> -- Fabio
>
> 2016-09-15 14:07 GMT+02:00 William Booker <scwb(a)leeds.ac.uk>:
>
>> Hi firedrakers,
>>
>> I had this script working on an older version of firedrake (24th Aug),
>> but when I updated today I now get the following error when I try to run it:
>>
>> Traceback (most recent call last):
>>   File "compressible_stratified.py", line 77, in <module>
>>     solve ( a_u_project == L_u_project , dHdu0 ,
>> solver_parameters={'ksp_rtol': 1e-14} )
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/solving.py",
>> line 119, in solve
>>     _solve_varproblem(*args, **kwargs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/solving.py",
>> line 147, in _solve_varproblem
>>     solver.solve()
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>> line 198, in solve
>>     self.snes.solve(None, v)
>>   File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve
>> (src/petsc4py.PETSc.c:170168)
>>   File "PETSc/petscsnes.pxi", line 261, in petsc4py.PETSc.SNES_Function
>> (src/petsc4py.PETSc.c:33322)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>> line 216, in form_function
>>     form_compiler_parameters=problem.form_compiler_parameters)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>> line 81, in assemble
>>     inverse=inverse, mat_type=mat_type, appctx=appctx)
>>   File "<decorator-gen-295>", line 2, in _assemble
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>> line 62, in wrapper
>>     return f(*args, **kwargs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>> line 444, in _assemble
>>     return thunk(bcs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assembly_cache.py",
>> line 357, in inner
>>     r = thunk(bcs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>> line 394, in thunk
>>     op2.par_loop(*args, **kwargs)
>>   File "<decorator-gen-269>", line 2, in par_loop
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/versioning.py",
>> line 154, in modifies_arguments
>>     retval = func(*args, **kwargs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/op2.py",
>> line 269, in par_loop
>>     return backends._BackendSelector._backend.par_loop(kernel, iterset,
>> *args, **kwargs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>> line 4369, in par_loop
>>     return _make_object('ParLoop', kernel, it_space, *args,
>> **kwargs).enqueue()
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>> line 72, in _make_object
>>     return _BackendSelector._backend.__dict__[obj](*args, **kwargs)
>>   File "<decorator-gen-262>", line 2, in __init__
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/utils.py",
>> line 130, in wrapper
>>     return f(*args, **kwargs)
>>   File
>> "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>> line 3999, in __init__
>>     fundecl = kernel._attached_info['fundecl']
>> TypeError: 'bool' object has no attribute '__getitem__'
>>
>>
>> What needs to be changed to get it to compile again?
>>
>> Thanks
>> Will
>>
>>
>>
>>
>>
>
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    20 Sep '16
                    
                        Hi Justin,
Thanks for this. I will attempt to reproduce it. The first one appears to
be a failure in our doctoring of the virtualenv to make things like inline
plotting work on Mac. The error you are seeing may or may not be an issue.
The second one is unrelated and is completely new. I'll go looking for it.
Regards,
David
On Tue, 20 Sep 2016 at 09:31 Justin Chang <jychang48(a)gmail.com> wrote:
> Hi all,
>
> I upgraded homebrew on my macbook and had to remove firedrake because the
> compiled libraries were pointing to old/nonexistent brew packages. So when
> I tried to install a fresh copy of firedrake, i get this message:
>
> $ python firedrake-install --developer --disable_ssh --log
>
> Installing command line tools...
>
> Installing required packages via homebrew. You can safely ignore warnings
> that packages are already installed
>
> Creating firedrake virtualenv in 'firedrake'.
>
> /Users/justin/Software/firedrake/bin/pip install -vvv -U pip
>
>
> Traceback (most recent call last):
>
>   File "firedrake-install", line 1016, in <module>
>
>     framework = fix_osx_virtualenv_python()
>
>   File "firedrake-install", line 973, in fix_osx_virtualenv_python
>
>     shutil.copytree(appsrc, appdest)
>
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
> line 208, in copytree
>
>     raise Error, errors
>
> shutil.Error:
> [('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist',
> '/Users/justin/Software/firedrake/Python.app/Contents/Info.plist', "[Errno
> 1] Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/Info.plist'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python',
> '/Users/justin/Software/firedrake/Python.app/Contents/MacOS/Python',
> "[Errno 1] Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/MacOS/Python'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS',
> '/Users/justin/Software/firedrake/Python.app/Contents/MacOS', "[Errno 1]
> Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/MacOS'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/PkgInfo',
> '/Users/justin/Software/firedrake/Python.app/Contents/PkgInfo', "[Errno 1]
> Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/PkgInfo'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources/PythonApplet.icns',
> '/Users/justin/Software/firedrake/Python.app/Contents/Resources/PythonApplet.icns',
> "[Errno 1] Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/Resources/PythonApplet.icns'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources/PythonInterpreter.icns',
> '/Users/justin/Software/firedrake/Python.app/Contents/Resources/PythonInterpreter.icns',
> "[Errno 1] Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/Resources/PythonInterpreter.icns'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources',
> '/Users/justin/Software/firedrake/Python.app/Contents/Resources', "[Errno
> 1] Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/Resources'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/version.plist',
> '/Users/justin/Software/firedrake/Python.app/Contents/version.plist',
> "[Errno 1] Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents/version.plist'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents',
> '/Users/justin/Software/firedrake/Python.app/Contents', "[Errno 1]
> Operation not permitted:
> '/Users/justin/Software/firedrake/Python.app/Contents'"),
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app',
> '/Users/justin/Software/firedrake/Python.app', "[Errno 1] Operation not
> permitted: '/Users/justin/Software/firedrake/Python.app'")]
>
> And when I run the script again, it installs correctly. I guess this meant
> the virtualenv was "successfully" installed the first time.
>
> However, I get this strange MPI warning/error that I have never before
> seen:
>
> $ python -c "from firedrake import *"
>
> [Justins-MacBook-Pro-2.local:88453] [[15547,0],0] bind() failed on error
> Address already in use (48)
>
> [Justins-MacBook-Pro-2.local:88453] [[15547,0],0] ORTE_ERROR_LOG: Error in
> file oob_usock_component.c at line 228
>
> My firedrake programs appear to run without any error, but these messages
> still seem very suspicious. Any ideas what this could be? My homebrew
> upgrade/update has now given me Open MPI 2.0.1, and I am wondering if
> anyone else is having this issue.
>
> Thanks,
> Justin
>
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        Hi Will,
Could you just try a firedrake-clean and run it again ? it should then work
Thanks
-- Fabio
2016-09-15 14:07 GMT+02:00 William Booker <scwb(a)leeds.ac.uk>:
> Hi firedrakers,
>
> I had this script working on an older version of firedrake (24th Aug), but
> when I updated today I now get the following error when I try to run it:
>
> Traceback (most recent call last):
>   File "compressible_stratified.py", line 77, in <module>
>     solve ( a_u_project == L_u_project , dHdu0 ,
> solver_parameters={'ksp_rtol': 1e-14} )
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/solving.py", line 119, in solve
>     _solve_varproblem(*args, **kwargs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/solving.py", line 147, in
> _solve_varproblem
>     solver.solve()
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/variational_solver.py", line 198, in
> solve
>     self.snes.solve(None, v)
>   File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve
> (src/petsc4py.PETSc.c:170168)
>   File "PETSc/petscsnes.pxi", line 261, in petsc4py.PETSc.SNES_Function
> (src/petsc4py.PETSc.c:33322)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/solving_utils.py", line 216, in
> form_function
>     form_compiler_parameters=problem.form_compiler_parameters)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/assemble.py", line 81, in assemble
>     inverse=inverse, mat_type=mat_type, appctx=appctx)
>   File "<decorator-gen-295>", line 2, in _assemble
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/utils.py", line 62, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/assemble.py", line 444, in _assemble
>     return thunk(bcs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/assembly_cache.py", line 357, in inner
>     r = thunk(bcs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/firedrake/assemble.py", line 394, in thunk
>     op2.par_loop(*args, **kwargs)
>   File "<decorator-gen-269>", line 2, in par_loop
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/pyop2/versioning.py", line 154, in
> modifies_arguments
>     retval = func(*args, **kwargs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/pyop2/op2.py", line 269, in par_loop
>     return backends._BackendSelector._backend.par_loop(kernel, iterset,
> *args, **kwargs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/pyop2/base.py", line 4369, in par_loop
>     return _make_object('ParLoop', kernel, it_space, *args,
> **kwargs).enqueue()
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/pyop2/backends.py", line 72, in _make_object
>     return _BackendSelector._backend.__dict__[obj](*args, **kwargs)
>   File "<decorator-gen-262>", line 2, in __init__
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/pyop2/utils.py", line 130, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/
> python2.7/site-packages/pyop2/base.py", line 3999, in __init__
>     fundecl = kernel._attached_info['fundecl']
> TypeError: 'bool' object has no attribute '__getitem__'
>
>
> What needs to be changed to get it to compile again?
>
> Thanks
> Will
>
>
>
>
>
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        OK. Let's do some sanity checking.
1. Please confirm that the current firedrake checkout is in developer mode
and has always been in developer mode (I can see that it is in developer
mode from the error message but I want to make sure there cannot be stale
files around from a non-developer mode past).
2. Run firedrake-clean and check that the error still occurs.
2. Please run the following command:
firedrake-zenodo -m "Versions I am using now"
This will create a file firedrake.json . Please check that its contents
exactly match what is below:
{"fiat": "1bc440ca34d4b127897cf5a36d63bf8a41a3d55c", "COFFEE":
"8e03328d659fd8d8871bf5b7bc3f08b769f0ab9d", "ufl":
"2fc6d00f7e4b5e0639c6d01f27f9b2bbc0d4696e", "firedrake":
"71cf933f05508427287dc6464e15d2d7adf1b179", "tsfc":
"f867938c58f475f1cd332421e2bf14cffa2f5aef", "petsc4py":
"0b590afa9d3c42e0b4f863061b6e082d6f0227f6", "petsc":
"21143a8c817f512a23f8e18da648891eb40f5217", "PyOP2":
"d9ea13e1e17fcb1e05adcf1db31bd8190974520d", "message": "Versions I am using
now"}
On Fri, 16 Sep 2016 at 16:28 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk> wrote:
> That is the same version I have.
>
>
> On 16 Sep 2016, at 16:23, David Ham <David.Ham(a)imperial.ac.uk> wrote:
>
> Hi Anna,
>
> Please confirm the git revision of your PyOP2. You can retrieve this by
> typing the following command in the PyOP2 directory:
>
> git rev-parse HEAD
>
> You should have:
> d9ea13e1e17fcb1e05adcf1db31bd8190974520d
>
> Regards,
>
> David
>
> On Fri, 16 Sep 2016 at 15:59 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
> wrote:
>
>> Hi David,
>>
>> Thank you for the reply. Indeed, the problem was with the virtualenv; I
>> had to deactivate and activate it again. Unfortunately I still get errors,
>> which are probably due to the firedrake I have installed (since you said
>> that it works on your computer):
>>
>>   File "buoy-swe.py", line 89, in <module>
>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0, W0,
>> step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>> dR_dt, g, rho, Mass, solvers_print);
>>   File "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>> system/solvers.py", line 41, in solver_F
>>     F_solver = LinearVariationalSolver(F_problem,
>> solver_parameters=solvers_print)
>>   File
>> "/Users/matak/firedrake/src/firedrake/firedrake/variational_solver.py",
>> line 264, in __init__
>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>   File
>> "/Users/matak/firedrake/src/firedrake/firedrake/variational_solver.py",
>> line 127, in __init__
>>     ctx = solving_utils._SNESContext(problem)
>>   File "/Users/matak/firedrake/src/firedrake/firedrake/solving_utils.py",
>> line 107, in __init__
>>     for problem in problems)
>>   File "/Users/matak/firedrake/src/firedrake/firedrake/solving_utils.py",
>> line 107, in <genexpr>
>>     for problem in problems)
>>   File "/Users/matak/firedrake/src/firedrake/firedrake/assemble.py", line
>> 67, in assemble
>>     inverse=inverse, nest=nest)
>>   File "<decorator-gen-294>", line 2, in _assemble
>>   File "/Users/matak/firedrake/src/firedrake/firedrake/utils.py", line
>> 62, in wrapper
>>     return f(*args, **kwargs)
>>   File "/Users/matak/firedrake/src/firedrake/firedrake/assemble.py", line
>> 179, in _assemble
>>     nest=nest)
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/backends.py", line 118, in
>> __call__
>>     return t(*args, **kwargs)
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/caching.py", line 122, in
>> __new__
>>     args, kwargs = cls._process_args(*args, **kwargs)
>>   File "<decorator-gen-258>", line 2, in _process_args
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/utils.py", line 130, in
>> wrapper
>>     return f(*args, **kwargs)
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/base.py", line 3591, in
>> _process_args
>>     if not (pair[0].toset == dsets[0].set and
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/utils.py", line 64, in
>> __get__
>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/base.py", line 3372, in
>> toset
>>     m.toset for m in self._maps))
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/caching.py", line 156, in
>> __new__
>>     obj = make_obj()
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/caching.py", line 137, in
>> make_obj
>>     obj.__init__(*args, **kwargs)
>>   File "/Users/matak/firedrake/src/PyOP2/pyop2/base.py", line 977, in
>> __init__
>>     "All components of a MixedSet must have the same number of layers."
>> AssertionError: All components of a MixedSet must have the same number of
>> layers.
>>
>>
>>
>> On 16 Sep 2016, at 15:47, David Ham <David.Ham(a)imperial.ac.uk> wrote:
>>
>> Hi Anna,
>>
>> Your code works for me (in the sense that it appears to run without
>> error. I have no idea whether the answer is right ;)
>>
>> Please also note that Miklos is correct: your error is definitely from a
>> global firedrake install. You can tell because the paths start /usr/local.
>> Your previous error messages are from a local install. You can tell that
>> because the paths start /Users/matak . Are you sure your virtualenv is
>> active?
>>
>> Regards,
>>
>> David
>>
>>
>>
>> On Fri, 16 Sep 2016 at 15:16 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
>> wrote:
>>
>>> During the past few days I have been working on my laptop (not the
>>> desktop at Leeds) and I don’t believe there are multiple installations of
>>> firedrake on this machine.
>>>
>>> Can someone please try to run my code
>>> <https://bitbucket.org/annakalog/buoy2d/src/673fef3466b06c98ac11f5a120ff4211…> so
>>> that we know for sure if the problem is in my code or related with the
>>> installation? Thanks.
>>>
>>>
>>> On 16 Sep 2016, at 14:54, Colin Cotter <colin.cotter(a)imperial.ac.uk>
>>> wrote:
>>>
>>> Ah yes, that tallies with Daniel Ruprecht's reports that Firedrake is
>>> part of the standard installation at Leeds!
>>>
>>> On 16 September 2016 at 14:53, Homolya, Miklós <
>>> m.homolya14(a)imperial.ac.uk> wrote:
>>>
>>> It seems that the Firedrake you're importing is a system wide
>>>> installation. No wonder that updating your own installation doesn't fix it.
>>>>
>>>> Get Outlook for Android <https://aka.ms/ghei36>
>>>>
>>>
>>>>
>>>>
>>>> On Thu, Sep 15, 2016 at 8:33 PM +0100, "Anna Kalogirou" <
>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>
>>>> Ok thanks, I get the error below:
>>>>
>>>> Traceback (most recent call last):
>>>>
>>>   File "buoy-swe.py", line 6, in <module>
>>>>     from firedrake import *
>>>>   File "/usr/local/lib/python2.7/site-packages/firedrake/__init__.py",
>>>> line 30, in <module>
>>>>     from assemble import *
>>>>   File "/usr/local/lib/python2.7/site-packages/firedrake/assemble.py",
>>>> line 8, in <module>
>>>>     import assembly_cache
>>>>   File
>>>> "/usr/local/lib/python2.7/site-packages/firedrake/assembly_cache.py", line
>>>> 40, in <module>
>>>>     import function
>>>>   File "/usr/local/lib/python2.7/site-packages/firedrake/function.py",
>>>> line 9, in <module>
>>>>     import assemble_expressions
>>>>   File
>>>> "/usr/local/lib/python2.7/site-packages/firedrake/assemble_expressions.py",
>>>> line 15, in <module>
>>>>     import functionspace
>>>>   File
>>>> "/usr/local/lib/python2.7/site-packages/firedrake/functionspace.py", line
>>>> 10, in <module>
>>>>     import dmplex
>>>> ImportError:
>>>> dlopen(/usr/local/lib/python2.7/site-packages/firedrake/dmplex.so, 2):
>>>> Library not loaded:
>>>> /usr/local/lib/python2.7/site-packages/petsc/lib/libpetsc.3.05.2.dylib
>>>>   Referenced from:
>>>> /usr/local/lib/python2.7/site-packages/firedrake/dmplex.so
>>>>   Reason: image not found
>>>>
>>> On 15 Sep 2016, at 18:21, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>>>
>>>> To give credit where it's due,
>>>>
>>>> s/Andrew's patch/Miklós's patch/
>>>>
>>>> On 15 September 2016 at 18:16, David Ham <David.Ham(a)imperial.ac.uk>
>>>> wrote:
>>>>
>>>> I suspect Andrew is correct. However the deeper issue is that you
>>>>> edited the installed file, which is never a safe thing to do. One must
>>>>> always edit the file in the source directory and then (if necessary)
>>>>> re-install.
>>>>>
>>>>> Anyway, I have committed Andrew's patch to the repository, so
>>>>> hopefully the problem will go away if you do a git update.
>>>>>
>>>>> Regards,
>>>>>
>>>>> David
>>>>>
>>>>> On Wed, 14 Sep 2016 at 18:39 Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>>> wrote:
>>>>>
>>>>>> Probably related to installing Firedrake in development mode or not.
>>>>>>
>>>>>> I can't help any further here; I don't know if someone else can.
>>>>>>
>>>>>> On 14 September 2016 at 16:13, Anna Kalogirou <
>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>
>>>>>>> Ok, so I replace line 3366 in file “
>>>>>>> /Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py”
>>>>>>> with the suggested patch, but I now get the error below.
>>>>>>>
>>>>>>> Note that the error I get comes from file
>>>>>>> firedrake/lib/python2.7/site-packages/pyop2/base.py
>>>>>>> while in the reported issue the error comes from
>>>>>>> firedrake/src/PyOP2/pyop2/base.py
>>>>>>> so the two might not be related after all.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Anna.
>>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>   File
>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>> solver_parameters=solvers_print)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>> line 264, in __init__
>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>> line 127, in __init__
>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>> line 107, in __init__
>>>>>>>     for problem in problems)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>> line 107, in <genexpr>
>>>>>>>     for problem in problems)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>> line 67, in assemble
>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>> line 62, in wrapper
>>>>>>>     return f(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>> line 179, in _assemble
>>>>>>>     nest=nest)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>>>> line 118, in __call__
>>>>>>>     return t(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 122, in __new__
>>>>>>>     args, kwargs = cls._process_args(*args, **kwargs)
>>>>>>>   File "<decorator-gen-258>", line 2, in _process_args
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>>> 130, in wrapper
>>>>>>>     return f(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 3592, in _process_args
>>>>>>>     if not (pair[0].toset == dsets[0].set and
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>>> 64, in __get__
>>>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 3373, in toset
>>>>>>>     m.toset for m in self._maps))
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 156, in __new__
>>>>>>>     obj = make_obj()
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 137, in make_obj
>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 977, in __init__
>>>>>>>     "All components of a MixedSet must have the same number of
>>>>>>> layers."
>>>>>>> AssertionError: All components of a MixedSet must have the same
>>>>>>> number of layers.
>>>>>>>
>>>>>>
>>>>>>> **********************************************************
>>>>>>>
>>>>>>
>>>>>>> Dr Anna Kalogirou
>>>>>>> Research Fellow
>>>>>>>
>>>>>> Department of Applied Mathematics
>>>>>>> University of Leeds
>>>>>>>
>>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>
>>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>>
>>>>>>> **********************************************************
>>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>>
>>>>>>> **********************************************************
>>>>>>>
>>>>>>>
>>>>>>> On 14 Sep 2016, at 16:00, Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Not as a branch, but you can change PyOP2 locally using the code at
>>>>>>> the bottom of that post, "Suggested patch"
>>>>>>>
>>>>>>> On 14 September 2016 at 15:54, Anna Kalogirou <
>>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>
>>>>>>> Hi Andrew,
>>>>>>>>
>>>>>>>> Yes indeed, the two might be related. Was there a fix for the issue
>>>>>>>> reported on github?
>>>>>>>>
>>>>>>>> Best, Anna.
>>>>>>>>
>>>>>>>>
>>>>>>>> **********************************************************
>>>>>>>>
>>>>>>>
>>>>>>>> Dr Anna Kalogirou
>>>>>>>> Research Fellow
>>>>>>>>
>>>>>>> Department of Applied Mathematics
>>>>>>>> University of Leeds
>>>>>>>>
>>>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>
>>>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>>>
>>>>>>>> **********************************************************
>>>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>>>
>>>>>>>> **********************************************************
>>>>>>>>
>>>>>>>>
>>>>>>>> On 13 Sep 2016, at 16:34, Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Probably related to
>>>>>>>> https://github.com/firedrakeproject/firedrake/issues/862 (third
>>>>>>>> post, not first).  You might be able to adapt the fix; I haven't looked in
>>>>>>>> detail.
>>>>>>>>
>>>>>>>> On 12 September 2016 at 16:34, Anna Kalogirou <
>>>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>>
>>>>>>>>> Regarding the problem described in my email sent of Friday, I
>>>>>>>>> fixed a minor typo and now get the error below. Any ideas what might be
>>>>>>>>> causing it? Thanks!
>>>>>>>>>
>>>>>>>>> Best, Anna.
>>>>>>>>>
>>>>>>>>> Traceback (most recent call last):
>>>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>>>> solver_parameters=solvers_print)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>>> line 264, in __init__
>>>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>>> line 127, in __init__
>>>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>>> line 107, in __init__
>>>>>>>>>     for problem in problems)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>>> line 107, in <genexpr>
>>>>>>>>>     for problem in problems)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>>> line 67, in assemble
>>>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>>>> line 62, in wrapper
>>>>>>>>>     return f(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>>> line 163, in _assemble
>>>>>>>>>     map_pairs.append((op2.DecoratedMap(test.cell_node_map(),
>>>>>>>>> cell_domains),
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/functionspaceimpl.py",
>>>>>>>>> line 646, in cell_node_map
>>>>>>>>>     for i, s in enumerate(self._spaces))
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>>>>>> line 118, in __call__
>>>>>>>>>     return t(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>>> 156, in __new__
>>>>>>>>>     obj = make_obj()
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>>> 137, in make_obj
>>>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>>> 3342, in __init__
>>>>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>>>>> self._maps):
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>>> 3342, in <genexpr>
>>>>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>>>>> self._maps):
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>>>>> 64, in __get__
>>>>>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>>> 3366, in iterset
>>>>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b
>>>>>>>>> if b is None else b.iterset, self._maps)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>>> 3366, in <lambda>
>>>>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b
>>>>>>>>> if b is None else b.iterset, self._maps)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>>> 799, in __getattr__
>>>>>>>>>     return getattr(self._parent, name)
>>>>>>>>> AttributeError: 'Set' object has no attribute ‘iterset'
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> **********************************************************
>>>>>>>>>
>>>>>>>>
>>>>>>>>> Dr Anna Kalogirou
>>>>>>>>> Research Fellow
>>>>>>>>>
>>>>>>>> Department of Applied Mathematics
>>>>>>>>> University of Leeds
>>>>>>>>>
>>>>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>>
>>>>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>>>>
>>>>>>>>> **********************************************************
>>>>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>>>>
>>>>>>>>> **********************************************************
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 9 Sep 2016, at 17:37, Anna Kalogirou <a.kalogirou(a)leeds.ac.uk>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi David,
>>>>>>>>>
>>>>>>>>> I have tried to implement my problem (attached) using the real
>>>>>>>>> function spaces but I get the error below. The code can be found
>>>>>>>>> here
>>>>>>>>> <https://bitbucket.org/annakalog/buoy2d/src/d6a805b6a8d0/Mixed%20system/?at=…>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>> I define the real space by V_R = FunctionSpace(mesh, "R", 0). Is
>>>>>>>>> that correct?
>>>>>>>>> Also, is it a problem that the linear part of the variational form
>>>>>>>>> does not depend on one of the test functions from the mixed function space
>>>>>>>>> (only depends on v1, v2, v3 and not v4)?
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>>
>>>>>>>>> Anna.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Traceback (most recent call last):
>>>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>>>> solver_parameters=solvers_print)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>>> line 264, in __init__
>>>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>>> line 127, in __init__
>>>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>>> line 107, in __init__
>>>>>>>>>     for problem in problems)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>>> line 107, in <genexpr>
>>>>>>>>>     for problem in problems)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>>> line 67, in assemble
>>>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>>>> line 62, in wrapper
>>>>>>>>>     return f(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>>> line 101, in _assemble
>>>>>>>>>     inverse=inverse)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>>>>> line 307, in compile_form
>>>>>>>>>     number_map).kernels
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>>> 198, in __new__
>>>>>>>>>     obj = make_obj()
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>>> 188, in make_obj
>>>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>>>>> line 212, in __init__
>>>>>>>>>     tree = tsfc_compile_form(form, prefix=name,
>>>>>>>>> parameters=parameters)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/tsfc/driver.py", line
>>>>>>>>> 47, in compile_form
>>>>>>>>>     do_estimate_degrees=True)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/compute_form_data.py",
>>>>>>>>> line 386, in compute_form_data
>>>>>>>>>     check_form_arity(preprocessed_form,
>>>>>>>>> self.original_form.arguments())  # Currently testing how fast this is
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>>>> line 152, in check_form_arity
>>>>>>>>>     check_integrand_arity(itg.integrand(), arguments)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>>>> line 145, in check_integrand_arity
>>>>>>>>>     args = map_expr_dag(rules, expr, compress=False)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>>>>> line 37, in map_expr_dag
>>>>>>>>>     result, = map_expr_dags(function, [expression],
>>>>>>>>> compress=compress)
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>>>>> line 86, in map_expr_dags
>>>>>>>>>     r = handlers[v._ufl_typecode_](v, *[vcache[u] for u in
>>>>>>>>> v.ufl_operands])
>>>>>>>>>   File
>>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>>>> line 42, in sum
>>>>>>>>>     raise ArityMismatch("Adding expressions with non-matching form
>>>>>>>>> arguments {0} vs {1}.".format(a, b))
>>>>>>>>> ufl.algorithms.check_arities.ArityMismatch: Adding expressions
>>>>>>>>> with non-matching form arguments () vs
>>>>>>>>> (Argument(WithGeometry(IndexedProxyFunctionSpace(<firedrake.mesh.ExtrudedMeshTopology
>>>>>>>>> object at 0x113e6b890>, TensorProductElement(FiniteElement('Lagrange',
>>>>>>>>> interval, 1), FiniteElement('Lagrange', interval, 1),
>>>>>>>>> cell=TensorProductCell(interval, interval)), name=None, index=0,
>>>>>>>>> component=None),
>>>>>>>>> Mesh(VectorElement(TensorProductElement(FiniteElement('Lagrange', interval,
>>>>>>>>> 1), FiniteElement('Lagrange', interval, 1),
>>>>>>>>> cell=TensorProductCell(interval, interval)), dim=2), 4)), 1, None),).
>>>>>>>>> <coupled_system.pdf>
>>>>>>>>>
>>>>>>>>> On 18 Aug 2016, at 16:03, David Ham <david.ham(a)imperial.ac.uk>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi Anna,
>>>>>>>>>
>>>>>>>>> Real function spaces now pass some simple tests, at least on my
>>>>>>>>> machine. You need the real-function-space branch of firedrake, and the
>>>>>>>>> globals_matrices branch of PyOP2. It's not going to get merged before I
>>>>>>>>> disappear for a week - not least because I need to update documentation.
>>>>>>>>> However you should be able to test it out on the branches.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>> On Wed, 10 Aug 2016 at 16:58 David Ham <David.Ham(a)imperial.ac.uk>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Unfortunately, It isn't as simple as saying "no mpi". MPI
>>>>>>>>>> pervades Firedrake. Unless real function spaces play nicely with
>>>>>>>>>> communicators, Firedrake will simply crash. I'm sorry that this feature is
>>>>>>>>>> not available right now, but it actually does require significant work.
>>>>>>>>>>
>>>>>>>>>> On Wed, 10 Aug 2016 at 16:51 Anna Kalogirou <
>>>>>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>>>
>>>>>>>>>>> Yes indeed, but I believe David would want to make it work for
>>>>>>>>>>> all cases. The merge is necessary in order to proceed with my simulations,
>>>>>>>>>>> so an update as soon as possible would be greatly appreciated.
>>>>>>>>>>>
>>>>>>>>>>> Best, Anna.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 10 Aug 2016, at 16:29, Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> We would already be helped for the case without MPI, I think
>>>>>>>>>>> that is correct, Anna?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>>>>
>>>>>>>>>>> *Sent:* Wednesday, August 10, 2016 10:01 AM
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> *To:* firedrake
>>>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>>>
>>>>>>>>>>> The short version is it depends on when I find some time to work
>>>>>>>>>>> on it. It is not simply the case that we have new features lying around
>>>>>>>>>>> waiting to be merged. The current proximate issue is to make the real
>>>>>>>>>>> spaces work properly with MPI communicators. I can't guarantee that will be
>>>>>>>>>>> the last issue.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Tue, 9 Aug 2016 at 17:37 Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> It is possible to merge the branch for the mixed system
>>>>>>>>>>>> relatively soon?
>>>>>>>>>>>> Anna's results are relevant for the grant application Colin and
>>>>>>>>>>>> I aim to submit in Sept. on further wave-ship modelling.
>>>>>>>>>>>> Sorry for asking!
>>>>>>>>>>>> ------------------------------
>>>>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>>>>> *Sent:* Friday, August 5, 2016 11:37:23 AM
>>>>>>>>>>>> *To:* firedrake
>>>>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, 5 Aug 2016 at 11:31 Anna Kalogirou <
>>>>>>>>>>>> a.kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Kramer,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thank you for the reply.
>>>>>>>>>>>>>
>>>>>>>>>>>>> The only problem I see with the solution you suggest, is that
>>>>>>>>>>>>> both I and
>>>>>>>>>>>>> lambda will be trial functions, so both terms should be on the
>>>>>>>>>>>>> bilinear
>>>>>>>>>>>>> part of the variational form.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Not quite. I and lambda together form a Function in a mixed
>>>>>>>>>>>> finite element space. You solve for both of them together, just like
>>>>>>>>>>>> pressure and velocity in a fluid simulation.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I could, of course, define a residual and solve everything
>>>>>>>>>>>>> using
>>>>>>>>>>>>> nonlinear solvers, but I don't know how efficient that would
>>>>>>>>>>>>> be.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I think you are confused. None of the relevant issues change in
>>>>>>>>>>>> the nonlinear case. After all, the nonlinear solver will differentiate the
>>>>>>>>>>>> residual to create a bilinear form anyway.
>>>>>>>>>>>>
>>>>>>>>>>>> Incidentally, there is no particular reason to believe that
>>>>>>>>>>>> writing the problem in nonlinear form would be inefficient.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>>
>>>>>>>>>>>> David
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Anna.
>>>>>>>>>>>>>
>>>>>>>>>>>>>   Dr Anna Kalogirou
>>>>>>>>>>>>>   Research Fellow
>>>>>>>>>>>>>   School of Mathematics
>>>>>>>>>>>>>   University of Leeds
>>>>>>>>>>>>>
>>>>>>>>>>>>>   http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 04/08/16 17:29, Stephan Kramer wrote:
>>>>>>>>>>>>> > On 27/07/16 11:01, Anna Kalogirou wrote:
>>>>>>>>>>>>> >> Dear all,
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> I am trying to solve the system found in the attached pdf
>>>>>>>>>>>>> as a mixed
>>>>>>>>>>>>> >> system. I want to solve the same
>>>>>>>>>>>>> >> problem as the one found here
>>>>>>>>>>>>> >> <
>>>>>>>>>>>>> https://bitbucket.org/annakalog/buoy2d/src/14334d3c20b9f10ed7c1246cde9e3cb6…
>>>>>>>>>>>>> >,
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> but with the use of Schur complements and not linear
>>>>>>>>>>>>> algebra.
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> In a previous discussion about this problem, Lawrence
>>>>>>>>>>>>> mentioned that the
>>>>>>>>>>>>> >> test function for integral(lambda*Theta(x-Lp)dx) needs to
>>>>>>>>>>>>> be considered
>>>>>>>>>>>>> >> as coming from the real space of constant functions. Could
>>>>>>>>>>>>> you please
>>>>>>>>>>>>> >> elaborate on this?
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > My guess at what Lawrence means is (it's how I would
>>>>>>>>>>>>> probably approach
>>>>>>>>>>>>> > it), is that you add an additional equation that says
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >  (1)  I = integral(lambda*Theta(x-Lp)dx)
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > and then substitute I in your third equation. Equation (1)
>>>>>>>>>>>>> can
>>>>>>>>>>>>> > be turned into a finite element weak formulation by
>>>>>>>>>>>>> considering the
>>>>>>>>>>>>> > function space of functions that are constant over the
>>>>>>>>>>>>> entire domain
>>>>>>>>>>>>> > This function space is just 1-dimensional and therefore
>>>>>>>>>>>>> equivalent to
>>>>>>>>>>>>> > the space of reals R and hence we denote this function space
>>>>>>>>>>>>> of
>>>>>>>>>>>>> > constants simply as R. Then we can consider I to be a trial
>>>>>>>>>>>>> function
>>>>>>>>>>>>> > in R, and with a test function v4 in R, we can write:
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >   v4*lambda*Theta(x-Lp)*dx == v4*I*dx/area(domain)
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > This is a proper finite element equation that you could
>>>>>>>>>>>>> solve in
>>>>>>>>>>>>> > conjuction with the other equations. I believe however that
>>>>>>>>>>>>> this
>>>>>>>>>>>>> > function space R is not currently implemented in Firedrake.
>>>>>>>>>>>>> It is
>>>>>>>>>>>>> > available in fenics, and is on the wishlist.
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > Cheers
>>>>>>>>>>>>> > Stephan
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > _______________________________________________
>>>>>>>>>>>>> > firedrake mailing list
>>>>>>>>>>>>> > firedrake(a)imperial.ac.uk
>>>>>>>>>>>>> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> firedrake mailing list
>>>>>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> firedrake mailing list
>>>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>> firedrake mailing list
>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> firedrake mailing list
>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>> firedrake mailing list
>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>> firedrake mailing list
>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>
>>>>>>> _______________________________________________
>>>> firedrake mailing list
>>>> firedrake(a)imperial.ac.uk
>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>
>>>> --
>>> http://www.imperial.ac.uk/people/colin.cotter
>>>
>>> www.cambridge.org/9781107663916
>>>
>>>
>>> _______________________________________________
>>> firedrake mailing list
>>> firedrake(a)imperial.ac.uk
>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>
>>> _______________________________________________
>> firedrake mailing list
>> firedrake(a)imperial.ac.uk
>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>
>>
>> _______________________________________________
> firedrake mailing list
> firedrake(a)imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>
>
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        Hi Anna,
Please confirm the git revision of your PyOP2. You can retrieve this by
typing the following command in the PyOP2 directory:
git rev-parse HEAD
You should have:
d9ea13e1e17fcb1e05adcf1db31bd8190974520d
Regards,
David
On Fri, 16 Sep 2016 at 15:59 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk> wrote:
> Hi David,
>
> Thank you for the reply. Indeed, the problem was with the virtualenv; I
> had to deactivate and activate it again. Unfortunately I still get errors,
> which are probably due to the firedrake I have installed (since you said
> that it works on your computer):
>
>   File "buoy-swe.py", line 89, in <module>
>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0, W0,
> step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
> dR_dt, g, rho, Mass, solvers_print);
>   File "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
> system/solvers.py", line 41, in solver_F
>     F_solver = LinearVariationalSolver(F_problem,
> solver_parameters=solvers_print)
>   File
> "/Users/matak/firedrake/src/firedrake/firedrake/variational_solver.py",
> line 264, in __init__
>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>   File
> "/Users/matak/firedrake/src/firedrake/firedrake/variational_solver.py",
> line 127, in __init__
>     ctx = solving_utils._SNESContext(problem)
>   File "/Users/matak/firedrake/src/firedrake/firedrake/solving_utils.py",
> line 107, in __init__
>     for problem in problems)
>   File "/Users/matak/firedrake/src/firedrake/firedrake/solving_utils.py",
> line 107, in <genexpr>
>     for problem in problems)
>   File "/Users/matak/firedrake/src/firedrake/firedrake/assemble.py", line
> 67, in assemble
>     inverse=inverse, nest=nest)
>   File "<decorator-gen-294>", line 2, in _assemble
>   File "/Users/matak/firedrake/src/firedrake/firedrake/utils.py", line 62,
> in wrapper
>     return f(*args, **kwargs)
>   File "/Users/matak/firedrake/src/firedrake/firedrake/assemble.py", line
> 179, in _assemble
>     nest=nest)
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/backends.py", line 118, in
> __call__
>     return t(*args, **kwargs)
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/caching.py", line 122, in
> __new__
>     args, kwargs = cls._process_args(*args, **kwargs)
>   File "<decorator-gen-258>", line 2, in _process_args
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/utils.py", line 130, in
> wrapper
>     return f(*args, **kwargs)
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/base.py", line 3591, in
> _process_args
>     if not (pair[0].toset == dsets[0].set and
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/utils.py", line 64, in
> __get__
>     obj.__dict__[self.__name__] = result = self.fget(obj)
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/base.py", line 3372, in
> toset
>     m.toset for m in self._maps))
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/caching.py", line 156, in
> __new__
>     obj = make_obj()
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/caching.py", line 137, in
> make_obj
>     obj.__init__(*args, **kwargs)
>   File "/Users/matak/firedrake/src/PyOP2/pyop2/base.py", line 977, in
> __init__
>     "All components of a MixedSet must have the same number of layers."
> AssertionError: All components of a MixedSet must have the same number of
> layers.
>
>
>
> On 16 Sep 2016, at 15:47, David Ham <David.Ham(a)imperial.ac.uk> wrote:
>
> Hi Anna,
>
> Your code works for me (in the sense that it appears to run without error.
> I have no idea whether the answer is right ;)
>
> Please also note that Miklos is correct: your error is definitely from a
> global firedrake install. You can tell because the paths start /usr/local.
> Your previous error messages are from a local install. You can tell that
> because the paths start /Users/matak . Are you sure your virtualenv is
> active?
>
> Regards,
>
> David
>
>
>
> On Fri, 16 Sep 2016 at 15:16 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
> wrote:
>
>> During the past few days I have been working on my laptop (not the
>> desktop at Leeds) and I don’t believe there are multiple installations of
>> firedrake on this machine.
>>
>> Can someone please try to run my code
>> <https://bitbucket.org/annakalog/buoy2d/src/673fef3466b06c98ac11f5a120ff4211…> so
>> that we know for sure if the problem is in my code or related with the
>> installation? Thanks.
>>
>>
>> On 16 Sep 2016, at 14:54, Colin Cotter <colin.cotter(a)imperial.ac.uk>
>> wrote:
>>
>> Ah yes, that tallies with Daniel Ruprecht's reports that Firedrake is
>> part of the standard installation at Leeds!
>>
>> On 16 September 2016 at 14:53, Homolya, Miklós <
>> m.homolya14(a)imperial.ac.uk> wrote:
>>
>> It seems that the Firedrake you're importing is a system wide
>>> installation. No wonder that updating your own installation doesn't fix it.
>>>
>>> Get Outlook for Android <https://aka.ms/ghei36>
>>>
>>
>>>
>>>
>>> On Thu, Sep 15, 2016 at 8:33 PM +0100, "Anna Kalogirou" <
>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>
>>> Ok thanks, I get the error below:
>>>
>>> Traceback (most recent call last):
>>>
>>   File "buoy-swe.py", line 6, in <module>
>>>     from firedrake import *
>>>   File "/usr/local/lib/python2.7/site-packages/firedrake/__init__.py",
>>> line 30, in <module>
>>>     from assemble import *
>>>   File "/usr/local/lib/python2.7/site-packages/firedrake/assemble.py",
>>> line 8, in <module>
>>>     import assembly_cache
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/firedrake/assembly_cache.py", line
>>> 40, in <module>
>>>     import function
>>>   File "/usr/local/lib/python2.7/site-packages/firedrake/function.py",
>>> line 9, in <module>
>>>     import assemble_expressions
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/firedrake/assemble_expressions.py",
>>> line 15, in <module>
>>>     import functionspace
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/firedrake/functionspace.py", line
>>> 10, in <module>
>>>     import dmplex
>>> ImportError:
>>> dlopen(/usr/local/lib/python2.7/site-packages/firedrake/dmplex.so, 2):
>>> Library not loaded:
>>> /usr/local/lib/python2.7/site-packages/petsc/lib/libpetsc.3.05.2.dylib
>>>   Referenced from:
>>> /usr/local/lib/python2.7/site-packages/firedrake/dmplex.so
>>>   Reason: image not found
>>>
>> On 15 Sep 2016, at 18:21, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>>
>>> To give credit where it's due,
>>>
>>> s/Andrew's patch/Miklós's patch/
>>>
>>> On 15 September 2016 at 18:16, David Ham <David.Ham(a)imperial.ac.uk>
>>> wrote:
>>>
>>> I suspect Andrew is correct. However the deeper issue is that you edited
>>>> the installed file, which is never a safe thing to do. One must always edit
>>>> the file in the source directory and then (if necessary) re-install.
>>>>
>>>> Anyway, I have committed Andrew's patch to the repository, so hopefully
>>>> the problem will go away if you do a git update.
>>>>
>>>> Regards,
>>>>
>>>> David
>>>>
>>>> On Wed, 14 Sep 2016 at 18:39 Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>> wrote:
>>>>
>>>>> Probably related to installing Firedrake in development mode or not.
>>>>>
>>>>> I can't help any further here; I don't know if someone else can.
>>>>>
>>>>> On 14 September 2016 at 16:13, Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk
>>>>> > wrote:
>>>>>
>>>>>> Ok, so I replace line 3366 in file “
>>>>>> /Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py”
>>>>>> with the suggested patch, but I now get the error below.
>>>>>>
>>>>>> Note that the error I get comes from file
>>>>>> firedrake/lib/python2.7/site-packages/pyop2/base.py
>>>>>> while in the reported issue the error comes from
>>>>>> firedrake/src/PyOP2/pyop2/base.py
>>>>>> so the two might not be related after all.
>>>>>>
>>>>>> Thanks,
>>>>>> Anna.
>>>>>>
>>>>>
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>   File
>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>> solver_parameters=solvers_print)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>> line 264, in __init__
>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>> line 127, in __init__
>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>> line 107, in __init__
>>>>>>     for problem in problems)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>> line 107, in <genexpr>
>>>>>>     for problem in problems)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>> line 67, in assemble
>>>>>>     inverse=inverse, nest=nest)
>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>> line 62, in wrapper
>>>>>>     return f(*args, **kwargs)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>> line 179, in _assemble
>>>>>>     nest=nest)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>>> line 118, in __call__
>>>>>>     return t(*args, **kwargs)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>> 122, in __new__
>>>>>>     args, kwargs = cls._process_args(*args, **kwargs)
>>>>>>   File "<decorator-gen-258>", line 2, in _process_args
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>> 130, in wrapper
>>>>>>     return f(*args, **kwargs)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>> 3592, in _process_args
>>>>>>     if not (pair[0].toset == dsets[0].set and
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>> 64, in __get__
>>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>> 3373, in toset
>>>>>>     m.toset for m in self._maps))
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>> 156, in __new__
>>>>>>     obj = make_obj()
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>> 137, in make_obj
>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>   File
>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>> 977, in __init__
>>>>>>     "All components of a MixedSet must have the same number of
>>>>>> layers."
>>>>>> AssertionError: All components of a MixedSet must have the same
>>>>>> number of layers.
>>>>>>
>>>>>
>>>>>> **********************************************************
>>>>>>
>>>>>
>>>>>> Dr Anna Kalogirou
>>>>>> Research Fellow
>>>>>>
>>>>> Department of Applied Mathematics
>>>>>> University of Leeds
>>>>>>
>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>
>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>
>>>>>> **********************************************************
>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>
>>>>>> **********************************************************
>>>>>>
>>>>>>
>>>>>> On 14 Sep 2016, at 16:00, Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>>>> wrote:
>>>>>>
>>>>>> Not as a branch, but you can change PyOP2 locally using the code at
>>>>>> the bottom of that post, "Suggested patch"
>>>>>>
>>>>>> On 14 September 2016 at 15:54, Anna Kalogirou <
>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>
>>>>>> Hi Andrew,
>>>>>>>
>>>>>>> Yes indeed, the two might be related. Was there a fix for the issue
>>>>>>> reported on github?
>>>>>>>
>>>>>>> Best, Anna.
>>>>>>>
>>>>>>>
>>>>>>> **********************************************************
>>>>>>>
>>>>>>
>>>>>>> Dr Anna Kalogirou
>>>>>>> Research Fellow
>>>>>>>
>>>>>> Department of Applied Mathematics
>>>>>>> University of Leeds
>>>>>>>
>>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>
>>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>>
>>>>>>> **********************************************************
>>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>>
>>>>>>> **********************************************************
>>>>>>>
>>>>>>>
>>>>>>> On 13 Sep 2016, at 16:34, Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Probably related to
>>>>>>> https://github.com/firedrakeproject/firedrake/issues/862 (third
>>>>>>> post, not first).  You might be able to adapt the fix; I haven't looked in
>>>>>>> detail.
>>>>>>>
>>>>>>> On 12 September 2016 at 16:34, Anna Kalogirou <
>>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>
>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> Regarding the problem described in my email sent of Friday, I fixed
>>>>>>>> a minor typo and now get the error below. Any ideas what might be causing
>>>>>>>> it? Thanks!
>>>>>>>>
>>>>>>>> Best, Anna.
>>>>>>>>
>>>>>>>> Traceback (most recent call last):
>>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>>   File
>>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>>> solver_parameters=solvers_print)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>> line 264, in __init__
>>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>> line 127, in __init__
>>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>> line 107, in __init__
>>>>>>>>     for problem in problems)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>> line 107, in <genexpr>
>>>>>>>>     for problem in problems)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>> line 67, in assemble
>>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>>> line 62, in wrapper
>>>>>>>>     return f(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>> line 163, in _assemble
>>>>>>>>     map_pairs.append((op2.DecoratedMap(test.cell_node_map(),
>>>>>>>> cell_domains),
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/functionspaceimpl.py",
>>>>>>>> line 646, in cell_node_map
>>>>>>>>     for i, s in enumerate(self._spaces))
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>>>>> line 118, in __call__
>>>>>>>>     return t(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>> 156, in __new__
>>>>>>>>     obj = make_obj()
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>> 137, in make_obj
>>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>> 3342, in __init__
>>>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>>>> self._maps):
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>> 3342, in <genexpr>
>>>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>>>> self._maps):
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>>>> 64, in __get__
>>>>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>> 3366, in iterset
>>>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b
>>>>>>>> if b is None else b.iterset, self._maps)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>> 3366, in <lambda>
>>>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b
>>>>>>>> if b is None else b.iterset, self._maps)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>>> 799, in __getattr__
>>>>>>>>     return getattr(self._parent, name)
>>>>>>>> AttributeError: 'Set' object has no attribute ‘iterset'
>>>>>>>>
>>>>>>>>
>>>>>>>> **********************************************************
>>>>>>>>
>>>>>>>
>>>>>>>> Dr Anna Kalogirou
>>>>>>>> Research Fellow
>>>>>>>>
>>>>>>> Department of Applied Mathematics
>>>>>>>> University of Leeds
>>>>>>>>
>>>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>
>>>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>>>
>>>>>>>> **********************************************************
>>>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>>>
>>>>>>>> **********************************************************
>>>>>>>>
>>>>>>>>
>>>>>>>> On 9 Sep 2016, at 17:37, Anna Kalogirou <a.kalogirou(a)leeds.ac.uk>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi David,
>>>>>>>>
>>>>>>>> I have tried to implement my problem (attached) using the real
>>>>>>>> function spaces but I get the error below. The code can be found
>>>>>>>> here
>>>>>>>> <https://bitbucket.org/annakalog/buoy2d/src/d6a805b6a8d0/Mixed%20system/?at=…>
>>>>>>>> .
>>>>>>>>
>>>>>>>> I define the real space by V_R = FunctionSpace(mesh, "R", 0). Is
>>>>>>>> that correct?
>>>>>>>> Also, is it a problem that the linear part of the variational form
>>>>>>>> does not depend on one of the test functions from the mixed function space
>>>>>>>> (only depends on v1, v2, v3 and not v4)?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>>
>>>>>>>> Anna.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Traceback (most recent call last):
>>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>>   File
>>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>>> solver_parameters=solvers_print)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>> line 264, in __init__
>>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>>> line 127, in __init__
>>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>> line 107, in __init__
>>>>>>>>     for problem in problems)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>>> line 107, in <genexpr>
>>>>>>>>     for problem in problems)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>> line 67, in assemble
>>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>>> line 62, in wrapper
>>>>>>>>     return f(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>>> line 101, in _assemble
>>>>>>>>     inverse=inverse)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>>>> line 307, in compile_form
>>>>>>>>     number_map).kernels
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>> 198, in __new__
>>>>>>>>     obj = make_obj()
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>>> 188, in make_obj
>>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>>>> line 212, in __init__
>>>>>>>>     tree = tsfc_compile_form(form, prefix=name,
>>>>>>>> parameters=parameters)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/tsfc/driver.py", line
>>>>>>>> 47, in compile_form
>>>>>>>>     do_estimate_degrees=True)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/compute_form_data.py",
>>>>>>>> line 386, in compute_form_data
>>>>>>>>     check_form_arity(preprocessed_form,
>>>>>>>> self.original_form.arguments())  # Currently testing how fast this is
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>>> line 152, in check_form_arity
>>>>>>>>     check_integrand_arity(itg.integrand(), arguments)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>>> line 145, in check_integrand_arity
>>>>>>>>     args = map_expr_dag(rules, expr, compress=False)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>>>> line 37, in map_expr_dag
>>>>>>>>     result, = map_expr_dags(function, [expression],
>>>>>>>> compress=compress)
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>>>> line 86, in map_expr_dags
>>>>>>>>     r = handlers[v._ufl_typecode_](v, *[vcache[u] for u in
>>>>>>>> v.ufl_operands])
>>>>>>>>   File
>>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>>> line 42, in sum
>>>>>>>>     raise ArityMismatch("Adding expressions with non-matching form
>>>>>>>> arguments {0} vs {1}.".format(a, b))
>>>>>>>> ufl.algorithms.check_arities.ArityMismatch: Adding expressions with
>>>>>>>> non-matching form arguments () vs
>>>>>>>> (Argument(WithGeometry(IndexedProxyFunctionSpace(<firedrake.mesh.ExtrudedMeshTopology
>>>>>>>> object at 0x113e6b890>, TensorProductElement(FiniteElement('Lagrange',
>>>>>>>> interval, 1), FiniteElement('Lagrange', interval, 1),
>>>>>>>> cell=TensorProductCell(interval, interval)), name=None, index=0,
>>>>>>>> component=None),
>>>>>>>> Mesh(VectorElement(TensorProductElement(FiniteElement('Lagrange', interval,
>>>>>>>> 1), FiniteElement('Lagrange', interval, 1),
>>>>>>>> cell=TensorProductCell(interval, interval)), dim=2), 4)), 1, None),).
>>>>>>>> <coupled_system.pdf>
>>>>>>>>
>>>>>>>> On 18 Aug 2016, at 16:03, David Ham <david.ham(a)imperial.ac.uk>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi Anna,
>>>>>>>>
>>>>>>>> Real function spaces now pass some simple tests, at least on my
>>>>>>>> machine. You need the real-function-space branch of firedrake, and the
>>>>>>>> globals_matrices branch of PyOP2. It's not going to get merged before I
>>>>>>>> disappear for a week - not least because I need to update documentation.
>>>>>>>> However you should be able to test it out on the branches.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On Wed, 10 Aug 2016 at 16:58 David Ham <David.Ham(a)imperial.ac.uk>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Unfortunately, It isn't as simple as saying "no mpi". MPI pervades
>>>>>>>>> Firedrake. Unless real function spaces play nicely with communicators,
>>>>>>>>> Firedrake will simply crash. I'm sorry that this feature is not available
>>>>>>>>> right now, but it actually does require significant work.
>>>>>>>>>
>>>>>>>>> On Wed, 10 Aug 2016 at 16:51 Anna Kalogirou <
>>>>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>>
>>>>>>>>>> Yes indeed, but I believe David would want to make it work for
>>>>>>>>>> all cases. The merge is necessary in order to proceed with my simulations,
>>>>>>>>>> so an update as soon as possible would be greatly appreciated.
>>>>>>>>>>
>>>>>>>>>> Best, Anna.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 10 Aug 2016, at 16:29, Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> We would already be helped for the case without MPI, I think that
>>>>>>>>>> is correct, Anna?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>>>
>>>>>>>>>> *Sent:* Wednesday, August 10, 2016 10:01 AM
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *To:* firedrake
>>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>>
>>>>>>>>>> The short version is it depends on when I find some time to work
>>>>>>>>>> on it. It is not simply the case that we have new features lying around
>>>>>>>>>> waiting to be merged. The current proximate issue is to make the real
>>>>>>>>>> spaces work properly with MPI communicators. I can't guarantee that will be
>>>>>>>>>> the last issue.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Tue, 9 Aug 2016 at 17:37 Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> It is possible to merge the branch for the mixed system
>>>>>>>>>>> relatively soon?
>>>>>>>>>>> Anna's results are relevant for the grant application Colin and
>>>>>>>>>>> I aim to submit in Sept. on further wave-ship modelling.
>>>>>>>>>>> Sorry for asking!
>>>>>>>>>>> ------------------------------
>>>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>>>> *Sent:* Friday, August 5, 2016 11:37:23 AM
>>>>>>>>>>> *To:* firedrake
>>>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, 5 Aug 2016 at 11:31 Anna Kalogirou <
>>>>>>>>>>> a.kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Kramer,
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you for the reply.
>>>>>>>>>>>>
>>>>>>>>>>>> The only problem I see with the solution you suggest, is that
>>>>>>>>>>>> both I and
>>>>>>>>>>>> lambda will be trial functions, so both terms should be on the
>>>>>>>>>>>> bilinear
>>>>>>>>>>>> part of the variational form.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Not quite. I and lambda together form a Function in a mixed
>>>>>>>>>>> finite element space. You solve for both of them together, just like
>>>>>>>>>>> pressure and velocity in a fluid simulation.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I could, of course, define a residual and solve everything using
>>>>>>>>>>>> nonlinear solvers, but I don't know how efficient that would be.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I think you are confused. None of the relevant issues change in
>>>>>>>>>>> the nonlinear case. After all, the nonlinear solver will differentiate the
>>>>>>>>>>> residual to create a bilinear form anyway.
>>>>>>>>>>>
>>>>>>>>>>> Incidentally, there is no particular reason to believe that
>>>>>>>>>>> writing the problem in nonlinear form would be inefficient.
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>>
>>>>>>>>>>> David
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>>
>>>>>>>>>>>> Anna.
>>>>>>>>>>>>
>>>>>>>>>>>>   Dr Anna Kalogirou
>>>>>>>>>>>>   Research Fellow
>>>>>>>>>>>>   School of Mathematics
>>>>>>>>>>>>   University of Leeds
>>>>>>>>>>>>
>>>>>>>>>>>>   http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>>>>>
>>>>>>>>>>>> On 04/08/16 17:29, Stephan Kramer wrote:
>>>>>>>>>>>> > On 27/07/16 11:01, Anna Kalogirou wrote:
>>>>>>>>>>>> >> Dear all,
>>>>>>>>>>>> >>
>>>>>>>>>>>> >> I am trying to solve the system found in the attached pdf as
>>>>>>>>>>>> a mixed
>>>>>>>>>>>> >> system. I want to solve the same
>>>>>>>>>>>> >> problem as the one found here
>>>>>>>>>>>> >> <
>>>>>>>>>>>> https://bitbucket.org/annakalog/buoy2d/src/14334d3c20b9f10ed7c1246cde9e3cb6…
>>>>>>>>>>>> >,
>>>>>>>>>>>> >>
>>>>>>>>>>>> >> but with the use of Schur complements and not linear algebra.
>>>>>>>>>>>> >>
>>>>>>>>>>>> >> In a previous discussion about this problem, Lawrence
>>>>>>>>>>>> mentioned that the
>>>>>>>>>>>> >> test function for integral(lambda*Theta(x-Lp)dx) needs to be
>>>>>>>>>>>> considered
>>>>>>>>>>>> >> as coming from the real space of constant functions. Could
>>>>>>>>>>>> you please
>>>>>>>>>>>> >> elaborate on this?
>>>>>>>>>>>> >
>>>>>>>>>>>> > My guess at what Lawrence means is (it's how I would probably
>>>>>>>>>>>> approach
>>>>>>>>>>>> > it), is that you add an additional equation that says
>>>>>>>>>>>> >
>>>>>>>>>>>> >  (1)  I = integral(lambda*Theta(x-Lp)dx)
>>>>>>>>>>>> >
>>>>>>>>>>>> > and then substitute I in your third equation. Equation (1) can
>>>>>>>>>>>> > be turned into a finite element weak formulation by
>>>>>>>>>>>> considering the
>>>>>>>>>>>> > function space of functions that are constant over the entire
>>>>>>>>>>>> domain
>>>>>>>>>>>> > This function space is just 1-dimensional and therefore
>>>>>>>>>>>> equivalent to
>>>>>>>>>>>> > the space of reals R and hence we denote this function space
>>>>>>>>>>>> of
>>>>>>>>>>>> > constants simply as R. Then we can consider I to be a trial
>>>>>>>>>>>> function
>>>>>>>>>>>> > in R, and with a test function v4 in R, we can write:
>>>>>>>>>>>> >
>>>>>>>>>>>> >   v4*lambda*Theta(x-Lp)*dx == v4*I*dx/area(domain)
>>>>>>>>>>>> >
>>>>>>>>>>>> > This is a proper finite element equation that you could solve
>>>>>>>>>>>> in
>>>>>>>>>>>> > conjuction with the other equations. I believe however that
>>>>>>>>>>>> this
>>>>>>>>>>>> > function space R is not currently implemented in Firedrake.
>>>>>>>>>>>> It is
>>>>>>>>>>>> > available in fenics, and is on the wishlist.
>>>>>>>>>>>> >
>>>>>>>>>>>> > Cheers
>>>>>>>>>>>> > Stephan
>>>>>>>>>>>> >
>>>>>>>>>>>> > _______________________________________________
>>>>>>>>>>>> > firedrake mailing list
>>>>>>>>>>>> > firedrake(a)imperial.ac.uk
>>>>>>>>>>>> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> firedrake mailing list
>>>>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>> firedrake mailing list
>>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>> firedrake mailing list
>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> firedrake mailing list
>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>> firedrake mailing list
>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>
>>>>>>> _______________________________________________
>>>>>> firedrake mailing list
>>>>>> firedrake(a)imperial.ac.uk
>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>
>>>>>> _______________________________________________
>>> firedrake mailing list
>>> firedrake(a)imperial.ac.uk
>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>
>>> --
>> http://www.imperial.ac.uk/people/colin.cotter
>>
>> www.cambridge.org/9781107663916
>>
>>
>> _______________________________________________
>> firedrake mailing list
>> firedrake(a)imperial.ac.uk
>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>
>> _______________________________________________
> firedrake mailing list
> firedrake(a)imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>
>
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        Hi Anna,
Your code works for me (in the sense that it appears to run without error.
I have no idea whether the answer is right ;)
Please also note that Miklos is correct: your error is definitely from a
global firedrake install. You can tell because the paths start /usr/local.
Your previous error messages are from a local install. You can tell that
because the paths start /Users/matak . Are you sure your virtualenv is
active?
Regards,
David
On Fri, 16 Sep 2016 at 15:16 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk> wrote:
> During the past few days I have been working on my laptop (not the desktop
> at Leeds) and I don’t believe there are multiple installations of firedrake
> on this machine.
>
> Can someone please try to run my code
> <https://bitbucket.org/annakalog/buoy2d/src/673fef3466b06c98ac11f5a120ff4211…> so
> that we know for sure if the problem is in my code or related with the
> installation? Thanks.
>
>
> On 16 Sep 2016, at 14:54, Colin Cotter <colin.cotter(a)imperial.ac.uk>
> wrote:
>
> Ah yes, that tallies with Daniel Ruprecht's reports that Firedrake is part
> of the standard installation at Leeds!
>
> On 16 September 2016 at 14:53, Homolya, Miklós <m.homolya14(a)imperial.ac.uk
> > wrote:
>
> It seems that the Firedrake you're importing is a system wide
>> installation. No wonder that updating your own installation doesn't fix it.
>>
>> Get Outlook for Android <https://aka.ms/ghei36>
>>
>
>>
>>
>> On Thu, Sep 15, 2016 at 8:33 PM +0100, "Anna Kalogirou" <
>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>
>> Ok thanks, I get the error below:
>>
>> Traceback (most recent call last):
>>
>   File "buoy-swe.py", line 6, in <module>
>>     from firedrake import *
>>   File "/usr/local/lib/python2.7/site-packages/firedrake/__init__.py",
>> line 30, in <module>
>>     from assemble import *
>>   File "/usr/local/lib/python2.7/site-packages/firedrake/assemble.py",
>> line 8, in <module>
>>     import assembly_cache
>>   File
>> "/usr/local/lib/python2.7/site-packages/firedrake/assembly_cache.py", line
>> 40, in <module>
>>     import function
>>   File "/usr/local/lib/python2.7/site-packages/firedrake/function.py",
>> line 9, in <module>
>>     import assemble_expressions
>>   File
>> "/usr/local/lib/python2.7/site-packages/firedrake/assemble_expressions.py",
>> line 15, in <module>
>>     import functionspace
>>   File
>> "/usr/local/lib/python2.7/site-packages/firedrake/functionspace.py", line
>> 10, in <module>
>>     import dmplex
>> ImportError:
>> dlopen(/usr/local/lib/python2.7/site-packages/firedrake/dmplex.so, 2):
>> Library not loaded:
>> /usr/local/lib/python2.7/site-packages/petsc/lib/libpetsc.3.05.2.dylib
>>   Referenced from:
>> /usr/local/lib/python2.7/site-packages/firedrake/dmplex.so
>>   Reason: image not found
>>
> On 15 Sep 2016, at 18:21, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>
>> To give credit where it's due,
>>
>> s/Andrew's patch/Miklós's patch/
>>
>> On 15 September 2016 at 18:16, David Ham <David.Ham(a)imperial.ac.uk>
>> wrote:
>>
>> I suspect Andrew is correct. However the deeper issue is that you edited
>>> the installed file, which is never a safe thing to do. One must always edit
>>> the file in the source directory and then (if necessary) re-install.
>>>
>>> Anyway, I have committed Andrew's patch to the repository, so hopefully
>>> the problem will go away if you do a git update.
>>>
>>> Regards,
>>>
>>> David
>>>
>>> On Wed, 14 Sep 2016 at 18:39 Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>> wrote:
>>>
>>>> Probably related to installing Firedrake in development mode or not.
>>>>
>>>> I can't help any further here; I don't know if someone else can.
>>>>
>>>> On 14 September 2016 at 16:13, Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
>>>> wrote:
>>>>
>>>>> Ok, so I replace line 3366 in file “
>>>>> /Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py”
>>>>> with the suggested patch, but I now get the error below.
>>>>>
>>>>> Note that the error I get comes from file
>>>>> firedrake/lib/python2.7/site-packages/pyop2/base.py
>>>>> while in the reported issue the error comes from
>>>>> firedrake/src/PyOP2/pyop2/base.py
>>>>> so the two might not be related after all.
>>>>>
>>>>> Thanks,
>>>>> Anna.
>>>>>
>>>>
>>>>>
>>>>> Traceback (most recent call last):
>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0, W0,
>>>>> step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>   File
>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>> system/solvers.py", line 41, in solver_F
>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>> solver_parameters=solvers_print)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>> line 264, in __init__
>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>> line 127, in __init__
>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>> line 107, in __init__
>>>>>     for problem in problems)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>> line 107, in <genexpr>
>>>>>     for problem in problems)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>> line 67, in assemble
>>>>>     inverse=inverse, nest=nest)
>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>> line 62, in wrapper
>>>>>     return f(*args, **kwargs)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>> line 179, in _assemble
>>>>>     nest=nest)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>> line 118, in __call__
>>>>>     return t(*args, **kwargs)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>> 122, in __new__
>>>>>     args, kwargs = cls._process_args(*args, **kwargs)
>>>>>   File "<decorator-gen-258>", line 2, in _process_args
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>> 130, in wrapper
>>>>>     return f(*args, **kwargs)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>> 3592, in _process_args
>>>>>     if not (pair[0].toset == dsets[0].set and
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>> 64, in __get__
>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>> 3373, in toset
>>>>>     m.toset for m in self._maps))
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>> 156, in __new__
>>>>>     obj = make_obj()
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>> 137, in make_obj
>>>>>     obj.__init__(*args, **kwargs)
>>>>>   File
>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>> 977, in __init__
>>>>>     "All components of a MixedSet must have the same number of layers."
>>>>> AssertionError: All components of a MixedSet must have the same number
>>>>> of layers.
>>>>>
>>>>
>>>>> **********************************************************
>>>>>
>>>>
>>>>> Dr Anna Kalogirou
>>>>> Research Fellow
>>>>>
>>>> Department of Applied Mathematics
>>>>> University of Leeds
>>>>>
>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>
>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>
>>>>> **********************************************************
>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>
>>>>> **********************************************************
>>>>>
>>>>>
>>>>> On 14 Sep 2016, at 16:00, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>>>>
>>>>> Not as a branch, but you can change PyOP2 locally using the code at
>>>>> the bottom of that post, "Suggested patch"
>>>>>
>>>>> On 14 September 2016 at 15:54, Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk
>>>>> > wrote:
>>>>>
>>>>> Hi Andrew,
>>>>>>
>>>>>> Yes indeed, the two might be related. Was there a fix for the issue
>>>>>> reported on github?
>>>>>>
>>>>>> Best, Anna.
>>>>>>
>>>>>>
>>>>>> **********************************************************
>>>>>>
>>>>>
>>>>>> Dr Anna Kalogirou
>>>>>> Research Fellow
>>>>>>
>>>>> Department of Applied Mathematics
>>>>>> University of Leeds
>>>>>>
>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>
>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>
>>>>>> **********************************************************
>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>
>>>>>> **********************************************************
>>>>>>
>>>>>>
>>>>>> On 13 Sep 2016, at 16:34, Andrew McRae <A.T.T.McRae(a)bath.ac.uk>
>>>>>> wrote:
>>>>>>
>>>>>> Probably related to
>>>>>> https://github.com/firedrakeproject/firedrake/issues/862 (third
>>>>>> post, not first).  You might be able to adapt the fix; I haven't looked in
>>>>>> detail.
>>>>>>
>>>>>> On 12 September 2016 at 16:34, Anna Kalogirou <
>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>
>>>>>> Dear all,
>>>>>>>
>>>>>>> Regarding the problem described in my email sent of Friday, I fixed
>>>>>>> a minor typo and now get the error below. Any ideas what might be causing
>>>>>>> it? Thanks!
>>>>>>>
>>>>>>> Best, Anna.
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>   File
>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>> solver_parameters=solvers_print)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>> line 264, in __init__
>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>> line 127, in __init__
>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>> line 107, in __init__
>>>>>>>     for problem in problems)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>> line 107, in <genexpr>
>>>>>>>     for problem in problems)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>> line 67, in assemble
>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>> line 62, in wrapper
>>>>>>>     return f(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>> line 163, in _assemble
>>>>>>>     map_pairs.append((op2.DecoratedMap(test.cell_node_map(),
>>>>>>> cell_domains),
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/functionspaceimpl.py",
>>>>>>> line 646, in cell_node_map
>>>>>>>     for i, s in enumerate(self._spaces))
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>>>> line 118, in __call__
>>>>>>>     return t(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 156, in __new__
>>>>>>>     obj = make_obj()
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 137, in make_obj
>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 3342, in __init__
>>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>>> self._maps):
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 3342, in <genexpr>
>>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>>> self._maps):
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line
>>>>>>> 64, in __get__
>>>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 3366, in iterset
>>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b if
>>>>>>> b is None else b.iterset, self._maps)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 3366, in <lambda>
>>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b if
>>>>>>> b is None else b.iterset, self._maps)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py", line
>>>>>>> 799, in __getattr__
>>>>>>>     return getattr(self._parent, name)
>>>>>>> AttributeError: 'Set' object has no attribute ‘iterset'
>>>>>>>
>>>>>>>
>>>>>>> **********************************************************
>>>>>>>
>>>>>>
>>>>>>> Dr Anna Kalogirou
>>>>>>> Research Fellow
>>>>>>>
>>>>>> Department of Applied Mathematics
>>>>>>> University of Leeds
>>>>>>>
>>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>
>>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>>
>>>>>>> **********************************************************
>>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>>
>>>>>>> **********************************************************
>>>>>>>
>>>>>>>
>>>>>>> On 9 Sep 2016, at 17:37, Anna Kalogirou <a.kalogirou(a)leeds.ac.uk>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Hi David,
>>>>>>>
>>>>>>> I have tried to implement my problem (attached) using the real
>>>>>>> function spaces but I get the error below. The code can be found
>>>>>>> here
>>>>>>> <https://bitbucket.org/annakalog/buoy2d/src/d6a805b6a8d0/Mixed%20system/?at=…>
>>>>>>> .
>>>>>>>
>>>>>>> I define the real space by V_R = FunctionSpace(mesh, "R", 0). Is
>>>>>>> that correct?
>>>>>>> Also, is it a problem that the linear part of the variational form
>>>>>>> does not depend on one of the test functions from the mixed function space
>>>>>>> (only depends on v1, v2, v3 and not v4)?
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Anna.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>>   File
>>>>>>> "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>>> solver_parameters=solvers_print)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>> line 264, in __init__
>>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>>> line 127, in __init__
>>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>> line 107, in __init__
>>>>>>>     for problem in problems)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>>> line 107, in <genexpr>
>>>>>>>     for problem in problems)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>> line 67, in assemble
>>>>>>>     inverse=inverse, nest=nest)
>>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>>> line 62, in wrapper
>>>>>>>     return f(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>>> line 101, in _assemble
>>>>>>>     inverse=inverse)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>>> line 307, in compile_form
>>>>>>>     number_map).kernels
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 198, in __new__
>>>>>>>     obj = make_obj()
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line
>>>>>>> 188, in make_obj
>>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>>> line 212, in __init__
>>>>>>>     tree = tsfc_compile_form(form, prefix=name,
>>>>>>> parameters=parameters)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/tsfc/driver.py", line
>>>>>>> 47, in compile_form
>>>>>>>     do_estimate_degrees=True)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/compute_form_data.py",
>>>>>>> line 386, in compute_form_data
>>>>>>>     check_form_arity(preprocessed_form,
>>>>>>> self.original_form.arguments())  # Currently testing how fast this is
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>> line 152, in check_form_arity
>>>>>>>     check_integrand_arity(itg.integrand(), arguments)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>> line 145, in check_integrand_arity
>>>>>>>     args = map_expr_dag(rules, expr, compress=False)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>>> line 37, in map_expr_dag
>>>>>>>     result, = map_expr_dags(function, [expression],
>>>>>>> compress=compress)
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>>> line 86, in map_expr_dags
>>>>>>>     r = handlers[v._ufl_typecode_](v, *[vcache[u] for u in
>>>>>>> v.ufl_operands])
>>>>>>>   File
>>>>>>> "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>>> line 42, in sum
>>>>>>>     raise ArityMismatch("Adding expressions with non-matching form
>>>>>>> arguments {0} vs {1}.".format(a, b))
>>>>>>> ufl.algorithms.check_arities.ArityMismatch: Adding expressions with
>>>>>>> non-matching form arguments () vs
>>>>>>> (Argument(WithGeometry(IndexedProxyFunctionSpace(<firedrake.mesh.ExtrudedMeshTopology
>>>>>>> object at 0x113e6b890>, TensorProductElement(FiniteElement('Lagrange',
>>>>>>> interval, 1), FiniteElement('Lagrange', interval, 1),
>>>>>>> cell=TensorProductCell(interval, interval)), name=None, index=0,
>>>>>>> component=None),
>>>>>>> Mesh(VectorElement(TensorProductElement(FiniteElement('Lagrange', interval,
>>>>>>> 1), FiniteElement('Lagrange', interval, 1),
>>>>>>> cell=TensorProductCell(interval, interval)), dim=2), 4)), 1, None),).
>>>>>>> <coupled_system.pdf>
>>>>>>>
>>>>>>> On 18 Aug 2016, at 16:03, David Ham <david.ham(a)imperial.ac.uk>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Anna,
>>>>>>>
>>>>>>> Real function spaces now pass some simple tests, at least on my
>>>>>>> machine. You need the real-function-space branch of firedrake, and the
>>>>>>> globals_matrices branch of PyOP2. It's not going to get merged before I
>>>>>>> disappear for a week - not least because I need to update documentation.
>>>>>>> However you should be able to test it out on the branches.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> On Wed, 10 Aug 2016 at 16:58 David Ham <David.Ham(a)imperial.ac.uk>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Unfortunately, It isn't as simple as saying "no mpi". MPI pervades
>>>>>>>> Firedrake. Unless real function spaces play nicely with communicators,
>>>>>>>> Firedrake will simply crash. I'm sorry that this feature is not available
>>>>>>>> right now, but it actually does require significant work.
>>>>>>>>
>>>>>>>> On Wed, 10 Aug 2016 at 16:51 Anna Kalogirou <
>>>>>>>> A.Kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>
>>>>>>>>> Yes indeed, but I believe David would want to make it work for all
>>>>>>>>> cases. The merge is necessary in order to proceed with my simulations, so
>>>>>>>>> an update as soon as possible would be greatly appreciated.
>>>>>>>>>
>>>>>>>>> Best, Anna.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 10 Aug 2016, at 16:29, Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> We would already be helped for the case without MPI, I think that
>>>>>>>>> is correct, Anna?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>>
>>>>>>>>> *Sent:* Wednesday, August 10, 2016 10:01 AM
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *To:* firedrake
>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>
>>>>>>>>> The short version is it depends on when I find some time to work
>>>>>>>>> on it. It is not simply the case that we have new features lying around
>>>>>>>>> waiting to be merged. The current proximate issue is to make the real
>>>>>>>>> spaces work properly with MPI communicators. I can't guarantee that will be
>>>>>>>>> the last issue.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, 9 Aug 2016 at 17:37 Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> It is possible to merge the branch for the mixed system
>>>>>>>>>> relatively soon?
>>>>>>>>>> Anna's results are relevant for the grant application Colin and I
>>>>>>>>>> aim to submit in Sept. on further wave-ship modelling.
>>>>>>>>>> Sorry for asking!
>>>>>>>>>> ------------------------------
>>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>>> *Sent:* Friday, August 5, 2016 11:37:23 AM
>>>>>>>>>> *To:* firedrake
>>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Fri, 5 Aug 2016 at 11:31 Anna Kalogirou <
>>>>>>>>>> a.kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Kramer,
>>>>>>>>>>>
>>>>>>>>>>> Thank you for the reply.
>>>>>>>>>>>
>>>>>>>>>>> The only problem I see with the solution you suggest, is that
>>>>>>>>>>> both I and
>>>>>>>>>>> lambda will be trial functions, so both terms should be on the
>>>>>>>>>>> bilinear
>>>>>>>>>>> part of the variational form.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Not quite. I and lambda together form a Function in a mixed
>>>>>>>>>> finite element space. You solve for both of them together, just like
>>>>>>>>>> pressure and velocity in a fluid simulation.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I could, of course, define a residual and solve everything using
>>>>>>>>>>> nonlinear solvers, but I don't know how efficient that would be.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I think you are confused. None of the relevant issues change in
>>>>>>>>>> the nonlinear case. After all, the nonlinear solver will differentiate the
>>>>>>>>>> residual to create a bilinear form anyway.
>>>>>>>>>>
>>>>>>>>>> Incidentally, there is no particular reason to believe that
>>>>>>>>>> writing the problem in nonlinear form would be inefficient.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>>
>>>>>>>>>>> Anna.
>>>>>>>>>>>
>>>>>>>>>>>   Dr Anna Kalogirou
>>>>>>>>>>>   Research Fellow
>>>>>>>>>>>   School of Mathematics
>>>>>>>>>>>   University of Leeds
>>>>>>>>>>>
>>>>>>>>>>>   http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>>>>
>>>>>>>>>>> On 04/08/16 17:29, Stephan Kramer wrote:
>>>>>>>>>>> > On 27/07/16 11:01, Anna Kalogirou wrote:
>>>>>>>>>>> >> Dear all,
>>>>>>>>>>> >>
>>>>>>>>>>> >> I am trying to solve the system found in the attached pdf as
>>>>>>>>>>> a mixed
>>>>>>>>>>> >> system. I want to solve the same
>>>>>>>>>>> >> problem as the one found here
>>>>>>>>>>> >> <
>>>>>>>>>>> https://bitbucket.org/annakalog/buoy2d/src/14334d3c20b9f10ed7c1246cde9e3cb6…
>>>>>>>>>>> >,
>>>>>>>>>>> >>
>>>>>>>>>>> >> but with the use of Schur complements and not linear algebra.
>>>>>>>>>>> >>
>>>>>>>>>>> >> In a previous discussion about this problem, Lawrence
>>>>>>>>>>> mentioned that the
>>>>>>>>>>> >> test function for integral(lambda*Theta(x-Lp)dx) needs to be
>>>>>>>>>>> considered
>>>>>>>>>>> >> as coming from the real space of constant functions. Could
>>>>>>>>>>> you please
>>>>>>>>>>> >> elaborate on this?
>>>>>>>>>>> >
>>>>>>>>>>> > My guess at what Lawrence means is (it's how I would probably
>>>>>>>>>>> approach
>>>>>>>>>>> > it), is that you add an additional equation that says
>>>>>>>>>>> >
>>>>>>>>>>> >  (1)  I = integral(lambda*Theta(x-Lp)dx)
>>>>>>>>>>> >
>>>>>>>>>>> > and then substitute I in your third equation. Equation (1) can
>>>>>>>>>>> > be turned into a finite element weak formulation by
>>>>>>>>>>> considering the
>>>>>>>>>>> > function space of functions that are constant over the entire
>>>>>>>>>>> domain
>>>>>>>>>>> > This function space is just 1-dimensional and therefore
>>>>>>>>>>> equivalent to
>>>>>>>>>>> > the space of reals R and hence we denote this function space of
>>>>>>>>>>> > constants simply as R. Then we can consider I to be a trial
>>>>>>>>>>> function
>>>>>>>>>>> > in R, and with a test function v4 in R, we can write:
>>>>>>>>>>> >
>>>>>>>>>>> >   v4*lambda*Theta(x-Lp)*dx == v4*I*dx/area(domain)
>>>>>>>>>>> >
>>>>>>>>>>> > This is a proper finite element equation that you could solve
>>>>>>>>>>> in
>>>>>>>>>>> > conjuction with the other equations. I believe however that
>>>>>>>>>>> this
>>>>>>>>>>> > function space R is not currently implemented in Firedrake. It
>>>>>>>>>>> is
>>>>>>>>>>> > available in fenics, and is on the wishlist.
>>>>>>>>>>> >
>>>>>>>>>>> > Cheers
>>>>>>>>>>> > Stephan
>>>>>>>>>>> >
>>>>>>>>>>> > _______________________________________________
>>>>>>>>>>> > firedrake mailing list
>>>>>>>>>>> > firedrake(a)imperial.ac.uk
>>>>>>>>>>> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> firedrake mailing list
>>>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>> firedrake mailing list
>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>> firedrake mailing list
>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> firedrake mailing list
>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>
>>>>>>> _______________________________________________
>>>>>> firedrake mailing list
>>>>>> firedrake(a)imperial.ac.uk
>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>
>>>>>> _______________________________________________
>>>>> firedrake mailing list
>>>>> firedrake(a)imperial.ac.uk
>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>
>>>>> _______________________________________________
>> firedrake mailing list
>> firedrake(a)imperial.ac.uk
>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>
>> --
> http://www.imperial.ac.uk/people/colin.cotter
>
> www.cambridge.org/9781107663916
>
>
> _______________________________________________
> firedrake mailing list
> firedrake(a)imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        Ah yes, that tallies with Daniel Ruprecht's reports that Firedrake is part
of the standard installation at Leeds!
On 16 September 2016 at 14:53, Homolya, Miklós <m.homolya14(a)imperial.ac.uk>
wrote:
> It seems that the Firedrake you're importing is a system wide
> installation. No wonder that updating your own installation doesn't fix it.
>
> Get Outlook for Android <https://aka.ms/ghei36>
>
>
>
> On Thu, Sep 15, 2016 at 8:33 PM +0100, "Anna Kalogirou" <
> A.Kalogirou(a)leeds.ac.uk> wrote:
>
> Ok thanks, I get the error below:
>
> Traceback (most recent call last):
>   File "buoy-swe.py", line 6, in <module>
>     from firedrake import *
>   File "/usr/local/lib/python2.7/site-packages/firedrake/__init__.py",
> line 30, in <module>
>     from assemble import *
>   File "/usr/local/lib/python2.7/site-packages/firedrake/assemble.py",
> line 8, in <module>
>     import assembly_cache
>   File "/usr/local/lib/python2.7/site-packages/firedrake/assembly_cache.py",
> line 40, in <module>
>     import function
>   File "/usr/local/lib/python2.7/site-packages/firedrake/function.py",
> line 9, in <module>
>     import assemble_expressions
>   File "/usr/local/lib/python2.7/site-packages/firedrake/assemble_expressions.py",
> line 15, in <module>
>     import functionspace
>   File "/usr/local/lib/python2.7/site-packages/firedrake/functionspace.py",
> line 10, in <module>
>     import dmplex
> ImportError: dlopen(/usr/local/lib/python2.7/site-packages/firedrake/dmplex.so,
> 2): Library not loaded: /usr/local/lib/python2.7/site-
> packages/petsc/lib/libpetsc.3.05.2.dylib
>   Referenced from: /usr/local/lib/python2.7/site-
> packages/firedrake/dmplex.so
>   Reason: image not found
>
>
>
> On 15 Sep 2016, at 18:21, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>
> To give credit where it's due,
>
> s/Andrew's patch/Miklós's patch/
>
> On 15 September 2016 at 18:16, David Ham <David.Ham(a)imperial.ac.uk> wrote:
>
>> I suspect Andrew is correct. However the deeper issue is that you edited
>> the installed file, which is never a safe thing to do. One must always edit
>> the file in the source directory and then (if necessary) re-install.
>>
>> Anyway, I have committed Andrew's patch to the repository, so hopefully
>> the problem will go away if you do a git update.
>>
>> Regards,
>>
>> David
>>
>> On Wed, 14 Sep 2016 at 18:39 Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>
>>> Probably related to installing Firedrake in development mode or not.
>>>
>>> I can't help any further here; I don't know if someone else can.
>>>
>>> On 14 September 2016 at 16:13, Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
>>> wrote:
>>>
>>>> Ok, so I replace line 3366 in file “/Users/matak/firedrake/lib/py
>>>> thon2.7/site-packages/pyop2/base.py” with the suggested patch, but I
>>>> now get the error below.
>>>>
>>>> Note that the error I get comes from file firedrake/lib/python2.7/s
>>>> ite-packages/pyop2/base.py
>>>> while in the reported issue the error comes from
>>>> firedrake/src/PyOP2/pyop2/base.py
>>>> so the two might not be related after all.
>>>>
>>>> Thanks,
>>>> Anna.
>>>>
>>>
>>>>
>>>> Traceback (most recent call last):
>>>>   File "buoy-swe.py", line 89, in <module>
>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0, W0,
>>>> step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>   File "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>> system/solvers.py", line 41, in solver_F
>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>> solver_parameters=solvers_print)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>> line 264, in __init__
>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>> line 127, in __init__
>>>>     ctx = solving_utils._SNESContext(problem)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>> line 107, in __init__
>>>>     for problem in problems)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>> line 107, in <genexpr>
>>>>     for problem in problems)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>> line 67, in assemble
>>>>     inverse=inverse, nest=nest)
>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>> line 62, in wrapper
>>>>     return f(*args, **kwargs)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>> line 179, in _assemble
>>>>     nest=nest)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>> line 118, in __call__
>>>>     return t(*args, **kwargs)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>> line 122, in __new__
>>>>     args, kwargs = cls._process_args(*args, **kwargs)
>>>>   File "<decorator-gen-258>", line 2, in _process_args
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py",
>>>> line 130, in wrapper
>>>>     return f(*args, **kwargs)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>> line 3592, in _process_args
>>>>     if not (pair[0].toset == dsets[0].set and
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py",
>>>> line 64, in __get__
>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>> line 3373, in toset
>>>>     m.toset for m in self._maps))
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>> line 156, in __new__
>>>>     obj = make_obj()
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>> line 137, in make_obj
>>>>     obj.__init__(*args, **kwargs)
>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>> line 977, in __init__
>>>>     "All components of a MixedSet must have the same number of layers."
>>>> AssertionError: All components of a MixedSet must have the same number
>>>> of layers.
>>>>
>>>
>>>> **********************************************************
>>>>
>>>
>>>> Dr Anna Kalogirou
>>>> Research Fellow
>>>>
>>> Department of Applied Mathematics
>>>> University of Leeds
>>>>
>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>
>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>
>>>> **********************************************************
>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>
>>>> **********************************************************
>>>>
>>>>
>>>> On 14 Sep 2016, at 16:00, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>>>
>>>> Not as a branch, but you can change PyOP2 locally using the code at the
>>>> bottom of that post, "Suggested patch"
>>>>
>>>> On 14 September 2016 at 15:54, Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
>>>> wrote:
>>>>
>>>> Hi Andrew,
>>>>>
>>>>> Yes indeed, the two might be related. Was there a fix for the issue
>>>>> reported on github?
>>>>>
>>>>> Best, Anna.
>>>>>
>>>>>
>>>>> **********************************************************
>>>>>
>>>>
>>>>> Dr Anna Kalogirou
>>>>> Research Fellow
>>>>>
>>>> Department of Applied Mathematics
>>>>> University of Leeds
>>>>>
>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>
>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>
>>>>> **********************************************************
>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>
>>>>> **********************************************************
>>>>>
>>>>>
>>>>> On 13 Sep 2016, at 16:34, Andrew McRae <A.T.T.McRae(a)bath.ac.uk> wrote:
>>>>>
>>>>> Probably related to https://github.com/firedrakepr
>>>>> oject/firedrake/issues/862 (third post, not first).  You might be
>>>>> able to adapt the fix; I haven't looked in detail.
>>>>>
>>>>> On 12 September 2016 at 16:34, Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk
>>>>> > wrote:
>>>>>
>>>>> Dear all,
>>>>>>
>>>>>> Regarding the problem described in my email sent of Friday, I fixed a
>>>>>> minor typo and now get the error below. Any ideas what might be causing it?
>>>>>> Thanks!
>>>>>>
>>>>>> Best, Anna.
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>   File "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>> solver_parameters=solvers_print)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>> line 264, in __init__
>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>> line 127, in __init__
>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>> line 107, in __init__
>>>>>>     for problem in problems)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>> line 107, in <genexpr>
>>>>>>     for problem in problems)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>> line 67, in assemble
>>>>>>     inverse=inverse, nest=nest)
>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>> line 62, in wrapper
>>>>>>     return f(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>> line 163, in _assemble
>>>>>>     map_pairs.append((op2.DecoratedMap(test.cell_node_map(),
>>>>>> cell_domains),
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/functionspaceimpl.py",
>>>>>> line 646, in cell_node_map
>>>>>>     for i, s in enumerate(self._spaces))
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/backends.py",
>>>>>> line 118, in __call__
>>>>>>     return t(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>>>> line 156, in __new__
>>>>>>     obj = make_obj()
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>>>> line 137, in make_obj
>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>>>> line 3342, in __init__
>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>> self._maps):
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>>>> line 3342, in <genexpr>
>>>>>>     if not all(m is None or m.iterset == self.iterset for m in
>>>>>> self._maps):
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/utils.py",
>>>>>> line 64, in __get__
>>>>>>     obj.__dict__[self.__name__] = result = self.fget(obj)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>>>> line 3366, in iterset
>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b if
>>>>>> b is None else b.iterset, self._maps)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>>>> line 3366, in <lambda>
>>>>>>     return reduce(lambda a, b: a if a is None else a.iterset or b if
>>>>>> b is None else b.iterset, self._maps)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/base.py",
>>>>>> line 799, in __getattr__
>>>>>>     return getattr(self._parent, name)
>>>>>> AttributeError: 'Set' object has no attribute ‘iterset'
>>>>>>
>>>>>>
>>>>>> **********************************************************
>>>>>>
>>>>>
>>>>>> Dr Anna Kalogirou
>>>>>> Research Fellow
>>>>>>
>>>>> Department of Applied Mathematics
>>>>>> University of Leeds
>>>>>>
>>>>>> Web: http://www1.maths.leeds.ac.uk/~matak/
>>>>>>
>>>>> Youtube: https://www.youtube.com/channel/UCUZAYHtVoiMqepQflisp66g
>>>>>>
>>>>>> **********************************************************
>>>>>> Leverhulme Trust Early Career Fellow 2017-2019
>>>>>>
>>>>>> **********************************************************
>>>>>>
>>>>>>
>>>>>> On 9 Sep 2016, at 17:37, Anna Kalogirou <a.kalogirou(a)leeds.ac.uk>
>>>>>> wrote:
>>>>>>
>>>>>> Hi David,
>>>>>>
>>>>>> I have tried to implement my problem (attached) using the real
>>>>>> function spaces but I get the error below. The code can be found here
>>>>>> <https://bitbucket.org/annakalog/buoy2d/src/d6a805b6a8d0/Mixed%20system/?at=…>
>>>>>> .
>>>>>>
>>>>>> I define the real space by V_R = FunctionSpace(mesh, "R", 0). Is
>>>>>> that correct?
>>>>>> Also, is it a problem that the linear part of the variational form
>>>>>> does not depend on one of the test functions from the mixed function space
>>>>>> (only depends on v1, v2, v3 and not v4)?
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Anna.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>   File "buoy-swe.py", line 89, in <module>
>>>>>>     F_solver = solver_F(phi0_5, eta1, mu0_5, I, w, phi0, eta0, Z0,
>>>>>> W0, step_b, etaR, phi_t, eta_t, mu_t, I_t, v1, v2, v3, v4, dt, Hb, H0, L,
>>>>>> dR_dt, g, rho, Mass, solvers_print);
>>>>>>   File "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Mixed
>>>>>> system/solvers.py", line 41, in solver_F
>>>>>>     F_solver = LinearVariationalSolver(F_problem,
>>>>>> solver_parameters=solvers_print)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>> line 264, in __init__
>>>>>>     super(LinearVariationalSolver, self).__init__(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py",
>>>>>> line 127, in __init__
>>>>>>     ctx = solving_utils._SNESContext(problem)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>> line 107, in __init__
>>>>>>     for problem in problems)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py",
>>>>>> line 107, in <genexpr>
>>>>>>     for problem in problems)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>> line 67, in assemble
>>>>>>     inverse=inverse, nest=nest)
>>>>>>   File "<decorator-gen-294>", line 2, in _assemble
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/utils.py",
>>>>>> line 62, in wrapper
>>>>>>     return f(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/assemble.py",
>>>>>> line 101, in _assemble
>>>>>>     inverse=inverse)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>> line 307, in compile_form
>>>>>>     number_map).kernels
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>>>> line 198, in __new__
>>>>>>     obj = make_obj()
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/pyop2/caching.py",
>>>>>> line 188, in make_obj
>>>>>>     obj.__init__(*args, **kwargs)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py",
>>>>>> line 212, in __init__
>>>>>>     tree = tsfc_compile_form(form, prefix=name, parameters=parameters)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/tsfc/driver.py",
>>>>>> line 47, in compile_form
>>>>>>     do_estimate_degrees=True)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/compute_form_data.py",
>>>>>> line 386, in compute_form_data
>>>>>>     check_form_arity(preprocessed_form,
>>>>>> self.original_form.arguments())  # Currently testing how fast this is
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>> line 152, in check_form_arity
>>>>>>     check_integrand_arity(itg.integrand(), arguments)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>> line 145, in check_integrand_arity
>>>>>>     args = map_expr_dag(rules, expr, compress=False)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>> line 37, in map_expr_dag
>>>>>>     result, = map_expr_dags(function, [expression], compress=compress)
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/corealg/map_dag.py",
>>>>>> line 86, in map_expr_dags
>>>>>>     r = handlers[v._ufl_typecode_](v, *[vcache[u] for u in
>>>>>> v.ufl_operands])
>>>>>>   File "/Users/matak/firedrake/lib/python2.7/site-packages/ufl/algorithms/check_arities.py",
>>>>>> line 42, in sum
>>>>>>     raise ArityMismatch("Adding expressions with non-matching form
>>>>>> arguments {0} vs {1}.".format(a, b))
>>>>>> ufl.algorithms.check_arities.ArityMismatch: Adding expressions with
>>>>>> non-matching form arguments () vs (Argument(WithGeometry(Indexed
>>>>>> ProxyFunctionSpace(<firedrake.mesh.ExtrudedMeshTopology object at
>>>>>> 0x113e6b890>, TensorProductElement(FiniteElement('Lagrange',
>>>>>> interval, 1), FiniteElement('Lagrange', interval, 1),
>>>>>> cell=TensorProductCell(interval, interval)), name=None, index=0,
>>>>>> component=None), Mesh(VectorElement(TensorProdu
>>>>>> ctElement(FiniteElement('Lagrange', interval, 1),
>>>>>> FiniteElement('Lagrange', interval, 1), cell=TensorProductCell(interval,
>>>>>> interval)), dim=2), 4)), 1, None),).
>>>>>> <coupled_system.pdf>
>>>>>>
>>>>>> On 18 Aug 2016, at 16:03, David Ham <david.ham(a)imperial.ac.uk> wrote:
>>>>>>
>>>>>> Hi Anna,
>>>>>>
>>>>>> Real function spaces now pass some simple tests, at least on my
>>>>>> machine. You need the real-function-space branch of firedrake, and the
>>>>>> globals_matrices branch of PyOP2. It's not going to get merged before I
>>>>>> disappear for a week - not least because I need to update documentation.
>>>>>> However you should be able to test it out on the branches.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On Wed, 10 Aug 2016 at 16:58 David Ham <David.Ham(a)imperial.ac.uk>
>>>>>> wrote:
>>>>>>
>>>>>>> Unfortunately, It isn't as simple as saying "no mpi". MPI pervades
>>>>>>> Firedrake. Unless real function spaces play nicely with communicators,
>>>>>>> Firedrake will simply crash. I'm sorry that this feature is not available
>>>>>>> right now, but it actually does require significant work.
>>>>>>>
>>>>>>> On Wed, 10 Aug 2016 at 16:51 Anna Kalogirou <A.Kalogirou(a)leeds.ac.uk>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Yes indeed, but I believe David would want to make it work for all
>>>>>>>> cases. The merge is necessary in order to proceed with my simulations, so
>>>>>>>> an update as soon as possible would be greatly appreciated.
>>>>>>>>
>>>>>>>> Best, Anna.
>>>>>>>>
>>>>>>>>
>>>>>>>> On 10 Aug 2016, at 16:29, Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> We would already be helped for the case without MPI, I think that
>>>>>>>> is correct, Anna?
>>>>>>>>
>>>>>>>>
>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <
>>>>>>>> firedrake-bounces(a)imperial.ac.uk> on behalf of David Ham <
>>>>>>>> David.Ham(a)imperial.ac.uk>
>>>>>>>>
>>>>>>>> *Sent:* Wednesday, August 10, 2016 10:01 AM
>>>>>>>>
>>>>>>>>
>>>>>>>> *To:* firedrake
>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>
>>>>>>>> The short version is it depends on when I find some time to work on
>>>>>>>> it. It is not simply the case that we have new features lying around
>>>>>>>> waiting to be merged. The current proximate issue is to make the real
>>>>>>>> spaces work properly with MPI communicators. I can't guarantee that will be
>>>>>>>> the last issue.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, 9 Aug 2016 at 17:37 Onno Bokhove <O.Bokhove(a)leeds.ac.uk>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> It is possible to merge the branch for the mixed system
>>>>>>>>> relatively soon?
>>>>>>>>> Anna's results are relevant for the grant application Colin and I
>>>>>>>>> aim to submit in Sept. on further wave-ship modelling.
>>>>>>>>> Sorry for asking!
>>>>>>>>> ------------------------------
>>>>>>>>> *From:* firedrake-bounces(a)imperial.ac.uk <firedrake-bounces@
>>>>>>>>> imperial.ac.uk> on behalf of David Ham <David.Ham(a)imperial.ac.uk>
>>>>>>>>> *Sent:* Friday, August 5, 2016 11:37:23 AM
>>>>>>>>> *To:* firedrake
>>>>>>>>> *Subject:* Re: [firedrake] Mixed system
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, 5 Aug 2016 at 11:31 Anna Kalogirou <
>>>>>>>>> a.kalogirou(a)leeds.ac.uk> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Kramer,
>>>>>>>>>>
>>>>>>>>>> Thank you for the reply.
>>>>>>>>>>
>>>>>>>>>> The only problem I see with the solution you suggest, is that
>>>>>>>>>> both I and
>>>>>>>>>> lambda will be trial functions, so both terms should be on the
>>>>>>>>>> bilinear
>>>>>>>>>> part of the variational form.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Not quite. I and lambda together form a Function in a mixed finite
>>>>>>>>> element space. You solve for both of them together, just like pressure and
>>>>>>>>> velocity in a fluid simulation.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I could, of course, define a residual and solve everything using
>>>>>>>>>> nonlinear solvers, but I don't know how efficient that would be.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I think you are confused. None of the relevant issues change in
>>>>>>>>> the nonlinear case. After all, the nonlinear solver will differentiate the
>>>>>>>>> residual to create a bilinear form anyway.
>>>>>>>>>
>>>>>>>>> Incidentally, there is no particular reason to believe that
>>>>>>>>> writing the problem in nonlinear form would be inefficient.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>>
>>>>>>>>>> Anna.
>>>>>>>>>>
>>>>>>>>>>   Dr Anna Kalogirou
>>>>>>>>>>   Research Fellow
>>>>>>>>>>   School of Mathematics
>>>>>>>>>>   University of Leeds
>>>>>>>>>>
>>>>>>>>>>   http://www1.maths.leeds.ac.uk/~matak/
>>>>>>>>>>
>>>>>>>>>> On 04/08/16 17:29, Stephan Kramer wrote:
>>>>>>>>>> > On 27/07/16 11:01, Anna Kalogirou wrote:
>>>>>>>>>> >> Dear all,
>>>>>>>>>> >>
>>>>>>>>>> >> I am trying to solve the system found in the attached pdf as a
>>>>>>>>>> mixed
>>>>>>>>>> >> system. I want to solve the same
>>>>>>>>>> >> problem as the one found here
>>>>>>>>>> >> <https://bitbucket.org/annakalog/buoy2d/src/14334d3c20b9f10e
>>>>>>>>>> d7c1246cde9e3cb60b1c75e4/Inequality%20constraint/?at=master>,
>>>>>>>>>> >>
>>>>>>>>>> >> but with the use of Schur complements and not linear algebra.
>>>>>>>>>> >>
>>>>>>>>>> >> In a previous discussion about this problem, Lawrence
>>>>>>>>>> mentioned that the
>>>>>>>>>> >> test function for integral(lambda*Theta(x-Lp)dx) needs to be
>>>>>>>>>> considered
>>>>>>>>>> >> as coming from the real space of constant functions. Could you
>>>>>>>>>> please
>>>>>>>>>> >> elaborate on this?
>>>>>>>>>> >
>>>>>>>>>> > My guess at what Lawrence means is (it's how I would probably
>>>>>>>>>> approach
>>>>>>>>>> > it), is that you add an additional equation that says
>>>>>>>>>> >
>>>>>>>>>> >  (1)  I = integral(lambda*Theta(x-Lp)dx)
>>>>>>>>>> >
>>>>>>>>>> > and then substitute I in your third equation. Equation (1) can
>>>>>>>>>> > be turned into a finite element weak formulation by considering
>>>>>>>>>> the
>>>>>>>>>> > function space of functions that are constant over the entire
>>>>>>>>>> domain
>>>>>>>>>> > This function space is just 1-dimensional and therefore
>>>>>>>>>> equivalent to
>>>>>>>>>> > the space of reals R and hence we denote this function space of
>>>>>>>>>> > constants simply as R. Then we can consider I to be a trial
>>>>>>>>>> function
>>>>>>>>>> > in R, and with a test function v4 in R, we can write:
>>>>>>>>>> >
>>>>>>>>>> >   v4*lambda*Theta(x-Lp)*dx == v4*I*dx/area(domain)
>>>>>>>>>> >
>>>>>>>>>> > This is a proper finite element equation that you could solve in
>>>>>>>>>> > conjuction with the other equations. I believe however that this
>>>>>>>>>> > function space R is not currently implemented in Firedrake. It
>>>>>>>>>> is
>>>>>>>>>> > available in fenics, and is on the wishlist.
>>>>>>>>>> >
>>>>>>>>>> > Cheers
>>>>>>>>>> > Stephan
>>>>>>>>>> >
>>>>>>>>>> > _______________________________________________
>>>>>>>>>> > firedrake mailing list
>>>>>>>>>> > firedrake(a)imperial.ac.uk
>>>>>>>>>> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> firedrake mailing list
>>>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>> firedrake mailing list
>>>>>>>> firedrake(a)imperial.ac.uk
>>>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>> firedrake mailing list
>>>>>> firedrake(a)imperial.ac.uk
>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>
>>>>>> _______________________________________________
>>>>>> firedrake mailing list
>>>>>> firedrake(a)imperial.ac.uk
>>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>>
>>>>>> _______________________________________________
>>>>> firedrake mailing list
>>>>> firedrake(a)imperial.ac.uk
>>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>>
>>>>> _______________________________________________
>>>> firedrake mailing list
>>>> firedrake(a)imperial.ac.uk
>>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>>
>>>>
> _______________________________________________
> firedrake mailing list
> firedrake(a)imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>
>
-- 
http://www.imperial.ac.uk/people/colin.cotter
www.cambridge.org/9781107663916
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1