That means that I don't have to create that matrix myself, but rather use 
the matrix I get from FE_Q_*::get_interpolation_matrix()? 
The most interesting bug my code has at the moment is:
Q(a)->B(b): I get identical vectors, i.e. a == b
B(b)->Q(a): Vectors are not identical anymore, a != b
Q(a)->B(b): Even though that worked in the first round, it does not in the 
second, a != b
I do not understand that behavior yet.

Am Donnerstag, 30. Mai 2019 19:00:02 UTC+2 schrieb Wolfgang Bangerth:
>
> On 5/30/19 9:06 AM, 'Maxi Miller' via deal.II User Group wrote: 
> > I wanted to write some functions to convert my solution from using 
> > FE_Q-elements to FE_Bernstein-elements (and back). For that I wrote two 
> > functions, convert_feQ_to_feB() and convert_feB_to_feQ() (as listed in 
> the 
> > attachment). When converting from FE_Q-elements to 
> FE_Bernstein-elements, I 
> > get the same values for input and output, but on the way back I get 
> wrong 
> > values (currently I am just using a vector filled with the value 1), but 
> I can 
> > not find the reason why the conversion back is failing. Did I forget 
> something 
> > in the corresponding function? 
>
> 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 
> <javascript:> 
>                             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/b7102277-a66f-4e38-84a8-cd90326dca0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to