It seems that "tmp" vector stays unchanged i.e. function is seemingly not 
assigning any face rhs values to "tmp" vector. 

On Friday, April 26, 2019 at 11:42:09 AM UTC+2, Muhammad Mashhood wrote:
>
> Thank you Prof. Bangerth for the correction that was quit helping. 
> Currently the code started running but unfortunately the function is 
> returning with the zero "tmp" vector. Any possible correction? 
>
>
>
>
>
>
> *        tmp.reinit (solution.size());        
> VectorTools::create_boundary_right_hand_side(dof_handler,                  
>                                      QGauss<dim-1>(fe.degree+1),            
>                                         
>  ConstantFunction<dim>(1),                                                 
>      tmp);*
>
> Currently I also did not specify the id of the node where I want to 
> impose  "*ConstantFunction<dim>(1)*" value 1 supposing that the "
> *create_boundary_right_hand_side*" will apply it itself on both ends when 
> ids not specified explicitly. 
>
> On Thursday, April 25, 2019 at 8:49:04 PM UTC+2, Wolfgang Bangerth wrote:
>>
>> 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:                 bang...@colostate.edu 
>>                             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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to