On 5/13/21 3:05 PM, Konrad Simon wrote:
I am currently writing an interface to some p4est functions. The structure of
p4est makes it often necessary to pass data around through a user pointer of
whatever type (void*). When creating a new triangulation this pointer is set
to „this“ (the triangulation itself), see for example
https://www.dealii.org/current/doxygen/deal.II/distributed_2tria_8cc_source.html#l2989
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2Fdistributed_2tria_8cc_source.html%23l2989&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cb4cadd28da84445fd29308d91652e2c3%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637565367510208994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=v2G100jGfI6SbGwV35raSFjMxfnJMJurP2F2qAc61Ls%3D&reserved=0>
Is this pointer used in other interfaces somehow? p4est itself does not touch
it so I am wondering if I can reset it to anything I‘d like.
Konrad,
we use this user pointer in many of the functions that are called back from
p4est. Take a look at
RefineAndCoarsenList<dim, spacedim>::refine_callback
for example (line 761 of the file), and many other functions that you can find
by searching for
forest->user_pointer
in this file.
We consider the p4est forest object as internal to the p::d::T class, so I
would expect that you can't access it, or expect that you can use any of its
content for anything other than what the p::d::T class does with it.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
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/37565e85-380a-dc8b-486f-47b563b845ed%40colostate.edu.