Interpolating values of the neighbor cells in DG

54 views
Skip to first unread message

Jiaqi ZHANG

unread,
Sep 19, 2016, 5:15:15 PM9/19/16
to deal.II User Group
Dear all,

I was trying to get the values of the solution polynomial in the neighbor cells in DG, 

for example, I want to compute
View the MathML source

where p_i are the solution polynomials of the neighbors, \Delta_0 is the current cell.

I cannot find any function to do this in Finite elements » Finite element access/FEValues classes

How should I implement this in deal.II?

reference:

Thanks in advance.

Best,
Jiaqi

Wolfgang Bangerth

unread,
Sep 19, 2016, 5:36:34 PM9/19/16
to dea...@googlegroups.com
On 09/19/2016 03:15 PM, Jiaqi ZHANG wrote:
>
> I was trying to get the values of the solution polynomial in the
> neighbor cells in DG,
>
> for example, I want to compute
> View the MathML source
>
> where p_i are the solution polynomials of the neighbors, \Delta_0 is the
> current cell.
>
> I cannot find any function to do this in Finite elements
> <http://www.dealii.org/8.4.1/doxygen/deal.II/group__feall.html> » Finite
> element access/FEValues classes
> <http://www.dealii.org/8.4.1/doxygen/deal.II/group__feaccess.html>
>
> How should I implement this in deal.II?

You mean that you want to *extend the solution from the neighboring cell
to the current cell*? In general, the polynomials that describe the
solution are of course only defined on one cell, and there is a separate
polynomial description on the neighboring cell.

Best
Wolfgang

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Jiaqi ZHANG

unread,
Sep 19, 2016, 7:55:25 PM9/19/16
to dea...@googlegroups.com
Dear Prof. Bangerth,

Thanks for the fast reply.

Yes, I want to extend the solution from the neighboring cells to the current cell. I know different cells have different polynomial descriptions, 

but in order to apply the limiters, information from the neighbor cells is required. Is it possible to extend the solutions from neighbors through

interpolation? I am not sure how to do that in deal.II.


Thanks,
Jiaqi



--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wolfgang Bangerth

unread,
Sep 19, 2016, 11:26:36 PM9/19/16
to dea...@googlegroups.com

Jiaqi,

> Yes, I want to extend the solution from the neighboring cells to the current
> cell. I know different cells have different polynomial descriptions,
> but in order to apply the limiters, information from the neighbor cells is
> required. Is it possible to extend the solutions from neighbors through
> interpolation? I am not sure how to do that in deal.II.

This is one of those operations that are easy to write down in formulas and
difficult to implement.

Are you using arbitrary meshes, or rectangular ones? I ask because what you
really want to do is evaluate the solution on one cell at points *outside this
cell*. That's possible, but you will need to know the reference coordinates of
a point on a neighboring cell in the coordinate system of the current cell.
This is simple if you are on a rectangular mesh, but not so simple in the
general case.

Best
W.

Praveen C

unread,
Sep 19, 2016, 11:43:26 PM9/19/16
to Deal.II Googlegroup
Hello Jiaqi

I was interested in this some years back though I didnt pursue it after some initial attempt.

See this


I tried writing an fespace based on FE_DGPNonparametric which does not use a mapping and the shape functions are directly evaluated in physical space. I attempted it here


You need to modify fevalues so that it can use solution on one cell but evaluate it on a different cell. See the reinit functions


I dont remember clearly but this seemed to be working fine. Only problem was that the shape functions were not orthogonal.

I used this fe_dgt space here



There may be other discussion in mailing list related to this which I have forgotten now.

It should be possible to add a similar reinit function to FE_DGP with MappingCartesian, and achieve what you want. The shape functions would be orthogonal. So one would use it as (some syntax could be wrong here)

fe_values.reinit(cell);
std::vector<Point<dim>>& points = fe_values.get_quadrature_points();
fe_values_nbr.reinit(nbr_cell, points);

The last reinit function should convert "points" to local coordinates on nbr_cell and evaluate whatever it wants.

Or you can modify my fe_dgt to use Legendre polynomials.

On general grids, this is more difficult if you want to have orthogonal shape functions. Only way would be to implement some gram-schmidt process. If you dont care for orthogonality, then something like fe_dgt above works.

Best
Praveen​

Jiaqi ZHANG

unread,
Sep 19, 2016, 11:45:27 PM9/19/16
to dea...@googlegroups.com
Dear Prof. Bangerth,

I will have to use arbitrary meshes, because I have solid particles moving in the mesh and 

have to refine the mesh adaptively. Later, I will need to move the mesh and even regenerate

the mesh if the cells are too distorted.  

Best,
Jiaqi






--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jiaqi Zhang
Graduate student
Department of Mathematics
Virginia Tech

Jiaqi ZHANG

unread,
Sep 20, 2016, 12:04:24 AM9/20/16
to dea...@googlegroups.com
Hello Praveen,

Thank you so much. I am wondering if you could tell me which

limiters you used, because if it is too hard for me to implement

this limiter, I will have to try other ones. I am a newbie to C++,

but will try to read your codes to see if I can make it.

Thanks,
Jiaqi

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Praveen C

unread,
Sep 20, 2016, 12:11:39 AM9/20/16
to Deal.II Googlegroup

On Tue, Sep 20, 2016 at 9:34 AM, Jiaqi ZHANG <jqzha...@gmail.com> wrote:
Hello Praveen,

Thank you so much. I am wondering if you could tell me which

limiters you used, because if it is too hard for me to implement

this limiter, I will have to try other ones. I am a newbie to C++,

but will try to read your codes to see if I can make it.

Thanks,
Jiaqi

Hi

I didnt actually complete the implementation of limiter. The closest I came is in the first code in 1d_scalar_taylor, see the function apply_weno_limiter. It is incomplete though, but shows how I use the new reinit function.

Best
praveen

Jiaqi ZHANG

unread,
Sep 20, 2016, 10:12:37 AM9/20/16
to dea...@googlegroups.com
Thank you so much, Praveen. Your codes are really helpful.

Regards,
Jiaqi

Reply all
Reply to author
Forward
0 new messages