nemocrys / pyelmer

A python interface to Elmer.
GNU General Public License v3.0
53 stars 15 forks source link

provide solver keywords in a structured manner #16

Open arvedes opened 1 year ago

arvedes commented 1 year ago

Background: The keywords for solvers related to crystal growth simulations (HeatSovler, PhaseChangeSolver, StatMag, MgDyn2DHarmonic) were originally implemented in pyelmer, then moved to the submodule elmerkw. Currently, using these parameters is not the recommended workflow and importing elmerkw raises a DeprecationWarning. Instead, the user is encouraged to provide the keywords in a dictionary.

I think providing keywords is great advantage of pyelmer and gives a huge benefit to the users because they can rely on autocomplete functionality of their IDE instead of looking everything up in the manuals. It'd be great to bring back this functionality to the main elmer module but in a more structured manner helping the users to find the right keywords for their solvers. I am thinking of something like:

bc_bottom = elmer.Boundary(...)
bc_bottom .heatsovler.fixed_heatflux = 10
bc_bottom .magnetodynamics.electric_current_density = 100
(...)