Hi Roman just a couple questions:
> Hi everyone, > > I have some problems understanding the user_pointer. > I know it is embedded in an union with user_index. The library tests > for 3 states of the union: data_unknown, data_pointer and data_index. > > My intention is to access additional data of the cell - like the > quadrature point history in step-18 - > only via the user_pointer to localize and encapsulate data more in an > OOP sense. > The user_pointer is supposed to be persistent through all refinement and > timestep-cycles. The user_pointer is. But the user_pointer of children cells created via refinement are NULL > > For comparison: > If I modify step-1 tutorial to test the user_pointer, I just assign, > e.g. some ints, and it works... > Especially, I donot have to mess with the triangulation object and > after refinement I can assign the user_pointer of the children just like > that. When you say "assign it some ints" you mean you dynamically create new memory locations and give the address of these locations to the user_pointer? What do you mean by mess with the triangulation object? > > The problem: > If I try to modify step 18 in a similar way, > the program will throw an exception ExcPointerIndexClash() > with violated condition: user_data_type == data_unknown || > user_data_type == data_pointer In step 18 the user pointer always points to location in a std::vector of PointHistory objects. By modify step 18 do you mean you just set the user_pointer to point at some data dynamically created data? > > To my understanding, this means the user_data holds now an user_index > which I didnot assign > or the value of user_data_type is not clearly defined. > Even, if I clear the user_data by triangulation.clear_user_data(), > the same exception is thrown again after one refinement step... > > I suspect the parallel partitioning but have no idea > why is it like that and how to handle it... > > Thank you > Roman > > > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
