On Fri, 5 Aug 2016 at 11:31 Anna Kalogirou <a.kalogirou@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/14334d3c20b9f10ed7c1246cde9e3cb60... ,
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
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
David, Please let me know when you merge the branch with the implementation on R into the master, so that I can give it a try. Best, Anna. On 05/08/16 11:37, David Ham wrote:
On Fri, 5 Aug 2016 at 11:31 Anna Kalogirou <a.kalogirou@leeds.ac.uk <mailto:a.kalogirou@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/ <http://www1.maths.leeds.ac.uk/%7Ematak/>
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 <mailto:firedrake@imperial.ac.uk> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk <mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
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@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <David.Ham@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@leeds.ac.uk<mailto:a.kalogirou@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/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<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (3)
-
Anna Kalogirou
-
David Ham
-
Onno Bokhove