Copy necessary data from Jtor_universal to avoid deepcopying the whole object#42
Copy necessary data from Jtor_universal to avoid deepcopying the whole object#42timothy-nunn wants to merge 1 commit into
Jtor_universal to avoid deepcopying the whole object#42Conversation
|
This is great @timothy-nunn! And you're right, limiter_handler is static and does not need to be updated. (I'll correct myself here if needed, but) I believe it's only the 'direct' attributes of profiles that actually need to be copied (e.g. the critical points .opt and .xpt, the plasma currents distribution .jtor, the defining parameters alpha beta etc -- the latter ones in case of evolutive solves only). It should be possible to just 'manually copy these across' |
|
Hey @nicamo I have updated this PR to an alternative idea where instead of deepcopying (and having to make deepcopy implementations) we have a data class of *what is needed within the main code. There may be scripts I do not know of that this breaks. |
c2ed704 to
a58156f
Compare
Jtor_universal to avoid deepcopying the whole object
|
Closing because #43 implements this same fix in a better way, plus removes more deepcopies |
Extracts important information from the
Jtor_universalclass into a seperate dataclass for use as._profiles. This removes the need to deepcopy the profile.