Dear all,

Couldn't find what I want in previous posts, so I post the problem here: I 
pass my triangulation to a function in my mesh generating class (by 
reference) and want to set the boundary ID and material IDs. My 
triangulation:

parallel::distributed::Triangulation<dim> triangulation;

How I set boundary ID:
template <int dim>
void MeshGenerator<dim>::setup_boundary_ids
(parallel::distributed::Triangulation<dim> &tria)
{
  for (typename Triangulation<dim>::active_cell_iterator
       cell=tria.begin_active(); cell!=tria.end(); ++cell)
    if (cell->is_locally_owned())
    {
      for (unsigned int fn=0; fn<GeometryInfo<dim>::faces_per_cell; ++fn)
      {
        if (cell->face(fn)->at_boundary())
        {
          Point<dim> ct = cell->face(fn)->center();
          if (std::fabs(ct[0])<1.0e-14)
            cell->face(fn)->set_boundary_id (0);
          else if (std::fabs(ct[0]-axis_max_values[0])<1.0e-14)
            cell->face(fn)->set_boundary_id (1);
          else if (std::fabs(ct[1])<1.0e-14)
            cell->face(fn)->set_boundary_id (2);
          else if (std::fabs(ct[1]-axis_max_values[1])<1.0e-14)
            cell->face(fn)->set_boundary_id (3);
          std::cout << "boundary id " << cell->face(fn)->boundary_id () << 
std::endl;
        }
      }// face
    }// locally owned cell
}
When this function is called with taking triangulation as input, it prints 
on the screen as :"boundary id " without the boundary ID following.

The same thing happens to my function setting material ID, which takes the 
same arguments in. Do you have any idea what's happening or what I can 
provide to help diagnose the problem?

Thanks a lot!
Weixiong

-- 
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