Skip to content

Let SimulatorAccess store an observer pointer to Simulator.#6870

Open
bangerth wants to merge 1 commit intogeodynamics:mainfrom
bangerth:observer-pointer
Open

Let SimulatorAccess store an observer pointer to Simulator.#6870
bangerth wants to merge 1 commit intogeodynamics:mainfrom
bangerth:observer-pointer

Conversation

@bangerth
Copy link
Contributor

Right now, it stores a bare pointer. This is easily changed with the exception of one place that creates a plugin and where apparently one now needs to know the declaration of class Simulator to check a static assertion in class ObserverPointer (namely: Is Simulator really derived from EnableObserverPointer?).

This isn't going to solve the memory issue we talked about in the call today, but it's still worthwhile replacing bare pointers by smarter classes that help us track memory stuff. Let's see if anything breaks with this patch.

Copy link
Member

@gassmoeller gassmoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a header missing for deal.II 9.6. I dont really understand the errors for 9.7. Something in the particle property manager?

#include <aspect/particle/manager.h>

#include <aspect/utilities.h>
#include <aspect/simulator.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this now necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above:

...with the exception of one place that creates a plugin and where apparently one now needs to know the declaration of class Simulator to check a static assertion in class ObserverPointer (namely: Is Simulator really derived from EnableObserverPointer?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants