On 4/25/19 9:46 AM, Muhammad Mashhood wrote:
> 
> As unlike the step-8 here in step-26 the rhs is being formed directly 
> globally as "system_rhs" using "create_right_hand_side()" function so 
> can I use the "create_boundary_right_hand_side()" function using 
> following lines of code?

It is definitely possible to *add* to the vector you get from 
create_boundary_rhs(). But in this call...

> /
> /
> /        std::map<unsigned int, unsigned int>::iterator 
> it=boundary_count.begin();
> 
>          VectorTools::create_boundary_right_hand_side(dof_handler,
>                                                      
>   QGauss<dim>(fe.degree+1),
>                                                       rhs_function,
>                                                       tmp,/
> /                                                     it->first);/
> where the "rhs_function" provides the values of /g0/ and /g1 /at 
> boundary node points and "it->first" is the boundary id where I want to 
> apply the BC.

...you are asked to pass in a Quadrature<dim-1>, not a Quadrature<dim>. 
Consequently, the code does not compile. This is actually stated quite 
explicitly in the second part of the error message:

dealii::VectorTools::create_boundary_right_hand_side(const 
dealii::DoFHandler<dim, spacedim>&, const dealii::Quadrature<(dim - 
1)>&, const dealii::Function<spacedim, typename 
VectorType::value_type>&, VectorType&, const std::set<unsigned char>&) 
[with int dim = 1; int spacedim = 1; VectorType = 
dealii::Vector<double>; typename VectorType::value_type = double]
    void create_boundary_right_hand_side
         ^
/usr/local/include/deal.II/numerics/vector_tools.h:2105:8: note:   no 
known conversion for argument 2 from ‘dealii::QGauss<1>’ to ‘const 
dealii::Quadrature<0>&’


Best
  WB

-- 
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                            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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to