Hi! Thanks for reply.
Following to 1) I have built my square pyramid from 2 simplexes end merged them. Next problem arose immediately. I realized that I did not quite understand which of set_boundary functions to use. Is the following code enough or I should use some more sophisticated approach? Maybe set_all_boundary_ids will do better?
for (; cell!=endc; ++cell)
{
for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
{
if (cell->face(face)->at_boundary()) cell->face(face)->set_boundary_id(1);