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/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/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? Regards, Anna. <https://bitbucket.org/annakalog/buoy2d/src/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/Inequality%20constraint/?at=master> -- Dr Anna Kalogirou Research Fellow School of Mathematics University of Leeds http://www1.maths.leeds.ac.uk/~matak/
I think it is easier to formulate this case for the global case with mu included (so no Theta/Heaviside functions needed) and it may be useful to also give the matrix form along side with the integral weak form, especially for the last equation. --Onno ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Anna Kalogirou <a.kalogirou@leeds.ac.uk> Sent: Wednesday, July 27, 2016 11:01:18 AM To: firedrake@imperial.ac.uk Subject: [firedrake] Mixed system 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/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/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? Regards, Anna. <https://bitbucket.org/annakalog/buoy2d/src/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/Inequality%20constraint/?at=master> -- Dr Anna Kalogirou Research Fellow School of Mathematics University of Leeds http://www1.maths.leeds.ac.uk/~matak/
Dear all, An additional note regarding the problem described below (please also see attached): the problem is essentially that I have one equation (1c) with two test functions, v3 and the integral of v3 which is basically a real number. I tried writing v_int = assemble(v3*step_b*dx) Flambda = ( v3*step_b*((eta1-Z0)/dt - W0) + rho/Mass*v_int*step_b*mu0_5 )*dx but UFL complains that ufl.log.UFLException: Can't add expressions with different shapes. In a matrix form, this is just the product of two vectors (as you can see from equation (2) in the attached document). Thank you in advance for your help. Best, Anna. P.S. Based on people's availability, I could potentially visit you in London and discuss this in person (e.g. 17-18 Aug?). On 03/08/16 17:47, Onno Bokhove wrote:
I think it is easier to formulate this case for the global case with mu included (so no Theta/Heaviside functions needed)
and it may be useful to also give the matrix form along side with the integral weak form, especially for the last equation.
--Onno
------------------------------------------------------------------------ *From:* firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Anna Kalogirou <a.kalogirou@leeds.ac.uk> *Sent:* Wednesday, July 27, 2016 11:01:18 AM *To:* firedrake@imperial.ac.uk *Subject:* [firedrake] Mixed system 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/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/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?
Regards,
Anna. --
Dr Anna Kalogirou Research Fellow School of Mathematics University of Leeds
http://www1.maths.leeds.ac.uk/~matak/
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
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/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/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
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. I could, of course, define a residual and solve everything using nonlinear solvers, but I don't know how efficient that would be. 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/14334d3c20b9f10ed7c1246cde9e3cb60b1c75e4/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@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (3)
- 
                
                Anna Kalogirou
- 
                
                Onno Bokhove
- 
                
                Stephan Kramer