I had added the header file prior to the run. For more information, given 
below is the snippet of the code :

void Step3::make_grid ()
{
  GridGenerator::hyper_cube (triangulation, -1, 1);
  triangulation.begin_active()->face(0)->set_boundary_id(1);
  triangulation.refine_global (5);

  std::cout << "Number of active cells: "
            << triangulation.n_active_cells()
            << std::endl;
}

I then use:
 
VectorTools::interpolate_boundary_values (dof_handler,
                                            1,
                                            ConstantFunction<2>(1.),
                                            boundary_values);


as given in the documentation. 


On Monday, May 11, 2020 at 6:12:38 AM UTC+5:30, Wolfgang Bangerth wrote:
>
> On 5/10/20 9:24 AM, Huzaifa Unjhawala wrote: 
> > 
> > 
> > However, I am getting the following error 
> >   error: ‘class dealii::TriaAccessor<1, 2, 2>’ has no member named 
> > ‘set_boundary_id’ 
> >     triangulation.begin_active()->face(0)->set_boundary_id(1); 
> > 
> > I was also trying a problem on my own where I wanted to give the 
> boundaries of 
> > a square grid different Dirichlet boundary conditions. I planned on 
> doing this 
> > by setting different boundary Ids on different edges as shown in step-3. 
> I 
> > encountered the same error over there too. 
>
> That is funny. It should work. Does it work if you add 
>    #include <deal.II/grid/tria_accessor.h> 
> to the list of include files at the top of the file? 
>
> 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/2276e64b-5295-4f81-94a3-b96b8daf9f30%40googlegroups.com.

Reply via email to