BradGreig / Hybrid21CM

1 stars 3 forks source link

redundant code for calling main C functions #10

Closed steven-murray closed 5 years ago

steven-murray commented 5 years ago

At this moment, every function (initial_conditions, perturb_field, etc.) has very similar structure (check inputs, try to read, run function, write).

Most of this is basically boilerplate, which provides for bad coverage and updates. We should have a nicer system to deal with this.

steven-murray commented 5 years ago

I've pushed 2070c212778d9f1ba441fc7861db1068e1ca64db to partially fix that.

As for the more general structure, I can't really see a good way to deal with this, other than going to a class-based format, which would require a lot of rethinking (especially for recursive operations). So for now, I say we just leave it (it works)

BradGreig commented 5 years ago

Yeah, I am comfortable with it being left as is. Especially given it is all working.