nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

Replace dynamics namespaces with classes #467

Closed timspainNERSC closed 3 months ago

timspainNERSC commented 6 months ago

(If possible!)

The functions defining the behaviour of the mEVP, MEB and BBM dynamics solvers are grouped using namespaces, rather than classes. Using classes would potentially permit the use of the nextSIM-DG Module system to swap dynamics types at run time.

@winzerle and @einola: Is there a reason why these functions are in namespaces, rather than classes?

winzerle commented 6 months ago

Hi everyone and happy New Year!

There is no reason at all for it. First it was just part of the Momentum class and then, this strange solution made the development for Piotr and me easier. But of course, it should be a class.

Thomas

On 2. Jan 2024, at 07:44, Tim Spain @.***> wrote:

(If possible!) The functions defining the behaviour of the mEVP, MEB and BBM dynamics solvers are grouped using namespaces, rather than classes. Using classes would potentially permit the use of the nextSIM-DG Module system to swap dynamics types at run time. @winzerle and @einola: Is there a reason why these functions are in namespaces, rather than classes? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

einola commented 6 months ago

Hi, and Happy New Year!

I agree that there's no other reason than practical expediency during the development. We should, therefore, change it so it uses classes and the Module system.

timspainNERSC commented 3 months ago

The work for this is contained in PR #477

timspainNERSC commented 3 months ago

Fixed as part of PR #477.