You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That should speed up the compilation of bout, as only the things that are needed get included.
At the same time, we should provide a file that includes ether bout_all - so that projects that use bout can simply include that and get everything they need, rather than including a few files, which then includes everything that gets needed ...
This is going to be a breaking change - so I am not sure this is something we want do ...
Another reason, besides compile performance, is that the current way can be quite horrible to write templates in BOUT++.
I need to forward declare interp_to in newfield, to have it available in the template.
This breaks for the aiolos mesh - as interp_to becomes an inline function - which I cannot copy paste, as I cannot include bout/mesh.hxx - as that results in circular dependencies.
I gave up resolving that, as it seems everything is including everything ... and as mentioned changing that would break a lot of code ...
The text was updated successfully, but these errors were encountered:
I rather suspect 5.0 is going have some radical changes to a lot of things, and I'm very happy to break things in major version changes.
I've played with include-what-you-use a few times, which can work out when we only need to forward declare things. Unfortunately, we actually don't include as many headers as we "should" in most places, so accepting everything it says might be a net negative.
A single header to include in physics models would be great, and I think we could do that at the same time as moving all the headers under a proper namespace (as well as maybe using C++ namespace as well).
After 4.2, which is coming I promise, I think we can start breaking things again.
Currently many includes could be replaced by forward declarations, e.g. in mesh.hxx:
could be replaced by
That should speed up the compilation of bout, as only the things that are needed get included.
At the same time, we should provide a file that includes ether bout_all - so that projects that use bout can simply include that and get everything they need, rather than including a few files, which then includes everything that gets needed ...
This is going to be a breaking change - so I am not sure this is something we want do ...
Another reason, besides compile performance, is that the current way can be quite horrible to write templates in BOUT++.
I need to forward declare interp_to in newfield, to have it available in the template.
This breaks for the aiolos mesh - as interp_to becomes an inline function - which I cannot copy paste, as I cannot include bout/mesh.hxx - as that results in circular dependencies.
I gave up resolving that, as it seems everything is including everything ... and as mentioned changing that would break a lot of code ...
The text was updated successfully, but these errors were encountered: