I implemented it the following way:
    Functions::InterpolatedTensorProductGridData<dim> interpolator(this->
coordinate_values,
                                                                         
this->data_storage);

    VectorFunctionFromScalarFunctionObject<dim> interpolator_object(&
interpolator.value,
                                                                    
target_component,
                                                                    
n_components_to_use);

    VectorTools::internal::project_matrix_free<n_components_to_use, 
fe_degree_to_use>(MappingQGeneric<dim>(1),
                                                                    
dof_handler,
                                                                    
hanging_node_constraints,
                                                                    
INTERPOLATION_EQUATION<dim>(fe.degree + gauss_size),
                                                                    
interpolator_object,
                                                                    
present_solution,
                                                                    false,
                                                                    (dim > 1 
?
                                                                        
 INTERPOLATION_EQUATION<dim - 1>(fe_degree_to_use)
                                                                       : 
Quadrature<dim - 1>(0)),
                                                                    false);



but the compilation fails with 
error: ISO C++ forbids taking the address of a bound member function to 
form a pointer to member function.  Say 
‘&dealii::Functions::InterpolatedTensorProductGridData<2>::value’. 
Therefore, how can I approach that problem in a better way?
Thanks!

Am Donnerstag, 23. Januar 2020 15:39:23 UTC+1 schrieb Wolfgang Bangerth:
>
> On 1/23/20 7:29 AM, 'Maxi Miller' via deal.II User Group wrote: 
> > 
> >     Why would you want to project when you can interpolate? That seems 
> >     unnecessarily expensive :-) 
> > 
> > I would like to have the input data (which is interpolated) as an 
> additional 
> > component, which then is printed together with the result of the other 
> > calculations. Therefore I am not sure if there is a simpler approach 
> (after 
> > interpolation) to get the data into the component. I either can solve 
> the 
> > equation u = f for that, or use project(). Or is there another one? 
>
> What I'm saying is that you can solve for u_h=f in many different ways, 
> depending on how exactly you interpret the equality. In general, u_h is in 
> some finite element space, but f is not, so the two will not be equal 
> everywhere. Projection finds a u_h so that 
>    (u_h,v_h) = (f,v_h)    for all v_h 
> which is one way of interpreting the equality. Interpolation finds a u_h 
> so that 
>    u_h(x_j) = f(x_j)      at all node locations x_j 
> which is another way of interpreting the equality. Neither is better than 
> the 
> other, but the second approach is *far* cheaper to compute. 
>
> 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/021304b7-81f5-40bc-91c9-a3f02832bd8a%40googlegroups.com.

Reply via email to