Evaluate solution of face elements

33 views
Skip to first unread message

l.j.corbijnva...@student.utwente.nl

unread,
Mar 14, 2017, 12:54:07 PM3/14/17
to deal.II User Group
Dear all,

I'm trying to evaluate the solution of face elements (FE_FaceQ) at specific points on a face. For uniformly refined meshes the following works perfectly (as far as I can tell)

std::vector<Vector<double>> result_values (1, Vector<double>(1));
const Point<dim - 1> punit_face = StaticMappingQ1<dim, dim>::mapping
                    .project_real_point_to_unit_point_on_face(cell, face_id, point);
Quadrature<dim - 1> quadrature(punit_face);
FEFaceValues<dim> fe_v(fe, quadrature, update_values);
fe_v.reinit(cell, face_id);
fe_v.get_function_values(solution, result_values);

However when I refine some cells on the grid it seems to give wrong results for the cells around the hanging nodes. In specific it seems to be incorrect when cell is the coarse cell.

So the question, does the previous code work with non uniformly refined meshes? If not is there a way to adapt it to make it work?

Regards,
Lars

Wolfgang Bangerth

unread,
Mar 17, 2017, 9:43:02 AM3/17/17
to dea...@googlegroups.com
I see no particular reason why that shouldn't work, but "In specific it seems
to be incorrect" is really too non-specific to tell what exactly is going
wrong. Can you explain what you see and how that differs from what you expect
to see? Maybe with a picture on as coarse a mesh as you can use to demonstrate
the error?

Best
W.

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

Lars Corbijn van Willenswaard

unread,
Mar 22, 2017, 10:15:46 AM3/22/17
to dea...@googlegroups.com
Thank you for the answer. After some more testing I found out the code was correct, but my reasoning/math was not for cases with hanging nodes.

Best,
Lars

On Fri, Mar 17, 2017 at 9:42 AM, Wolfgang Bangerth <bang...@colostate.edu> wrote:


--
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 a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/SwrPvNg7STU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages