Local time stepping in Firedrake #2404
Replies: 6 comments 6 replies
-
Dear Artur,
If you create a MeshHierarchy then you can do the usual multigrid operations between meshes e.g. prolong, restrict etc. These are implemented in firedrake/mg/embedded.py
all the best
--cjc
…________________________________
From: Artur Palha ***@***.***>
Sent: 05 April 2022 10:32
To: firedrakeproject/firedrake ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [firedrakeproject/firedrake] Local time stepping in Firedrake (Discussion #2404)
Dear All,
I considering using Firedrake to solve a time dependent system of PDEs. After spatial discretization I get something like:
dq/dt = L(q)
With L a linear operator resulting from the spatial discretization, essentially a matrix, and q the degrees of freedom.
I am planning to use a k-th order ADER Taylor series time integrator (explicit time integrator) that results in something like
q(t + dt) = q(t) + sum_{i}^{k} gamma_{i} dt^{i} L^{i}(q)
So far, to me, this seems doable in Firedrake.
My question regards the extension to a local time-stepping. If my triangles are separated into a coarse S_{c} and a fine S_{f} subsets I would like to first step the coarse one with a larger time step and then step the fine ones with a smaller time step. So, my question is: is it possible to efficiently make these computations on each sets of triangles separately (of course, providing the information from the course elements that neighbour the fine ones).
Thank you for your help.
Kind regards,
-artur palha
—
Reply to this email directly, view it on GitHub<#2404>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABOSV4QUGI2WWDKWLAZUIUDVDQCEPANCNFSM5SSEGVJQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you’re using FEM, you start from a weak form so you actually have
M dq/dt = L(q).
That complicates explicit methods for FEM since M is sparse but nontrivial.
Otherwise, you could just write a loop over the set of cells you’re updating.
You could use lumped masses (there are examples of this for p1 elements, but if you want higher order you need to use KMV elements, for which there are also demos. These make M diagonal and hence easy to work with for explicit time stepping
… On Apr 5, 2022, at 5:14 AM, Artur Palha ***@***.***> wrote:
Dear Colin,
Thank you for the answer. I will check that. Are you aware of any examples using this?
Kind regards,
-artur palha
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
Hi Artur,
Directly accessing the data of neighbouring cells is not really part of the Firedrake paradigm. If you can write down what you want to do in terms of a sequence of solves and prolongation/restriction between meshes then that would be possible to do.
all the best
--cjc
…________________________________
From: Artur Palha ***@***.***>
Sent: 05 April 2022 13:31
To: firedrakeproject/firedrake ***@***.***>
Cc: Cotter, Colin J ***@***.***>; Comment ***@***.***>
Subject: Re: [firedrakeproject/firedrake] Local time stepping in Firedrake (Discussion #2404)
Hi Robert,
Thank you for you input. Those are good points.
I agree with you that there is the mass matrix M, I did not want to go into too many details. Do you have an example for the loop over the cells? If I need to access the boundary data of neighbouring cells is that easy? I never used this functionality in Firedrake.
Kind regards,
-artur palha
—
Reply to this email directly, view it on GitHub<#2404 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABOSV4UPRWNYIUMLEYBMPOTVDQXAXANCNFSM5SSEGVJQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Colin, I tried to draw a figure to explain the case: What I show there is just a very simple 1D example with two elements. The solution q is known at the time instant t. This means that the coefficients of the FEM expansion are known at that instant. The red crosses are the nodal points. The time stepping algorithm is like this:
Now, the interpolation of the solution in time is ok. My issue is if it is possible to have access to the boundary solution of the neighbouring element. I was expecting it to be possible since DG typically needs this. I am not sure if I am explaining myself properly. Thanks a lot for bearing with me! -artur palha |
Beta Was this translation helpful? Give feedback.
-
Hi Artur,
Do you just mean how do we deal with the surface terms in a DG method? That's covered in this demo:
https://firedrakeproject.org/demos/DG_advection.py.html
all the best
--cjc
…________________________________
From: Artur Palha ***@***.***>
Sent: 05 April 2022 15:52
To: firedrakeproject/firedrake ***@***.***>
Cc: Cotter, Colin J ***@***.***>; Comment ***@***.***>
Subject: Re: [firedrakeproject/firedrake] Local time stepping in Firedrake (Discussion #2404)
Hi Colin,
I tried to draw a figure to explain the case:
[image]<https://user-images.githubusercontent.com/3426704/161779706-19a291a2-b001-4ef8-81e5-1d901ecbe20b.png>
What I show there is just a very simple 1D example with two elements. The solution q is known at the time instant t. This means that the coefficients of the FEM expansion are known at that instant. The red crosses are the nodal points.
The time stepping algorithm is like this:
1. The element on the left (k) is advanced in time explicitly with a high order time advancing scheme so that we obtain the solution in that element at time instant t + dt and are able to get a high order reconstruction of the time evolution of the coefficients in that element.
2. Advance the solution of the element on the right (k+1) to time t + dt/3. This can be done easily, since it only needs the full solution at t.
3. Advance the solution of the element on the right (k+1) from time t + dt/3 to t + dt*(2/3). This uses the updated solution in the right element (the one we just computed in 2), but it also needs the boundary solution of the neighbouring element, q_{+}, at the time instant t + dt/3.
Now, the interpolation of the solution in time is ok. My issue is if it is possible to have access to the boundary solution of the neighbouring element. I was expecting it to be possible since DG typically needs this.
I am not sure if I am explaining myself properly.
Thanks a lot for bearing with me!
-artur palha
—
Reply to this email directly, view it on GitHub<#2404 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABOSV4UG6XR5XDATY2NTZM3VDRHTNANCNFSM5SSEGVJQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I think what you would need to do is to inject the fields to the coarse mesh, then do the DG solve there, then interpolate back.
…________________________________
From: Artur Palha ***@***.***>
Sent: 06 April 2022 10:18
To: firedrakeproject/firedrake ***@***.***>
Cc: Cotter, Colin J ***@***.***>; Comment ***@***.***>
Subject: Re: [firedrakeproject/firedrake] Local time stepping in Firedrake (Discussion #2404)
Hi Colin,
Yes, but specifically if we can do this in only parts of the mesh. For example, woud it be possible to deal with the surface terms in a DG method in parts of the mesh? For example first in the coarse elements and then in the fine ones?
Thanks a lot again!
-artur palha
—
Reply to this email directly, view it on GitHub<#2404 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABOSV4RNB2FT5R2SHRHIW43VDVJE7ANCNFSM5SSEGVJQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Dear All,
I am considering using Firedrake to solve a time dependent system of PDEs. After spatial discretization I get something like:
dq/dt = L(q)
With L a linear operator resulting from the spatial discretization, essentially a matrix, and q the degrees of freedom.
I am planning to use a k-th order ADER Taylor series time integrator (explicit time integrator) that results in something like
q(t + dt) = q(t) + sum_{i}^{k} gamma_{i} dt^{i} L^{i}(q)
So far, to me, this seems doable in Firedrake.
My question regards the extension to a local time-stepping. If my triangles are separated into a coarse S_{c} and a fine S_{f} subsets I would like to first step the coarse one with a larger time step and then step the fine ones with a smaller time step. So, my question is: is it possible to efficiently make these computations on each sets of triangles separately (of course, providing the information from the course elements that neighbour the fine ones). Are there any examples of something similar?
Thank you for your help.
Kind regards,
-artur palha
Beta Was this translation helpful? Give feedback.
All reactions