This is definitely good to know! What I couldn't understand is after setting up all the ids and printing out in my assembly function as pcout << cell->material_id () << std::endl; I can see them.
Anyway, thank you sir. Weixiong 在 2017年7月2日星期日 UTC-7下午5:23:42,Wolfgang Bangerth写道: > > On 07/02/2017 02:40 PM, Weixiong Zheng wrote: > > > > 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? > > The data type used for boundary_id and material_id is 'unsigned char', but > we > treat it as an integer type. So when you set, say, the boundary_id to 13, > and > then print it on the screen, it is treated as ASCII character 13 -- which > is > not printable in a form that shows up on the screen. > > You'll get to see what you want if you convert things to an integer: > std::cout << "boundary id " > << static_cast<int>(cell->face(fn)->boundary_id ()) << > std::endl; > > Cheers > 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.
