On 7/7/21 9:06 AM, Simon Wiesheier wrote:
Of course the (smart)pointer stores the address of the triangulation, but is it not possible that the the call "triangulation.execute_refinement()" makes the triangulation object too big so that it has to be reallocated at another adress (->address changes)?

This is not how C++ works. An object has an address, and that address never changes as long as the object lives.

But that object can internally contain pointers to store information, and if it requires more memory, then the object can change that pointer. But the address of the object itself remains the same.


So is that what I observe something like undefined behaviour or do calls like "dof_handler.distribute_dofs(fe)" or "triangulation.execute_refinement()" indeed don't change the address of the underlying triangulation (dof_handler) in memory?

Correct. They don't change.

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/d5c82ed1-f732-e9b9-01f9-409e02249ed6%40colostate.edu.

Reply via email to