In the weak form after Neuman BC implementation for equation in step-26 i 
got following additional terms contributing in rhs:

*for 1D domain x = [0, 1]*

*system_rhs + k_n * [ g1 * phi_(x1) - g0 * phi_(x0) ], where g0 and g1 are 
the flux values at boundary nodes and phi_(x0), phi_(x1) are shape 
functions at these boundary nodes on both ends of a bar.*

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?






*        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. So far I have tried it from my side but giving the following error:











































*/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:602:53: 
error: no matching function for call to 
‘create_boundary_right_hand_side(dealii::DoFHandler<1>&, dealii::QGauss<1>, 
Step26::RightHandSide<1>&, dealii::Vector<double>&)’         
VectorTools::create_boundary_right_hand_side(dof_handler,                       
                              
^In file included from 
/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:46:0:/usr/local/include/deal.II/numerics/vector_tools.h:2090:8:
 
note: candidate: template<int dim, int spacedim, class VectorType> void 
dealii::VectorTools::create_boundary_right_hand_side(const 
dealii::Mapping<dim, spacedim>&, const dealii::DoFHandler<dim, spacedim>&, 
const dealii::Quadrature<(dim - 1)>&, const dealii::Function<spacedim, 
typename VectorType::value_type>&, VectorType&, const std::set<unsigned 
char>&)   void create_boundary_right_hand_side (const 
Mapping<dim,spacedim>        &mapping,        
^/usr/local/include/deal.II/numerics/vector_tools.h:2090:8: note:   
template argument deduction/substitution 
failed:/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:602:53: 
note:   ‘dealii::DoFHandler<1>’ is not derived from ‘const 
dealii::Mapping<dim, spacedim>’         
VectorTools::create_boundary_right_hand_side(dof_handler,                       
                              
^In file included from 
/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:46:0:/usr/local/include/deal.II/numerics/vector_tools.h:2105:8:
 
note: candidate: void 
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>&’/usr/local/include/deal.II/numerics/vector_tools.h:2119:8:
 
note: candidate: template<int dim, int spacedim, class VectorType> void 
dealii::VectorTools::create_boundary_right_hand_side(const 
dealii::hp::MappingCollection<dim, spacedim>&, const 
dealii::hp::DoFHandler<dim, spacedim>&, const dealii::hp::QCollection<(dim 
- 1)>&, const dealii::Function<spacedim, typename VectorType::value_type>&, 
VectorType&, const std::set<unsigned char>&)   void 
create_boundary_right_hand_side        
^/usr/local/include/deal.II/numerics/vector_tools.h:2119:8: note:   
template argument deduction/substitution 
failed:/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:602:53: 
note:   ‘dealii::DoFHandler<1>’ is not derived from ‘const 
dealii::hp::MappingCollection<dim, spacedim>’         
VectorTools::create_boundary_right_hand_side(dof_handler,                       
                              
^In file included from 
/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:46:0:/usr/local/include/deal.II/numerics/vector_tools.h:2136:8:
 
note: candidate: template<int dim, int spacedim, class VectorType> void 
dealii::VectorTools::create_boundary_right_hand_side(const 
dealii::hp::DoFHandler<dim, spacedim>&, const dealii::hp::QCollection<(dim 
- 1)>&, const dealii::Function<spacedim, typename VectorType::value_type>&, 
VectorType&, const std::set<unsigned char>&)   void 
create_boundary_right_hand_side        
^/usr/local/include/deal.II/numerics/vector_tools.h:2136:8: note:   
template argument deduction/substitution 
failed:/home/muhammad/software/dealii-8.5.0/examples/step-26/step-26.cc:602:53: 
note:   ‘dealii::DoFHandler<1>’ is not derived from ‘const 
dealii::hp::DoFHandler<dim, spacedim>’         
VectorTools::create_boundary_right_hand_side(dof_handler,                       
                              
^make[3]: *** [CMakeFiles/step-26.dir/step-26.cc.o] Error 
1CMakeFiles/step-26.dir/build.make:62: recipe for target 
'CMakeFiles/step-26.dir/step-26.cc.o' failedmake[2]: *** 
[CMakeFiles/step-26.dir/all] Error 2make[3]: Leaving directory 
'/home/muhammad/software/dealii-8.5.0/examples/step-26'CMakeFiles/Makefile2:195:
 
recipe for target 'CMakeFiles/step-26.dir/all' failedmake[2]: Leaving 
directory 
'/home/muhammad/software/dealii-8.5.0/examples/step-26'CMakeFiles/Makefile2:271:
 
recipe for target 'CMakeFiles/run.dir/rule' failedmake[1]: Leaving 
directory 
'/home/muhammad/software/dealii-8.5.0/examples/step-26'Makefile:196: recipe 
for target 'run' failedmake[1]: *** [CMakeFiles/run.dir/rule] Error 2make: 
*** [run] Error 2"/usr/bin/make -j24 run" terminated with exit code 2. 
Build might be incomplete.*




On Wednesday, April 10, 2019 at 4:16:02 PM UTC+2, Wolfgang Bangerth wrote:
>
> On 4/10/19 4:52 AM, Muhammad Mashhood wrote: 
> > 
> > _But the step-26 which I am now concerned about is directly forming rhs 
> > somehow using the function:_ 
> > 
> >          RightHandSide<dim> rhs_function; 
> >          rhs_function.set_time(time); 
> >          VectorTools::create_right_hand_side(dof_handler, 
> >                                              QGauss<dim>(fe.degree+1), 
> >                                              rhs_function, 
> >                                              tmp); 
> > So how can I possibly implement heat flux on cell faces in this example 
> case 
> > step-26 ? If I can, then I guess my problem is solved to learn 
> implementing 
> > Neuman BC for Heat equation in deal.ii. Thank you very much in advance? 
>
> You just need to replace the call to this one function by something like 
> the 
> code snippet you had shown above. 
>
> Best 
>   W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth          email:                 [email protected] 
> <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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to