On 11/28/23 20:08, Yuan Wang wrote:
After solving for one time step, I obtain the face solution (blue dots on
purple line, based on an FEFaceQ object) which is imposed as part of the
Dirichlet boundary condition for the next time step. For example, when we look
at the element boundary in yellow and when we need the b. c. value on the
quadrature point green x (both x’s are at the same spatial location), we need
to interpolate the face solution at the green x.
It seemed that point_value function would be the way to go but
VectorTools::point_value(dof_handler, locally_relevant_solution, point_x) was
only able to produce nan‘s.
Yuan:
The fundamental issue is that VectorTools::point_value() assumes that the
point is arbitrary (somewhere, not necessarily on a face) and consequently
uses FEValues. But FEFaceQ of course only lives on the faces of a cell, and
you cannot evaluate it at arbitrary points -- so FEValues only results in the
NaN values you observe.
There is no good solution for this situation in the library at the moment. But
you can probably implement one yourself. Since you know that the point you're
looking for is on a face, you can replicate the kind of thing that
VectorTools::point_value() does in your own code, but using FEFaceValues
instead of FEValues. As you noticed, the key is to get a dim-1 dimensional
quadrature point. Since you know that the face in question is in x-space
(i.e., perpendicular to the time axis), simply throwing away the time
component makes sense to me; you then just have to transform the point you
have into the coordinate system of the face you're considering. I don't see a
much better approach if you really want to have non-matching meshes between
time slabs.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/621473d0-0ec2-46fd-3f00-67ea63d4ef2e%40colostate.edu.