Jaekwang,

can you post the full error message? To me the call looks reasonable
(this is a copy from step-7) and the function definition looks good as well.

Ah, and in case you want to use this in the context of your other
question regarding high order methods: Put a "mapping" as first argument
to this call and make sure to use QGauss<dim>(fe.degree+2) or so, which
increases the order of quadrature as the element order gets higher.

Best,
Martin


On 09/20/2016 04:46 PM, JAEKWANG KIM wrote:
>
>  
>
> I wanted to evaluate Vectortool::integrate_difference to estimate my
> error. 
>
>
>
> but I couldn't figure out what I need to enter for the third
> component. (I marked it as red) 
>
>
>
>
>      VectorTools::integrate_difference (dof_handler,
>
>                                          solution,
>
>                                          _Solution<dim+__1__>()_,
>
>                                          difference_per_cell,
>
>                                          QGauss<dim>(3),
>
>                                          VectorTools::L2_norm);
>
>
> I have solution vector over my domain,(by the way I am solving vector
> valued problems...)  
>
> I want to compare this with continuous exact function, "May be
> Solution<dim+1>" , I have generated it as follow. 
>
> However, I got a error message that 
>
>
> */Users/jaekwangjk/repos/trial/sphere-deal.ii/mystokes.cc:1258:7:
> **error: **no*
>
> *      matching function for call to 'integrate_difference'*
>
> *
> *
>
> What's might be wrong with my code......
>
>
>  template<intdim>
>
>     classSolution : publicFunction<dim>
>
>     {
>
>     public:
>
>     
>
>         Solution () : Function<dim>(dim+1) {}
>
>         
>
>         //const unsigned int b_id;
>
>         virtualdoublevalue (constPoint<dim>   &p,
>
>                               constunsignedintcomponent = 0) const;
>
>         
>
>         virtualvoidvector_value (constPoint<dim> &p,
>
>                                    Vector<double>   &value) const;
>
>         
>
>     };
>
>     
>
>     
>
>     template<intdim>
>
>     double
>
>     Solution<dim>::value (constPoint<dim>  &p,
>
>                                 constunsignedintcomponent) const
>
>     {
>
>         Assert (component < this->n_components,
>
>                 ExcIndexRange (component, 0, this->n_components));
>
>         
>
>         doubleU=-1.; //inflow velocity
>
>         doubleobj_rad=0.2; //Object Radius
>
>         doubler_sph = sqrt( pow(p[0],2) + pow(p[1],2) );
>
>         doublephi = (-1) * acos(p[1]/r_sph);
>
>         
>
>         doubleq_r_sph=U*cos(phi)*( 1+
> 0.5*pow(obj_rad,3)/pow(r_sph,3)-1.5*obj_rad/r_sph );
>
>         doubleq_phi=(-1)*
> U*sin(phi)*(1-0.25*pow(obj_rad,3)/pow(r_sph,3)-0.75*obj_rad/r_sph);
>
>         
>
>         doubleq_x=q_r_sph*sin(phi)+q_phi*cos(phi);
>
>         doubleq_y=(-1)*q_r_sph*cos(phi)+q_phi*sin(phi);
>
>         
>
>         
>
>         if(component == 0)
>
>             returnq_x; 
>
>         if(component == 1)
>
>             returnq_y;
>
>         else
>
>             return0;  //
>
>         
>
>         
>
>     }
>
>
>     template<intdim>
>
>     void
>
>     Solution<dim>::vector_value (constPoint<dim> &p,
>
>                                        Vector<double>   &values) const
>
>     {
>
>         for(unsignedintc=0; c<this->n_components; ++c)
>
>             values(c) = Solution<dim>::value (p, c);
>
>     }
>
>
> -- 
> 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
> <mailto:dealii+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to