FE_DGQ with support points on faces.

38 views
Skip to first unread message

Sam

unread,
Oct 16, 2019, 2:15:04 PM10/16/19
to deal.II User Group
Hi,
I would like to define a FE defined by lagrange interpolants on the faces of the cell. The objective is to setup a FE corresponding to the normal trace of RT(degree=k).
 For example, for RT(degree=0), the dofs are given by face integrals on faces and I need a DGQ finite element which has support points exactly at the center of each face.
In general how can I construct a DGQ finite element which is continuous only across faces of the cell. 

thanks,
Sam

Wolfgang Bangerth

unread,
Oct 16, 2019, 2:41:18 PM10/16/19
to dea...@googlegroups.com
Before we think about implementing a new element, have you checked whether the
FE_FaceQ and FEFaceP classes do what you need?

Best
W.

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

sam the dude

unread,
Oct 17, 2019, 8:41:53 PM10/17/19
to dea...@googlegroups.com
Hi Wolfgang,
 Thanks for the response. I think FE_FaceQ is exactly what I am looking for, at least in the case of representing the normal trace of RT_0. 
But I have trouble using the FEFieldFunction with the FE_FaceQ element. I tried the following: 

Functions::FEFieldFunction<dim,DoFHandler<dim>,Vector<double>> fe_interface_data(dof_handler_face,solution_vector);
 MappingQGeneric<dim> mapping_generic(1);
 DoFTools::map_dofs_to_support_points(mapping_generic,dof_handler_face,support_points);
  fe_interface_data.value_list(support_points,values);


And got all values to be NaN. Am I doing something wrong?

Sam.


--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/6bc97617-70c0-395e-1f36-2fc48b720dbf%40colostate.edu.

Wolfgang Bangerth

unread,
Oct 17, 2019, 10:24:14 PM10/17/19
to dea...@googlegroups.com
On 10/17/19 6:41 PM, sam the dude wrote:
>  Thanks for the response. I think FE_FaceQ is exactly what I am looking for,
> at least in the case of representing the normal trace of RT_0.
> But I have trouble using the FEFieldFunction with the FE_FaceQ element. I
> tried the following:
>
> /Functions::FEFieldFunction<dim,DoFHandler<dim>,Vector<double>>
> fe_interface_data(dof_handler_face,solution_vector);
> /
> / MappingQGeneric<dim> mapping_generic(1);/
> / DoFTools::map_dofs_to_support_points(mapping_generic,dof_handler_face,support_points);
>   fe_interface_data.value_list(support_points,values);/
>
> And got all values to be NaN. Am I doing something wrong?

No -- a finite element that only lives on the faces simply can't be evaluated
in the interior of cells (i.e., at arbitrary points). If that's what you need
to do, then you ought to rethink how exactly your shape functions are defined.

Sam

unread,
Oct 17, 2019, 11:45:19 PM10/17/19
to deal.II User Group
I don't really need to evaluate the function at any interior point. I eventually wanted to project the boundary data obtained from the solution to another FE_FaceQ of different degree defined on a different triangulation. So to pass a boundary_function map to vectortools::project_boundary_values, I was planning to use the FEFieldfunction to first define a function from solution vector corresponding to dof_handler_faceQ.
I assume it won't work because FEFieldFunction uses Fevalues instead of FeFaceValues at quadrature points.
How else can I pass the boundary data obtained from FE_FaceQ to vectortools::project_boundary_values.


-Sam

Wolfgang Bangerth

unread,
Oct 18, 2019, 12:43:00 PM10/18/19
to dea...@googlegroups.com
On 10/17/19 9:45 PM, Sam wrote:
> I don't really need to evaluate the function at any interior point. I
> eventually wanted to project the boundary data obtained from the
> solution to another FE_FaceQ of different degree defined on a
> different triangulation. So to pass a boundary_function map to
> vectortools::project_boundary_values, I was planning to use the
> FEFieldfunction to first define a function from solution vector
> corresponding to dof_handler_faceQ. I assume it won't work because
> FEFieldFunction uses Fevalues instead of FeFaceValues at quadrature
> points.

Yes. And quadrature points may not exactly lie on faces either.

> How else can I pass the boundary data obtained from FE_FaceQ
> to vectortools::project_boundary_values.

You can't. But you can take a look at how that function is implemented
and then copy it into your code. In all of the places where you are
evaluating the function via FEFieldFunction, you'll just have to
directly evaluate your existing function using FEFaceValues. It's really
no different than what you do in many other contexts where an existing
solution enters into the next equation you want to solve (e.g., in step-15).
Reply all
Reply to author
Forward
0 new messages