I have to admit that I don't have the time right now to look at your code, but
it's really just an interpolation problem to go from FE_B to FE_Q: you need to
evaluate each shape function of the FE_B at the interpolation (=support)
points of the FE_Q. This gives you a cell-local matrix of the form
B_{ij} = \varphi_{Bernstein,j)(x_{j,Q})
(or with indices reversed -- check with the documentation).
By the way, the place to implement this is in the
FE_Q_Base::get_interpolation_matrix() function for B -> Q (see
source/fe/fe_base.cc around line 500), and maybe
FE_Q_Bernstein::get_interpolation_matrix() if you come up with a clever way to
define the operation. I know that the latter function says that you can't do
it, but I suspect that if you at least define it in a way so that the
interpolation of a function onto itself is the identity operation, and if the
interpolation of a FE_Q function onto FE_Bernstein yields the same, continuous
function, then it might still go into that place.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/