You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to deal.II User Group
Dear all,
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
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.
Any Ideas?
Best,
Konrad
Wolfgang Bangerth
unread,
May 13, 2021, 6:42:48 PM5/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dea...@googlegroups.com
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
>
> 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.
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to deal.II User Group
Thank you, Wolfgang! This is exactly what I am looking for. I don‘t need to access the pointer from outside, I am trying to extend the p4est-interface itself.