-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow user defined models #36
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #36 +/- ##
==========================================
+ Coverage 52.68% 54.99% +2.31%
==========================================
Files 5 7 +2
Lines 1211 1331 +120
==========================================
+ Hits 638 732 +94
- Misses 573 599 +26 ☔ View full report in Codecov by Sentry. |
I just checked this implementation and realized that we receive with this way a problem of Type instability. Thinking again about our discussion, the aim is to simply restructure only on the ct_physics.jl level, right? add_recombination_model!(ctsys, RadiativeRecombination(Radiative))? |
Yes those allocations seem to be a problem, this is probably because currently an Array is allocated for the densities, My idea was that the new TeSCA would be mostly be a collection of different models that can be combined in various ways. |
There are at least 2.1 remedies for this:
|
Thank you, PreallocationTools.jl seems to work well here |
How important is it to be able to define different types of gain/recombination models outside as a user? So far the different types of gain/recombination models seemed to be limited. That's why we handled this internally and allowed the user to choose from predefined options. As for the wording, given that there are many types of "physical models", it would make sense to give the example and function names more descriptive names. So far it seems that "physical model" refers to recombination mechanisms. |
I think in the future there might a lot different kind of models regarding the interaction between the optical The names of the struct and the functions can be changed of course, maybe something like UserDefinedModel |
Allow users to define their own models in order to modify the right hand side of the continuity equations and
to add charges to the poisson equation.